Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: turn on event validation by default #562

Merged
merged 4 commits into from
Oct 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 6 additions & 16 deletions one/src/daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,10 @@ pub struct DaemonOpts {
)]
authentication: bool,

/// Enable event validation; Requires using the experimental-features flag
#[arg(
long,
default_value_t = false,
env = "CERAMIC_ONE_EVENT_VALIDATION",
requires = "experimental_features"
)]
event_validation: bool,
/// Enable event validation, true by default
/// default value in args is added here for readability, removal of this param does not change the behavior
#[arg(long, default_value = "true", env = "CERAMIC_ONE_EVENT_VALIDATION")]
event_validation: Option<bool>,

/// Flight SQL bind address; Requires using the experimental-features flag
#[arg(
Expand Down Expand Up @@ -340,16 +336,10 @@ pub async fn run(opts: DaemonOpts) -> Result<()> {

// Construct services from pool
let interest_svc = Arc::new(InterestService::new(sqlite_pool.clone()));
let event_validation = opts.event_validation.unwrap_or(true);
let event_svc = Arc::new(
EventService::try_new(
sqlite_pool.clone(),
true,
opts.event_validation,
rpc_providers,
)
.await?,
EventService::try_new(sqlite_pool.clone(), true, event_validation, rpc_providers).await?,
);

let network = opts.network.to_network(&opts.local_network_id)?;

// Setup tokio-metrics
Expand Down
Loading