Fix BlockEpilogue silently skipping write-set changes - #58
Open
sausagee wants to merge 3 commits into
Open
Conversation
Block epilogue transactions can include write-set changes (block gas limit / BlockResource updates). Transaction::from_transaction dropped those rows, so parquet write_set_changes, move_resources, and move_modules never indexed them. Co-authored-by: Young Yang Liauw <sausagee@users.noreply.github.com>
CI Lint: apply cargo +nightly fmt so rustfmt --check passes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
Transaction::from_transactiondiscarded write-set changes onTxnData::BlockEpilogue. Those transactions can (and do) carry resource writes — e.g. block gas-limit /BlockResourceupdates — so the parquet default processor never indexed the correspondingwrite_set_changes,move_resources, ormove_modulesrows.This is a silent skip, not a crash. Postgres
process_transactionsalready walkstransaction_info.changesfor every txn type, so table items/modules on the postgres path were fine; only the parquet path viafrom_transactiondropped them.Not covered by open PRs #16–#57. Same class of skip as aptos-labs#148.
Root cause
The
BlockEpiloguematch arm returned emptywsc/wsc_detailvectors instead of callingWriteSetChangeModel::from_write_set_changes, unlikeUser,Genesis,BlockMetadata, andValidator.Fix
Parse write-set changes for epilogue txns the same way as other change-bearing types.
num_eventsstays 0 (epilogue txns have no events).Tests
cargo test -p processor --lib processors::default::models::transactions::tests::block_epilogue_indexes_write_set_changescargo clippy -p processor --lib(correctness lints clean)Aikido scan was not run: the Aikido MCP requires an interactive sign-in that is not available in this environment.