Skip to content

Fix account_transactions silently dropping BlockEpilogue write-sets - #65

Open
sausagee wants to merge 2 commits into
mainfrom
cursor/fix-account-txn-epilogue-accounts-997a
Open

Fix account_transactions silently dropping BlockEpilogue write-sets#65
sausagee wants to merge 2 commits into
mainfrom
cursor/fix-account-txn-epilogue-accounts-997a

Conversation

@sausagee

@sausagee sausagee commented Sep 6, 2026

Copy link
Copy Markdown

Bug

AccountTransaction::get_accounts returned an empty set for TxnData::BlockEpilogue (and StateCheckpoint) before walking transaction_info.changes. Block epilogues write resources — e.g. 0x1::block::BlockResource — so those accounts never appeared in account_transactions.

This is a silent skip, not a crash. Distinct from #58, which only fixed the parquet default processor's Transaction::from_transaction path (write_set_changes / move_resources). This is the account_transactions processor / table.

Not covered by open PRs #16#64.

Root cause

The match on txn_data treated anything other than User / Genesis / BlockMetadata / Validator as “no accounts” and returned immediately. Events and signatures are type-specific; write-set resource accounts are not.

Fix

Keep events/signatures type-specific. Always walk write-set WriteResource / DeleteResource addresses so epilogue (and other change-bearing) txns are indexed.

Tests

  • cargo test -p processor --lib processors::account_transactions::account_transactions_model::tests::block_epilogue_indexes_write_set_accountsok
  • cargo clippy -p processor --lib -- -A clippy::all -W clippy::correctnessclean

Aikido scan was not run: the Aikido MCP requires an interactive sign-in that is not available in this environment.

Open in Web Open in Cursor 

BlockEpilogue (and other non-User/Genesis/BlockMetadata/Validator types)
returned an empty account set before walking transaction_info.changes.
Epilogues write resources such as 0x1::block::BlockResource, so those
accounts were never indexed.

Walk write-set resource accounts for every txn type; only events and
signatures remain type-specific.

Co-authored-by: Young Yang Liauw <sausagee@users.noreply.github.com>
@sausagee
sausagee marked this pull request as ready for review September 6, 2026 16:46
@sausagee
sausagee changed the base branch from main to fix/lint-stable-xclippy September 7, 2026 22:19
@sausagee
sausagee changed the base branch from fix/lint-stable-xclippy to main September 7, 2026 22:31
Stack the CI unblocker files from PR #70 (stable cargo xclippy, bookworm Dockerfiles with make) onto this bugfix branch so CI can go green while #70 awaits review. Merge target remains main; this does not merge #70.
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