status-im / nimbus-eth2

Nim implementation of the Ethereum Beacon Chain
https://nimbus.guide
Other
534 stars 231 forks source link

Nimbus Hive Docker build failing due to use of SECONDS_PER_SLOT #4515

Open marioevz opened 1 year ago

marioevz commented 1 year ago

Describe the bug Nimbus hive docker image (https://github.com/ethereum/hive/tree/master/clients/nimbus-bn) is consistently failing with the following exception:

stack trace: (most recent call last)
/nimbus-eth2/beacon_chain/networking/network_metadata.nim(227, 24)
/nimbus-eth2/beacon_chain/networking/network_metadata.nim(205, 18) loadCompileTimeNetworkMetadata
/nimbus-eth2/beacon_chain/networking/network_metadata.nim(205, 18) Error: Failed to load network metadata at '/nimbus-eth2/beacon_chain/networking/../../vendor/eth2-networks/shared/mainnet': Cannot override config (compiled: SECONDS_PER_SLOT=6 - config: SECONDS_PER_SLOT=12)
make: *** [Makefile:413: nimbus_beacon_node] Error 1

Nimbus needs to be compiled with SECONDS_PER_SLOT of 6 to be compatible with the configuration of the rest of the consensus clients.

To Reproduce

git clone https://github.com/ethereum/hive.git
cd hive/clients/nimbus-bn
docker build .

Additional context The docker build was working for merge tests but we have been not able to test withdrawals for nimbus in hive just recently.

tersec commented 1 year ago

It's mainnet but with 6 second slots, not minimal (which already includes 6 second slots)?

marioevz commented 1 year ago

Yes, if I understand correctly I think we used this parameter to change all presets to 6 seconds, but I'm not sure if the behavior resulting from this parameter changed in the past months.

On the other hand it would be worth it to instead try to change the preset to minimal for all tests in hive suites.

marioevz commented 1 year ago

I tried to remove the compile time parameter and basically increase the SECONDS_PER_SLOT value for the testnet to the mainnet default when nimbus is involved, but we are now getting another error at startup because we are trying to modify another parameter:

"Cannot override config (compiled: TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH=18446744073709551615 - config: TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH=0)" 

What alternative we have to modify these genesis config parameters for nimbus in hive to be able to interop with other clients ?

These are the parameters we are currently modifying: https://github.com/ethereum/hive/blob/eee9107bcaa34145bbbbca39abe74f684ea72957/simulators/eth2/common/testnet/prepared_testnet.go#L135

Any help will be much appreciated!

tersec commented 1 year ago

TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH

Nimbus doesn't use TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH.