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

fix: cdk603 error calculating previousLocalExitRoot #199

Merged
merged 12 commits into from
Nov 27, 2024

Conversation

joanestebanr
Copy link
Contributor

@joanestebanr joanestebanr commented Nov 25, 2024

Description

Since agglayer:0.2.0-rc.15 the responses of CertificateHeader add a new field: PreviousLocalExitRoot

  • Fixes error calculating previousLocalExitRoot on new certificate if a certificate is inError

NOTE: Database incompatibility with previous version!, require to delete it!

@joanestebanr joanestebanr marked this pull request as ready for review November 26, 2024 11:47
@joanestebanr joanestebanr changed the title Fix: cdk603 error calculating previousLocalExitRoot fix: cdk603 error calculating previousLocalExitRoot Nov 26, 2024
@joanestebanr joanestebanr marked this pull request as draft November 26, 2024 11:52
Copy link

sonarcloud bot commented Nov 27, 2024

@joanestebanr joanestebanr marked this pull request as ready for review November 27, 2024 08:53
@joanestebanr joanestebanr merged commit 521b968 into release/v0.5.0 Nov 27, 2024
18 checks passed
@joanestebanr joanestebanr deleted the fix/cdk603-previousLER_error-v2 branch November 27, 2024 09:14
@@ -6,6 +6,7 @@ CREATE TABLE certificate_info (
height INTEGER NOT NULL,
certificate_id VARCHAR NOT NULL PRIMARY KEY,
status INTEGER NOT NULL,
previous_local_exit_root VARCHAR ,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
previous_local_exit_root VARCHAR ,
previous_local_exit_root VARCHAR,


return fmt.Sprintf("Height: %d, CertificateID: %s, NewLocalExitRoot: %s. Status: %s. Errors: [%s]",
c.Height, c.CertificateID.String(), c.NewLocalExitRoot.String(), c.Status.String(), errors)
previousLocalExitRoot := "nil"
Copy link
Contributor

Choose a reason for hiding this comment

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

use the nilStr constant?

@@ -23,6 +23,8 @@ const (
Candidate
InError
Settled

nilStr = "nil"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this needed, agglayer API?

@@ -283,7 +285,7 @@ func TestAggSenderStart(t *testing.T) {
ctx,
log.WithFields("test", "unittest"),
Config{
StoragePath: "file::memory:?cache=shared",
StoragePath: "file:TestAggSenderStart?mode=memory&cache=shared",
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we 100% sure this is using memory or a file with this name?

Stefan-Ethernal pushed a commit that referenced this pull request Nov 27, 2024
Support `agglayer:0.2.0-rc.15` the responses of ` CertificateHeader` add a new field: `PreviousLocalExitRoot`
- Fixes error calculating  previousLocalExitRoot on new certificate if a certificate is inError

NOTE: **Database incompatibility with previous version!, require to delete it!**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants