We currently submit proofs to the Aligned verification layer using:
aligned_sdk::verification_layer::submit_and_wait_verification(
eth_rpc_url,
network.to_owned(),
&verification_data,
max_fee,
wallet,
nonce,
)
.await
.map_err(|e| e.to_string())
This task covers:
- Add time logging to report how long the request takes.
- Add an alternative implementation that uses two separate SDK calls:
submit and is_proof_verified, including timing for the overall flow (and ideally per-step timing too).
Requirements
1) Timing logs for current flow
- Measure elapsed time for
submit_and_wait_verification.
- Log duration (ms/seconds) with enough context (network, maybe proof id/hash if available).
- Keep logs consistent with repo logging style (
tracing/log).
2) Optional split-flow implementation
-
Implement a separate flow using:
aligned_sdk::verification_layer::submit(...)
aligned_sdk::verification_layer::is_proof_verified(...)
-
Poll is_proof_verified until success (or timeout), with a configurable poll interval.
-
Add timing:
- Total elapsed time end-to-end
- (Nice-to-have) time for submit call + verification wait time separately
-
Expose this as an option (non-breaking):
Acceptance Criteria
- Existing default behavior unchanged.
- Logs include elapsed time for the current
submit_and_wait_verification flow.
- New optional mode exists using
submit + polling is_proof_verified, with elapsed timing logged.
- Errors remain mapped to
String as before (or equivalent), and no breaking changes to public API surface.
Notes
- Prefer
std::time::Instant for timing.
- Add a reasonable timeout (configurable) to avoid infinite polling.
We currently submit proofs to the Aligned verification layer using:
This task covers:
submitandis_proof_verified, including timing for the overall flow (and ideally per-step timing too).Requirements
1) Timing logs for current flow
submit_and_wait_verification.tracing/log).2) Optional split-flow implementation
Implement a separate flow using:
aligned_sdk::verification_layer::submit(...)aligned_sdk::verification_layer::is_proof_verified(...)Poll
is_proof_verifieduntil success (or timeout), with a configurable poll interval.Add timing:
Expose this as an option (non-breaking):
Config flag / CLI flag / env var (whatever the repo uses) to choose:
submit_and_wait_verification(default)submit + is_proof_verified(new mode)Acceptance Criteria
submit_and_wait_verificationflow.submit+ pollingis_proof_verified, with elapsed timing logged.Stringas before (or equivalent), and no breaking changes to public API surface.Notes
std::time::Instantfor timing.