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

feat: report error in case agglayer returns lower height than in storage #209

Conversation

Stefan-Ethernal
Copy link
Collaborator

Description

The PR returns an error in case agglayer returns lower height for the last certificate than the one found in the aggsender's local storage.

@Stefan-Ethernal Stefan-Ethernal force-pushed the CDK-604-aggsender-error-if-agglayer-reported-a-lower-certificate-than-aggsender branch from ef57590 to 7c30c5d Compare November 28, 2024 12:02
@Stefan-Ethernal Stefan-Ethernal self-assigned this Nov 28, 2024
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
75.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@Stefan-Ethernal Stefan-Ethernal merged commit f9e53b7 into release/v0.5.0 Nov 29, 2024
10 of 11 checks passed
@Stefan-Ethernal Stefan-Ethernal deleted the CDK-604-aggsender-error-if-agglayer-reported-a-lower-certificate-than-aggsender branch November 29, 2024 15:12
Vui-Chee added a commit to okx/xlayer-cdk that referenced this pull request Dec 3, 2024
* tag 'v0.5.0-beta6':
  feat: write on database the number of retries per certificate and the certificates in a history table (0xPolygon#208)
  feat: return an error in case agglayer returns certificate with height lower than in local storage (0xPolygon#209)
  chore: simplify the `HashMeddler` (0xPolygon#205)
  fix: clean proof table on start (0xPolygon#207) (0xPolygon#210)
  feat: improve logs (0xPolygon#204)
  fix: cdk603 error calculating previousLocalExitRoot (0xPolygon#199)
  fix: Integration Bali PP (0xPolygon#198)
  feat: check agglayer certificate and use as initial if db is empty (0xPolygon#192)
  feat: sqlite aggregator (0xPolygon#189)
  feat: BridgeMessage e2e test (0xPolygon#184)
  feat: aggsender e2e (0xPolygon#183)
  fix: aggregating proofs (0xPolygon#191) (0xPolygon#193)
  feat: l1infotreesync can be run as individual component (0xPolygon#188)
  fix: l1infotree flaky test (0xPolygon#182)
  fix: `L1InfoRootIncorrect` error from `agglayer` (0xPolygon#185)
  feat: improve aggsender logs (0xPolygon#186) (0xPolygon#187)
  feat: remove sanity check (0xPolygon#178) (0xPolygon#179)
  refact: GetSequence method (0xPolygon#169)
  feat: epoch notifier (0xPolygon#144)
  feat: unpack and log agglayer errors (0xPolygon#158)
Vui-Chee added a commit to okx/xlayer-cdk that referenced this pull request Dec 4, 2024
* dev: (22 commits)
  fix issues
  feat: healthcheck (#11)
  feat: write on database the number of retries per certificate and the certificates in a history table (0xPolygon#208)
  feat: return an error in case agglayer returns certificate with height lower than in local storage (0xPolygon#209)
  chore: simplify the `HashMeddler` (0xPolygon#205)
  fix: clean proof table on start (0xPolygon#207) (0xPolygon#210)
  feat: improve logs (0xPolygon#204)
  fix: cdk603 error calculating previousLocalExitRoot (0xPolygon#199)
  fix: Integration Bali PP (0xPolygon#198)
  feat: check agglayer certificate and use as initial if db is empty (0xPolygon#192)
  feat: sqlite aggregator (0xPolygon#189)
  feat: BridgeMessage e2e test (0xPolygon#184)
  feat: aggsender e2e (0xPolygon#183)
  fix: aggregating proofs (0xPolygon#191) (0xPolygon#193)
  feat: l1infotreesync can be run as individual component (0xPolygon#188)
  fix: l1infotree flaky test (0xPolygon#182)
  fix: `L1InfoRootIncorrect` error from `agglayer` (0xPolygon#185)
  feat: improve aggsender logs (0xPolygon#186) (0xPolygon#187)
  feat: remove sanity check (0xPolygon#178) (0xPolygon#179)
  refact: GetSequence method (0xPolygon#169)
  ...
joanestebanr pushed a commit that referenced this pull request Dec 4, 2024
joanestebanr added a commit that referenced this pull request Dec 4, 2024
* feat: limit cert by estimated size (#217)

This set a limit on certificate size that can be set on config file (the size of certificate it's an estimation)
There are a special situation that is going to send a certificate bigger than maximium:
- [ initial_block, end_block ] -> size exceed
- [ initial_block, (end_block -1) ] -> no bridges, so we have to send previous one even that exceed the maximum size

MaxCertSize: max size in bytes of certificate. Default 8Mb. Currently the maximum on Agglayer is 10Mb
```
[AggSender]
MaxCertSize = 8388608
```

* feat: return an error in case agglayer returns certificate with height lower than in local storage (#209)


---------

Co-authored-by: Stefan Negovanović <93934272+Stefan-Ethernal@users.noreply.github.com>
joanestebanr pushed a commit that referenced this pull request Dec 19, 2024
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.

2 participants