Skip to content

STR-3155: bind snark account updates to specific seqnos#1832

Open
delbonis wants to merge 3 commits into
mainfrom
STR-3155-sau-pubparams-seqno
Open

STR-3155: bind snark account updates to specific seqnos#1832
delbonis wants to merge 3 commits into
mainfrom
STR-3155-sau-pubparams-seqno

Conversation

@delbonis
Copy link
Copy Markdown
Contributor

Description

This PR fixes an audit finding by adding a seq_no field to the snark account update proof interface, binding the proofs to a specific update seqno.

Claude did most of the low-level work with me guiding it to minimize change blast radius.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature/Enhancement (non-breaking change which adds functionality or enhances an existing one)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor
  • New or updated tests
  • Dependency Update

Notes to Reviewers

Is this PR addressing any specification, design doc or external reference document?

  • Yes
  • No

If yes, please add relevant links:

Checklist

  • I have performed a self-review of my code.
  • I have commented my code where necessary.
  • I have updated the documentation if needed.
  • My changes do not introduce new warnings.
  • I have added (where necessary) tests that prove my changes are effective or that my feature works.
  • New and existing tests pass with my changes.
  • I have disclosed my use of AI in the body of this PR.

Related Issues

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 18, 2026

Commit: a499232

SP1 Execution Results

program cycles gas
EVM EE Chunk 565,596 771,682
EVM EE Account 421,839 527,631
Checkpoint 2,241,398 2,582,981

@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

❌ Patch coverage is 83.78378% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.74%. Comparing base (71d03a2) to head (c5e3bef).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
bin/alpen-client/src/prover/spec_acct.rs 0.00% 3 Missing ⚠️
crates/snark-acct-types/src/proof_interface.rs 88.46% 3 Missing ⚠️
@@            Coverage Diff             @@
##             main    #1832      +/-   ##
==========================================
+ Coverage   79.63%   79.74%   +0.10%     
==========================================
  Files         666      674       +8     
  Lines       73278    74745    +1467     
==========================================
+ Hits        58356    59605    +1249     
- Misses      14922    15140     +218     
Flag Coverage Δ
functional 60.16% <46.15%> (+0.37%) ⬆️
unit 65.64% <83.78%> (-0.24%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
bin/prover-perf/src/programs/alpen_acct.rs 89.55% <100.00%> (+0.15%) ⬆️
bin/strata-test-cli/src/mock_ee/withdrawal.rs 100.00% <100.00%> (ø)
crates/proof-impl/alpen-acct/src/program.rs 96.62% <100.00%> (+0.03%) ⬆️
crates/snark-acct-runtime/src/update_builder.rs 73.41% <100.00%> (+0.11%) ⬆️
crates/snark-acct-sys/src/verification.rs 99.18% <100.00%> (+<0.01%) ⬆️
bin/alpen-client/src/prover/spec_acct.rs 51.63% <0.00%> (-1.04%) ⬇️
crates/snark-acct-types/src/proof_interface.rs 98.02% <88.46%> (-1.98%) ⬇️

... and 48 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bewakes
Copy link
Copy Markdown
Contributor

bewakes commented May 19, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown
Contributor

@bewakes bewakes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but tests are failing.

Copy link
Copy Markdown
Member

@storopoli storopoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK a3d8e5b

Great that you've added a regression test! :)

@storopoli storopoli enabled auto-merge May 19, 2026 15:07
@delbonis
Copy link
Copy Markdown
Contributor Author

Verrryyyy weird panic in recent versions of bitreq. Disabling a debug assertions for that crate.

See: rust-bitcoin/corepc#584

@delbonis delbonis requested review from bewakes and storopoli May 19, 2026 23:45
Copy link
Copy Markdown
Member

@storopoli storopoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK ce1a8af

1 minor non-blocking nit.

Comment thread Cargo.toml
Comment on lines +499 to +504
# Disable debug_assertions in bitreq to dodge a known concurrency race in its
# `next_request_id >= readable_request_id` invariant, which fires under
# concurrent bitcoind RPC traffic in coverage/debug builds. Tracked upstream at
# https://github.com/rust-bitcoin/corepc/issues/583 (PR #584 unmerged).
[profile.dev.package.bitreq]
debug-assertions = false
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a TODO(STR-XXXX) comment here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

@storopoli storopoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK c5e3bef

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants