Skip to content

fix(asm): add checkpoint_txid to CheckpointTipUpdate log#1456

Open
irnb wants to merge 2 commits intomainfrom
fix/checkpoint-tip-update-add-txid
Open

fix(asm): add checkpoint_txid to CheckpointTipUpdate log#1456
irnb wants to merge 2 commits intomainfrom
fix/checkpoint-tip-update-add-txid

Conversation

@irnb
Copy link
Contributor

@irnb irnb commented Mar 4, 2026

The CheckpointTipUpdate log was missing the L1 transaction ID that
carried the checkpoint transaction. The txid is needed on the consumer side to reference the originating L1 transaction and fetch checkpoint tx witness.

Description

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

  The v1 CheckpointTipUpdate log was missing the L1 transaction ID that
  carried the checkpoint transaction. The txid is needed on the consumer                                                                         side to reference the originating L1 transaction.
@irnb irnb requested review from a team as code owners March 4, 2026 07:11
@irnb irnb self-assigned this Mar 4, 2026
@codecov
Copy link

codecov bot commented Mar 4, 2026

Codecov Report

❌ Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.30%. Comparing base (11c49a8) to head (d38e9d6).
⚠️ Report is 16 commits behind head on main.

Files with missing lines Patch % Lines
crates/asm/subprotocols/checkpoint/src/handler.rs 0.00% 2 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (11c49a8) and HEAD (d38e9d6). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (11c49a8) HEAD (d38e9d6)
functional 1 0
@@            Coverage Diff             @@
##             main    #1456      +/-   ##
==========================================
- Coverage   73.49%   64.30%   -9.20%     
==========================================
  Files         779      777       -2     
  Lines       73386    73281     -105     
==========================================
- Hits        53936    47121    -6815     
- Misses      19450    26160    +6710     
Flag Coverage Δ
functional ?
unit 64.30% <80.00%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
crates/asm/logs/src/checkpoint.rs 79.36% <100.00%> (+2.17%) ⬆️
crates/asm/subprotocols/checkpoint/src/handler.rs 0.00% <0.00%> (-78.38%) ⬇️

... and 222 files with indirect coverage changes

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Commit: 7c7849a

SP1 Execution Results

program cycles success
EVM EE STF 1,322,182
CL STF 906,487
Checkpoint 2,249
Checkpoint New 884,283

let l2_commitment = OLBlockCommitment::new(42, OLBlockId::from(Buf32::from([0xAB; 32])));
let tip = CheckpointTip::new(7, 100, l2_commitment);
let update = CheckpointTipUpdate::new(tip);
let txid = Buf32::from([0xCD; 32]);
Copy link
Contributor

Choose a reason for hiding this comment

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

I see tests use hardcoded values. I have tried my best to replace tests like these with proptest based tests. Can we do that?

Comment on lines +93 to +104

/// Txid of the L1 transaction that carried the checkpoint tx.
checkpoint_txid: Buf32,
}

impl CheckpointTipUpdate {
/// Creates a new [`CheckpointTipUpdate`] from a [`CheckpointTip`].
pub fn new(tip: CheckpointTip) -> Self {
/// Creates a new [`CheckpointTipUpdate`] from a [`CheckpointTip`] and the
/// raw txid bytes of the L1 transaction that carried the checkpoint.
pub fn new(tip: CheckpointTip, checkpoint_txid: Buf32) -> Self {
Self {
tip: CodecSsz::new(tip),
checkpoint_txid,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be txid or wtxid?

@irnb irnb added the DO NOT MERGE This PR should not be merged as long as this tag is present. label Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DO NOT MERGE This PR should not be merged as long as this tag is present.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants