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

clean up exchange configuration handling #4126

Merged
merged 3 commits into from
Sep 16, 2022
Merged

clean up exchange configuration handling #4126

merged 3 commits into from
Sep 16, 2022

Conversation

arnetheduck
Copy link
Member

Per spec, we should not be sending our detected terminal block to EL - the EL configuration exchange should only look at values from configuration and report mismatches.

  • note TODO about usage of terminal block hash configuration

Per spec, we should not be sending our detected terminal block to EL -
the EL configuration exchange should only look at values from
configuration and report mismatches.

* note TODO about usage of terminal block hash configuration
@mratsim mratsim mentioned this pull request Sep 16, 2022
@@ -561,67 +559,46 @@ proc exchangeTransitionConfiguration*(p: Eth1Monitor): Future[EtcStatus] {.async
if dataProvider.isNil:
return EtcStatus.exchangeError

# https://github.com/ethereum/execution-apis/blob/main/src/engine/specification.md#engine_exchangetransitionconfigurationv1
Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -38,8 +38,7 @@ type

# Transition
TERMINAL_TOTAL_DIFFICULTY*: UInt256
TERMINAL_BLOCK_HASH*: BlockHash
# TODO TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH*: Epoch
TERMINAL_BLOCK_HASH*: BlockHash # TODO use in eht1monitor
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
TERMINAL_BLOCK_HASH*: BlockHash # TODO use in eht1monitor
TERMINAL_BLOCK_HASH*: BlockHash # TODO use in eth1monitor

@github-actions
Copy link

Unit Test Results

       12 files       860 suites   1h 12m 45s ⏱️
  1 982 tests   1 835 ✔️ 147 💤 0
10 662 runs  10 472 ✔️ 190 💤 0

Results for commit 071b7db.

@arnetheduck arnetheduck merged commit 43188a0 into unstable Sep 16, 2022
@arnetheduck arnetheduck deleted the el-config branch September 16, 2022 13:33
p.terminalBlockNumber.get
else:
(static default Quantity))
terminalBlockHash: p.depositsChain.cfg.TERMINAL_BLOCK_HASH,
Copy link
Contributor

@zah zah Sep 16, 2022

Choose a reason for hiding this comment

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

The old code was not fully wrong here I think. We still need to consider the command-line override that the user may supply.

Copy link
Member Author

Choose a reason for hiding this comment

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

we consider the command line here:

metadata.cfg.TERMINAL_TOTAL_DIFFICULTY =

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.

3 participants