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

Feature/agg oracle #23

Merged
merged 19 commits into from
Aug 1, 2024
Merged

Feature/agg oracle #23

merged 19 commits into from
Aug 1, 2024

Conversation

arnaubennassar
Copy link
Contributor

No description provided.

@arnaubennassar arnaubennassar marked this pull request as ready for review July 26, 2024 15:36
Copy link
Collaborator

@Stefan-Ethernal Stefan-Ethernal left a comment

Choose a reason for hiding this comment

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

Generally LGTM (and good job), but leaving some comments to consider.

Dockerfile Outdated Show resolved Hide resolved
common/common.go Outdated Show resolved Hide resolved
common/common.go Outdated Show resolved Hide resolved
common/common.go Outdated Show resolved Hide resolved
common/common.go Outdated Show resolved Hide resolved
l1infotreesync/processor.go Outdated Show resolved Hide resolved
sync/evmdriver.go Show resolved Hide resolved
aggoracle/oracle.go Outdated Show resolved Hide resolved
aggoracle/oracle.go Outdated Show resolved Hide resolved
sync/evmdownloader.go Outdated Show resolved Hide resolved
@arnaubennassar arnaubennassar self-assigned this Jul 30, 2024
aggoracle/chaingersender/evm.go Outdated Show resolved Hide resolved
aggoracle/chaingersender/evm.go Outdated Show resolved Hide resolved
aggoracle/oracle.go Outdated Show resolved Hide resolved
aggoracle/oracle.go Outdated Show resolved Hide resolved
config/config.go Show resolved Hide resolved
l1infotreesync/downloader.go Show resolved Hide resolved
l1infotreesync/l1infotreesync.go Outdated Show resolved Hide resolved
sync/common.go Outdated
)

var (
RetryAfterErrorPeriod = time.Second * 10
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe is better to be able to configure this values

if len(blocks) == 0 || blocks[len(blocks)-1].Num < l.BlockNumber {
b := d.getBlockHeader(ctx, l.BlockNumber)
blocks = append(blocks, EVMBlock{
EVMBlockHeader: EVMBlockHeader{
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are you creating an empty block?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if this block number is not yet added in the form of EVMBlock into blocks, we need to create it and prepare this new block so the appender can append events into it. Note that we only do this operation when there are relevant blocks, and the block is not yet added into blocks

sync/common.go Show resolved Hide resolved
Copy link

sonarcloud bot commented Aug 1, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
0.0% Coverage on New Code (required ≥ 80%)
6.9% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@arnaubennassar arnaubennassar merged commit 880bccb into develop Aug 1, 2024
2 of 7 checks passed
@arnaubennassar arnaubennassar deleted the feature/aggOracle branch August 1, 2024 09:37
Stefan-Ethernal added a commit that referenced this pull request Sep 17, 2024
* implementation completed, missing tests

* WIP

* WIP

* WIP

* sync refactor

* decouple sync processors from EVM

* Add CLI for aggOracle

* WIP

* wip

* WIP

* start reorg detector

* fix docker

* pass test with docker

* add TODO

* go mod tidy

* Add PR review suggestions from Stefan-Ethernal

* fix UTs

* Add PR review suggestions from joanestebanr

---------

Co-authored-by: Stefan Negovanović <[email protected]>
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.

4 participants