Skip to content

Simplifying block subscription#267

Merged
willmeister merged 3 commits intomasterfrom
fixingPastToFutureBlockSyncingTransition
Sep 21, 2020
Merged

Simplifying block subscription#267
willmeister merged 3 commits intomasterfrom
fixingPastToFutureBlockSyncingTransition

Conversation

@willmeister
Copy link

Description

Simplifies block subscription by finalizing the block X blocks ago when a block is received. Also adds more tests for the transition between syncing past blocks and current/future blocks.

Contributing Agreement

Copy link
Contributor

@karlfloersch karlfloersch left a comment

Choose a reason for hiding this comment

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

Alright this looks great! The test coverage seems very solid and logic really doesn't feel like it should be too complex. LGTM!

})
})
})
})
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!!!

if (blockNumber < this.earliestBlock) {
const finalizedBlockNumber = this.getBlockFinalizedBy(blockNumber)

if (finalizedBlockNumber < this.earliestBlock) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah ok 👍

@willmeister willmeister merged commit 26b5c5c into master Sep 21, 2020
@willmeister willmeister deleted the fixingPastToFutureBlockSyncingTransition branch September 21, 2020 13:08
snario pushed a commit that referenced this pull request Apr 14, 2021
protolambda pushed a commit to protolambda/optimism that referenced this pull request May 1, 2022
shenkeyao referenced this pull request in EspressoSystems/optimism-espresso-integration Mar 1, 2025
This change deletes bad blocks at migration time, since we don't need
to keep historical bad blocks and if not transformed like the other migrated
blocks can lead to panics when trying to load them (which happens when
a new bad block is discovered).

I've tested this locally, by taking a datdir where bad blocks could be
retrieved via `geth db get 0x496e76616c6964426c6f636b` and migrated
it and verified that then the bad blocks cannot be retrieved which looks like this:

INFO [10-28|13:00:32.736] Get operation failed   error="leveldb: not found"

Since the key is not present.
QuentinI referenced this pull request in EspressoSystems/optimism-espresso-integration Mar 7, 2025
This change deletes bad blocks at migration time, since we don't need
to keep historical bad blocks and if not transformed like the other migrated
blocks can lead to panics when trying to load them (which happens when
a new bad block is discovered).

I've tested this locally, by taking a datdir where bad blocks could be
retrieved via `geth db get 0x496e76616c6964426c6f636b` and migrated
it and verified that then the bad blocks cannot be retrieved which looks like this:

INFO [10-28|13:00:32.736] Get operation failed   error="leveldb: not found"

Since the key is not present.
theochap pushed a commit that referenced this pull request Dec 10, 2025
Zena-park pushed a commit to tokamak-network/optimism that referenced this pull request Dec 30, 2025
…mism#267

We advise the same modifiers to be applied, ensuring that the contract is in a valid state whenever a candidate is created.
theochap pushed a commit that referenced this pull request Jan 15, 2026
### Description

Adds zlib compression to the `ChannelOut`.

Closes #267
theochap pushed a commit that referenced this pull request Jan 21, 2026
### Description

Adds zlib compression to the `ChannelOut`.

Closes #267
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.

2 participants