Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions beacon_chain/eth1/eth1_monitor.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,13 @@ proc detectPrimaryProviderComingOnline(m: Eth1Monitor) {.async.} =
continue

var tempProvider = tempProviderRes.get
let testRequest = tempProvider.web3.provider.net_version()

# Use one of the get/request-type methods from
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.9/src/engine/specification.md#underlying-protocol
# which does nit take parameters and returns a small structure, to ensure
# this works with engine API endpoints. Either eth_chainId or eth_syncing
# works for this purpose.
let testRequest = tempProvider.web3.provider.eth_syncing()

yield testRequest or sleepAsync(web3Timeouts)

Expand Down Expand Up @@ -1524,8 +1530,6 @@ proc testWeb3Provider*(web3Url: Uri,
awaitWithRetries web3.provider.eth_getBlockByNumber(blockId("latest"), false)
syncStatus = mustSucceed "get sync status":
awaitWithRetries web3.provider.eth_syncing()
listening = mustSucceed "get network listening":
awaitWithRetries web3.provider.net_listening()
peers =
try:
awaitWithRetries web3.provider.net_peerCount()
Expand All @@ -1538,7 +1542,6 @@ proc testWeb3Provider*(web3Url: Uri,

echo "Client Version: ", clientVersion
echo "Network Version: ", networkVersion
echo "Network Listening: ", listening
echo "Network Peers: ", peers
echo "Syncing: ", syncStatus
echo "Latest block: ", latestBlock.number.uint64
Expand Down
5 changes: 3 additions & 2 deletions beacon_chain/spec/datatypes/base.nim
Original file line number Diff line number Diff line change
Expand Up @@ -960,10 +960,11 @@ func clear*(cache: var StateCache) =
cache.sync_committees.clear

func checkForkConsistency*(cfg: RuntimeConfig) =
# TODO re-add cfg.CAPELLA_FORK_VERSION once eth-clients repos include it and
# fix SHARDING_FORK_VERSION to be its new FORK_VERSION. Until then make sure
# TODO add cfg.CAPELLA_FORK_VERSION once merge-testnets repo includes it and
# fixes SHARDING_FORK_VERSION to be a new FORK_VERSION. Until then make sure
# that it will never actually use the Capella fork.
doAssert cfg.CAPELLA_FORK_EPOCH == FAR_FUTURE_EPOCH
doAssert cfg.SHARDING_FORK_EPOCH == FAR_FUTURE_EPOCH

let forkVersions =
[cfg.GENESIS_FORK_VERSION, cfg.ALTAIR_FORK_VERSION,
Expand Down