Skip to content

Conversation

@prestwich
Copy link
Member

Summary

  • Add test_transaction_hash_indexing unit test to signet-db verifying transaction hashes are correctly written to the TransactionHashNumbers index
  • Add test_system_tx_hash_consistency integration test verifying system tx hashes survive consecutive block processing and are lookable via RPC
  • Extend test_stateful_rpc_calls to cover blocks containing both alloy and host Transact system transactions
  • Add start_ru_block / start_host_block convenience methods to SignetTestContext
  • Remove leftover debugging scaffolding (dbg!, dump_index_state, verbose debug panics, stale comments)

Test plan

  • cargo clippy -p signet-db --all-features --all-targets passes
  • cargo clippy -p signet-node-tests --all-features --all-targets passes
  • cargo +nightly fmt clean
  • cargo t -p signet-db — all 6 tests pass (3 unit + 3 integration)
  • Node-tests are #[ignore] by default — manual run optional

🤖 Generated with Claude Code

…lding

Add tests verifying system transaction hashes are properly indexed and
lookable via eth_getTransactionByHash. Extend existing RPC tests to
cover blocks containing both alloy and host Transact system transactions.
Remove leftover debugging helpers (dbg!, dump_index_state, verbose debug
panics) from active investigation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@prestwich prestwich requested a review from a team as a code owner February 11, 2026 20:08
@prestwich
Copy link
Member Author

tests written during bug review. seems valuable to simply include them

@prestwich prestwich enabled auto-merge (squash) February 11, 2026 20:09
Copy link
Contributor

@Fraser999 Fraser999 left a comment

Choose a reason for hiding this comment

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

One non-blocking comment.

Comment on lines +226 to +232
// Two logs: one from the host transact, one from the alloy tx
assert_eq!(logs.len(), 2);
let log_inner = &logs[0].inner;
assert_eq!(log_inner.address, *contract.address());
// First increment is from the host transact (system tx runs first)
assert_eq!(log_inner.topics(), &[Counter::Count::SIGNATURE_HASH, B256::with_last_byte(1)]);
// Second increment is from the alloy tx
Copy link
Contributor

Choose a reason for hiding this comment

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

According to claude:

Suggested change
// Two logs: one from the host transact, one from the alloy tx
assert_eq!(logs.len(), 2);
let log_inner = &logs[0].inner;
assert_eq!(log_inner.address, *contract.address());
// First increment is from the host transact (system tx runs first)
assert_eq!(log_inner.topics(), &[Counter::Count::SIGNATURE_HASH, B256::with_last_byte(1)]);
// Second increment is from the alloy tx
// Two logs: one from the alloy tx, one from the host transact
assert_eq!(logs.len(), 2);
let log_inner = &logs[0].inner;
assert_eq!(log_inner.address, *contract.address());
// First increment is from the alloy tx (regular txs execute before system txs)
assert_eq!(log_inner.topics(), &[Counter::Count::SIGNATURE_HASH, B256::with_last_byte(1)]);
// Second increment is from the host transact (system tx)

@prestwich prestwich merged commit d40a1c2 into main Feb 12, 2026
6 checks passed
prestwich added a commit that referenced this pull request Feb 12, 2026
Regular txs execute before system txs, not the other way around.

Drive-by from #74 (comment)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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