remove some usage of calls not required by engine API (#3761)
This commit is contained in:
parent
0a8589986a
commit
2924ed9604
|
@ -1056,7 +1056,13 @@ proc detectPrimaryProviderComingOnline(m: Eth1Monitor) {.async.} =
|
||||||
continue
|
continue
|
||||||
|
|
||||||
var tempProvider = tempProviderRes.get
|
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)
|
yield testRequest or sleepAsync(web3Timeouts)
|
||||||
|
|
||||||
|
@ -1525,8 +1531,6 @@ proc testWeb3Provider*(web3Url: Uri,
|
||||||
awaitWithRetries web3.provider.eth_getBlockByNumber(blockId("latest"), false)
|
awaitWithRetries web3.provider.eth_getBlockByNumber(blockId("latest"), false)
|
||||||
syncStatus = mustSucceed "get sync status":
|
syncStatus = mustSucceed "get sync status":
|
||||||
awaitWithRetries web3.provider.eth_syncing()
|
awaitWithRetries web3.provider.eth_syncing()
|
||||||
listening = mustSucceed "get network listening":
|
|
||||||
awaitWithRetries web3.provider.net_listening()
|
|
||||||
peers =
|
peers =
|
||||||
try:
|
try:
|
||||||
awaitWithRetries web3.provider.net_peerCount()
|
awaitWithRetries web3.provider.net_peerCount()
|
||||||
|
@ -1539,7 +1543,6 @@ proc testWeb3Provider*(web3Url: Uri,
|
||||||
|
|
||||||
echo "Client Version: ", clientVersion
|
echo "Client Version: ", clientVersion
|
||||||
echo "Network Version: ", networkVersion
|
echo "Network Version: ", networkVersion
|
||||||
echo "Network Listening: ", listening
|
|
||||||
echo "Network Peers: ", peers
|
echo "Network Peers: ", peers
|
||||||
echo "Syncing: ", syncStatus
|
echo "Syncing: ", syncStatus
|
||||||
echo "Latest block: ", latestBlock.number.uint64
|
echo "Latest block: ", latestBlock.number.uint64
|
||||||
|
|
|
@ -960,10 +960,11 @@ func clear*(cache: var StateCache) =
|
||||||
cache.sync_committees.clear
|
cache.sync_committees.clear
|
||||||
|
|
||||||
func checkForkConsistency*(cfg: RuntimeConfig) =
|
func checkForkConsistency*(cfg: RuntimeConfig) =
|
||||||
# TODO re-add cfg.CAPELLA_FORK_VERSION once eth-clients repos include it and
|
# TODO add cfg.CAPELLA_FORK_VERSION once merge-testnets repo includes it and
|
||||||
# fix SHARDING_FORK_VERSION to be its new FORK_VERSION. Until then make sure
|
# fixes SHARDING_FORK_VERSION to be a new FORK_VERSION. Until then make sure
|
||||||
# that it will never actually use the Capella fork.
|
# that it will never actually use the Capella fork.
|
||||||
doAssert cfg.CAPELLA_FORK_EPOCH == FAR_FUTURE_EPOCH
|
doAssert cfg.CAPELLA_FORK_EPOCH == FAR_FUTURE_EPOCH
|
||||||
|
doAssert cfg.SHARDING_FORK_EPOCH == FAR_FUTURE_EPOCH
|
||||||
|
|
||||||
let forkVersions =
|
let forkVersions =
|
||||||
[cfg.GENESIS_FORK_VERSION, cfg.ALTAIR_FORK_VERSION,
|
[cfg.GENESIS_FORK_VERSION, cfg.ALTAIR_FORK_VERSION,
|
||||||
|
|
Loading…
Reference in New Issue