Skip to content

STR-2613 restructure tx types#1508

Open
delbonis wants to merge 10 commits intomainfrom
STR-2613-restructure-tx-types
Open

STR-2613 restructure tx types#1508
delbonis wants to merge 10 commits intomainfrom
STR-2613-restructure-tx-types

Conversation

@delbonis
Copy link
Contributor

Description

This PR is VERY INCOMPLETE.

This cleans up a bunch of issues that escaped notice with the tx types, especially meshing the chain types with the snark account update types. This more cleanly splits out the accumulator proofs that accompany update data into a separate structure as part of the full transaction, so that we can define a "txid" concept independently. There was a pretty significant issue where we separately describe the entry hash in an accumulator twice, once in the claim and once in the proof. This makes it easy for us to accidentally check one value but use a different one, when the value should simply not be provided twice.

Unfortunately this is quite more complicated than I anticipated, as it touches multiple crates and I haven't even gotten done finishing the main change itself yet!

Changes include:

  • moving MessageEntry to strata-acct-types
  • using RawMerkleProof in more places
  • defining more parts of snark update txs in strata-ol-chain-types-new

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

@delbonis delbonis requested a review from krsnapaudel March 16, 2026 22:45
@delbonis delbonis marked this pull request as ready for review March 19, 2026 20:15
@delbonis delbonis requested review from a team as code owners March 19, 2026 20:15
@delbonis delbonis requested a review from storopoli March 19, 2026 20:16
@delbonis
Copy link
Contributor Author

This is still partially in progress but the bulk of the work is done now. I want to rework tx assembly a bit to improve ergonomics and maybe clean up tests some more.

Copy link
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.

Skimmed through the changes.


impl SnarkAccountUpdateTxPayload {
pub fn new(target: AccountId, update_container: SnarkAccountUpdateContainer) -> Self {
impl SauTxPayload {
Copy link
Contributor

Choose a reason for hiding this comment

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

SauTxPayload

This is not a good name. Let's not invent acronyms like this which are confusing and not widely known.

Can we drop Snark instead?

Copy link
Contributor Author

@delbonis delbonis Mar 20, 2026

Choose a reason for hiding this comment

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

Dropping "snark" from the name implies that it could be valid to update other types of accounts (like EE sequencer fee accounts) using this transaction type. I'm open to hearing other suggestions.

@delbonis delbonis force-pushed the STR-2613-restructure-tx-types branch from 1ff1919 to f7c4e5c Compare March 20, 2026 16:25
@delbonis delbonis requested a review from a team as a code owner March 20, 2026 16:25
@github-actions
Copy link
Contributor

Commit: a11f1ca

SP1 Execution Results

program cycles success
EVM EE STF 1,321,255
Checkpoint 5,226
Checkpoint New 882,889

@codecov
Copy link

codecov bot commented Mar 20, 2026

Codecov Report

❌ Patch coverage is 89.35361% with 112 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.40%. Comparing base (3356f55) to head (f7c4e5c).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
crates/ol/mempool/src/state.rs 14.70% 29 Missing ⚠️
crates/acct-types/src/messages.rs 58.00% 21 Missing ⚠️
crates/ol/chain-types/src/transaction.rs 91.75% 15 Missing ⚠️
crates/ol/stf/src/proof_verification.rs 81.66% 11 Missing ⚠️
crates/ol/rpc/types/src/tx.rs 65.51% 10 Missing ⚠️
crates/ol/stf/src/test_utils.rs 93.75% 8 Missing ⚠️
crates/ol/block-assembly/src/block_assembly.rs 91.07% 5 Missing ⚠️
crates/ol/mempool/src/test_utils.rs 95.65% 3 Missing ⚠️
crates/ol/mempool/src/types.rs 96.29% 3 Missing ⚠️
crates/snark-acct-runtime/src/message.rs 0.00% 3 Missing ⚠️
... and 2 more

❗ There is a different number of reports uploaded between BASE (3356f55) and HEAD (f7c4e5c). Click for more details.

HEAD has 3 uploads less than BASE
Flag BASE (3356f55) HEAD (f7c4e5c)
unit 2 1
functional 2 0
@@             Coverage Diff             @@
##             main    #1508       +/-   ##
===========================================
- Coverage   84.34%   65.40%   -18.95%     
===========================================
  Files         802      802               
  Lines       75697    76340      +643     
===========================================
- Hits        63846    49927    -13919     
- Misses      11851    26413    +14562     
Flag Coverage Δ
functional ?
unit 65.40% <89.35%> (-0.24%) ⬇️

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

Files with missing lines Coverage Δ
bin/alpen-client/src/rpc_client.rs 33.83% <ø> (-60.91%) ⬇️
bin/strata/src/rpc/node_tests.rs 99.33% <100.00%> (+<0.01%) ⬆️
crates/acct-types/src/accumulators.rs 100.00% <100.00%> (ø)
crates/acct-types/src/effects.rs 100.00% <100.00%> (ø)
crates/alpen-ee/block-assembly/src/block.rs 0.00% <ø> (-100.00%) ⬇️
crates/alpen-ee/common/src/traits/ol_client.rs 66.66% <ø> (ø)
...s/alpen-ee/common/src/traits/storage/exec_block.rs 99.71% <ø> (ø)
crates/alpen-ee/common/src/types/exec_record.rs 95.38% <ø> (-4.62%) ⬇️
...-ee/database/src/serialization_types/exec_block.rs 100.00% <ø> (ø)
...rates/alpen-ee/sequencer/src/block_builder/task.rs 32.34% <ø> (-65.96%) ⬇️
... and 37 more

... and 390 files with indirect coverage changes

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

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.

2 participants