Skip to content

Make block offset configurable#865

Merged
tynes merged 3 commits intofeat/batch-submitter-impersonationfrom
feat/make-block-offset-configurable
May 13, 2021
Merged

Make block offset configurable#865
tynes merged 3 commits intofeat/batch-submitter-impersonationfrom
feat/make-block-offset-configurable

Conversation

@karlfloersch
Copy link
Copy Markdown
Contributor

Description
The BLOCK_OFFSET needs to be configurable.

Additional context
It is required because because sometimes Geth has more or fewer blocks than L1

@karlfloersch karlfloersch requested a review from annieke as a code owner May 13, 2021 03:52
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented May 13, 2021

🦋 Changeset detected

Latest commit: 1ca8d31

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@eth-optimism/batch-submitter Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@karlfloersch karlfloersch force-pushed the feat/make-block-offset-configurable branch from deb806c to 63c8984 Compare May 13, 2021 04:00
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 13, 2021

Codecov Report

Merging #865 (1c0b486) into feat/batch-submitter-impersonation (034406a) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@                         Coverage Diff                         @@
##           feat/batch-submitter-impersonation     #865   +/-   ##
===================================================================
  Coverage                               82.21%   82.21%           
===================================================================
  Files                                      48       48           
  Lines                                    1895     1895           
  Branches                                  303      303           
===================================================================
  Hits                                     1558     1558           
  Misses                                    337      337           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 034406a...1c0b486. Read the comment docs.

@karlfloersch karlfloersch force-pushed the feat/make-block-offset-configurable branch from 63c8984 to 8738e2d Compare May 13, 2021 04:08
public async _getBatchStartAndEnd(): Promise<Range> {
this.logger.info('Getting batch start and end for state batch submitter...')
// TODO: Remove BLOCK_OFFSET by adding a tx to Geth's genesis
// TODO: Remove blockOffset by adding a tx to Geth's genesis
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can remove this todo

DEBUG_IMPERSONATE_SEQUENCER_ADDRESS = env.DEBUG_IMPERSONATE_SEQUENCER_ADDRESS
DEBUG_IMPERSONATE_PROPOSER_ADDRESS = env.DEBUG_IMPERSONATE_PROPOSER_ADDRESS
if (
!DEBUG_IMPERSONATE_SEQUENCER_ADDRESS ||
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This needs to be !a && !b

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

right now it says if either is set then throw an error. I think we should just enforce setting both of them

@tynes tynes merged this pull request into feat/batch-submitter-impersonation May 13, 2021
@tynes tynes deleted the feat/make-block-offset-configurable branch May 13, 2021 05:45
tynes added a commit that referenced this pull request May 13, 2021
* feat: make block offset configurable

* Add a USE_HARDHAT config

* batch-submitter: must pass both impersonate options (#866)

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
tynes added a commit that referenced this pull request May 13, 2021
* feat: add config for impersonating accounts to BS

Useful for testing against hardhat forks.

* Make block offset configurable (#865)

* feat: make block offset configurable

* Add a USE_HARDHAT config

* batch-submitter: must pass both impersonate options (#866)

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>

* batch-submitter: update example env

* batch-submitter: lint fix

* batch-submitter: clean up old comments

* batch-submitter: USE_HARDHAT

* batch-submitter: add error messages

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
InoMurko pushed a commit to omgnetwork/optimism that referenced this pull request May 25, 2021
)

* feat: add config for impersonating accounts to BS

Useful for testing against hardhat forks.

* Make block offset configurable (ethereum-optimism#865)

* feat: make block offset configurable

* Add a USE_HARDHAT config

* batch-submitter: must pass both impersonate options (ethereum-optimism#866)

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>

* batch-submitter: update example env

* batch-submitter: lint fix

* batch-submitter: clean up old comments

* batch-submitter: USE_HARDHAT

* batch-submitter: add error messages

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
theochap pushed a commit that referenced this pull request Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-op-batcher Area: op-batcher

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants