Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update espresso-sequencer-go with new LC ABI #230

Merged
merged 3 commits into from
Sep 17, 2024
Merged

Conversation

sveitser
Copy link
Collaborator

Instead of using the block height from the first snapshot after the height in the justification it uses the latest height in the LC contract. Currently not 100% convinced about correctness but also believe it should work because any newer tree still contains the header of interest.

Closes #229

Instead of using the block height from the first snapshot after the
height in the justification it uses the latest height in the LC
contract. Currently not 100% convinced about correctness but also
believe it should work because any newer tree still contains the header
of interest.
@sveitser sveitser mentioned this pull request Sep 16, 2024
2 tasks
@@ -506,23 +506,28 @@ func (b *BatchPoster) addEspressoBlockMerkleProof(
return fmt.Errorf("this msg has not been included in hotshot")
}

snapshot, err := b.lightClientReader.FetchMerkleRoot(jst.Header.Height, nil)
_, err = b.lightClientReader.FetchMerkleRoot(jst.Header.Height, nil)

Choose a reason for hiding this comment

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

Do we need to fetch the merkle root now?

Copy link
Member

Choose a reason for hiding this comment

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

It seems that the only thing we needed from the snapshot was the hotshot height. I think were fine to remove this now.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we still need this call at all?

@nomaxg
Copy link
Collaborator

nomaxg commented Sep 16, 2024

This seems correct because the validated height should be equivalent to the latest snapshot height

We're not comfortable with the previous change because making a proof
w.r.t to the newest finalized state may cause issues if the batch poster
is lagging behind. This is currently not easy to test so we decided to
revert back to the old flow.
@sveitser sveitser marked this pull request as ready for review September 17, 2024 06:35
@sveitser sveitser enabled auto-merge (squash) September 17, 2024 06:38
@sveitser sveitser merged commit 9fc3cb1 into integration Sep 17, 2024
9 checks passed
@sveitser sveitser deleted the ma/update-lc-abi branch September 17, 2024 18:22
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.

Update Light Client ABI
4 participants