feat(transaction): mempool observation, inclusion, 7d outcome and replacement models#296
Draft
samcm wants to merge 3 commits into
Draft
feat(transaction): mempool observation, inclusion, 7d outcome and replacement models#296samcm wants to merge 3 commits into
samcm wants to merge 3 commits into
Conversation
…lacement models Adds a transaction lifecycle DAG built from two newly wired externals (mempool_transaction, canonical_beacon_block_execution_transaction): - int_transaction_mempool_observation_hourly: one row per (hour, hash), raw sightings scanned exactly once per processed hour - fct_transaction_inclusion: one row per canonically included transaction, post-Merge history, no mempool or relay dependency - fct_transaction_mempool_outcome_7d: one immutable row per observed hash stating its fixed-horizon outcome (included | nonce_consumed | unincluded) - fct_transaction_replacement: per-attempt rows for multi-attempt nonce groups, resolved at winner inclusion or horizon expiry - hourly/daily aggregates for inclusion (build path, per-type counts) and mempool outcomes (cohort counts, wait quantiles with sample counts) Also fixes the hardcoded compose network name in the proto Makefile target, which broke proto generation for non-default project names. Claude-Session: https://claude.ai/code/session_01ExxLHnCeVEFDwUKZeUchdE
…dels Fixtures generated via xcli generate-transformation-test against mainnet production data and uploaded to R2. Row-count assertions on the 7d-horizon models tolerate empty output because short CI seed windows cannot satisfy the fill buffer. Claude-Session: https://claude.ai/code/session_01ExxLHnCeVEFDwUKZeUchdE
… Bool-typed test assertions clickhouse-proto-gen camel-cases type_0_count to Type_0Count in messages but Type0Count in query helpers, producing uncompilable code. typeN_count resolves identically on both paths. The removed replacement assertions compared Bool columns against ints, which the test harness rejects. Claude-Session: https://claude.ai/code/session_01ExxLHnCeVEFDwUKZeUchdE
Savid
approved these changes
Jul 16, 2026
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.
Wires two new externals (mempool_transaction, canonical_beacon_block_execution_transaction) into CBT and adds eight transaction lifecycle models: hourly mempool observations per hash, canonical inclusions covering post-Merge history, fixed-horizon 7 day mempool outcomes (included, nonce_consumed or unincluded), per-attempt rows for multi-attempt nonce groups, and hourly/daily aggregates for inclusions and outcomes. Also fixes the hardcoded compose network name in the proto Makefile target, which broke proto generation for non-default project names.
Verified in hybrid mode against mainnet production data: fct_transaction_inclusion reconciles exactly with the source for a full day (2,239,450 rows both sides, 100% block_number join coverage) and int_transaction_mempool_observation_hourly reconciles exactly for a full hour (283,383 hashes, 2,109,559 sightings). The 7d-horizon models (fct_transaction_mempool_outcome_7d, fct_transaction_replacement) rely on
fill.buffer, so their live verification needs a 7+ day backfill window and is still pending; their row-count test assertions tolerate empty output because short CI seed windows cannot satisfy the buffer. Deployments should floor the mempool-dependent models at each network's mempool data start (mainnet: 2024-01-01).fill.bufferrequires a cbt release that includes FillConfig.Buffer.https://claude.ai/code/session_01ExxLHnCeVEFDwUKZeUchdE