status-im / nimbus-eth2

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

Block batch signature verification failed at private chain #6608

Open artjoma opened 1 month ago

artjoma commented 1 month ago

I have eth private chain. Prysm beacon, Prysm validator, Geth as execution. I try attach Nimbus as beacon node to Prysm beacon.

$NIMBUS_DATA_FOLDER/nimbus_beacon_node \
  --data-dir=$BEACON_DATA_FOLDER \
  --tcp-port=9001 \
  --udp-port=9002 \
  --rest \
  --rest-port=5052 \
  --metrics \
  --network="/home/test/pos-nimbus/metadata" \
  --no-el \
  --direct-peer="/ip4/0.0.0.0/tcp/13000/p2p/16Uiu2HAmAzzvkR83gmynCqTEEsrd8TrkwV4qtw15vXLEj56zRbHj"

Err msg:

NTC 2024-10-08 00:02:59.035+03:00 Received invalid sequence of blocks        topics="syncman" request=0:32@29 peer=16U*6zRbHj direction=forward blocks_count=30 blocks_map=x..xxxxxxxxxxxxxxxxxxxxxxxxxxxxx sync_ident=main
INF 2024-10-08 00:02:59.237+03:00 Block batch signature verification failed  topics="gossip_blocks" signature=993163b1 blockRoot=9744901e blck="(slot: 3, proposer_index: 124, parent_root: \"7c9e48f6\", state_root: \"7ef28035\", eth1data: (deposit_root: 35be322d094f9d154a8aba4733b8497f180353bd7ae7b0a15f90b586b549f28b, deposit_count: 0, block_hash: f05d0d22948601ffb89504049696ca7fa854b9adf64e4360dda0087b90316db6), graffiti: \"\", proposer_slashings_len: 0, attester_slashings_len: 0, attestations_len: 0, deposits_len: 0, voluntary_exits_len: 0, sync_committee_participants: 0, block_number: 1, block_hash: \"0xc2b7e03454d100152e40133b3d4a85a0da5b8c5ea3fc141eacc4723c5cdcd9ae\", parent_hash: \"0x3cb2de32b3372a8d251fd23d972cfb0124b7d72d7466a315c63959463eedbdf2\", fee_recipient: \"0x123463a4b065722e99115d6c222f267d9cabb524\", bls_to_execution_changes_len: 0, blob_kzg_commitments_len: 0)"
NTC 2024-10-08 00:02:59.237+03:00 Received invalid sequence of blocks        topics="syncman" request=0:32@30 peer=16U*6zRbHj direction=forward blocks_count=30 blocks_map=x..xxxxxxxxxxxxxxxxxxxxxxxxxxxxx sync_ident=main
WRN 2024-10-08 00:02:59.293+03:00 Peer count low, no new peers discovered    topics="networking" discovered_nodes=0 new_peers=@[] current_peers=0 wanted_peers=160
INF 2024-10-08 00:03:03.835+03:00 Slot end                                   topics="beacnde" slot=251 nextActionWait=n/a nextAttestationSlot=-1 nextProposalSlot=-1 syncCommitteeDuties=none head=7c9e48f6:0

genesis.ssz and config.yaml as same for Prysm and Nimbus.

tersec commented 1 month ago

Can you provide further details of these genesis.ssz and config.yaml?

artjoma commented 1 month ago

config.yml

CONFIG_NAME: testA
PRESET_BASE: testA

# Genesis
GENESIS_FORK_VERSION: 0x00000002

# Altair
ALTAIR_FORK_EPOCH: 0
ALTAIR_FORK_VERSION: 0x10000000
# Merge
BELLATRIX_FORK_EPOCH: 0
BELLATRIX_FORK_VERSION: 0x20000000
# Capella
CAPELLA_FORK_EPOCH: 0
CAPELLA_FORK_VERSION: 0x30000000
# Deneb
DENEB_FORK_EPOCH: 0
DENEB_FORK_VERSION: 0x40000000

#ELECTRA_FORK_EPOCH: 0
#ELECTRA_FORK_VERSION: 0x50000000

TERMINAL_TOTAL_DIFFICULTY: 0
MAX_WITHDRAWALS_PER_PAYLOAD: 16
# Time parameters
SECONDS_PER_SLOT: 7
SLOTS_PER_EPOCH: 32

# Deposit contract
DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242

SSZ file generated by prysm-ctl:

$PRYSM_BIN_FOLDER/prysmctl testnet generate-genesis \
--fork deneb \
--num-validators 128 \
--genesis-time-delay 10 \
--chain-config-file config.yml \
--geth-genesis-json-in genesis.json \
--geth-genesis-json-out genesis.json \
--output-ssz genesis.ssz

Image This jpeg image is genesis.ssz file.

tersec commented 1 month ago

I haven't been able to get the genesis.ssz you posted, i.e. GitHub doesn't seem to allow downloading of it as far as I can tell because it's (obviously) not a correct .jpg file.

artjoma commented 1 month ago

I haven't been able to get the genesis.ssz you posted, i.e. GitHub doesn't seem to allow downloading of it as far as I can tell because it's (obviously) not a correct .jpg file.

Right click on "Image" > Menu > "Save Link As..." > rename *.jpeg to genesis.ssz on local disk.

daniil-parsiq commented 1 month ago

hi @tersec, here is the ssz file mentioned by @artjoma - https://storage.googleapis.com/dynamic-websites-bucket-production/genesis.ssz

tersec commented 1 month ago

hi @tersec, here is the ssz file mentioned by @artjoma - https://storage.googleapis.com/dynamic-websites-bucket-production/genesis.ssz

That works, yeah

etan-status commented 1 month ago

That's the BeaconState file for slot 0, not the problematic SignedBeaconBlock that you see on slot 3.

artjoma commented 1 month ago

That's the BeaconState file for slot 0, not the problematic SignedBeaconBlock that you see on slot 3.

00:02:59.237+03:00 Block batch signature verification failed  topics="gossip_blocks" signature=993163b1 blockRoot=9744901e blck="(slot: 3, proposer_index: 124, parent_root: \"7c9e48f6\", state_root: \"7ef28035\", eth1data: (deposit_root: 35be322d094f9d154a8aba4733b8497f180353bd7ae7b0a15f90b586b549f28b, deposit_count: 0, block_hash: f05d0d22948601ffb89504049696ca7fa854b9adf64e4360dda0087b90316db6), graffiti: \"\", proposer_slashings_len: 0, attester_slashings_len: 0, attestations_len: 0, deposits_len: 0, voluntary_exits_len: 0, sync_committee_participants: 0, block_number: 1, block_hash: \"0xc2b7e03454d100152e40133b3d4a85a0da5b8c5ea3fc141eacc4723c5cdcd9ae\", parent_hash: \"0x3cb2de32b3372a8d251fd23d972cfb0124b7d72d7466a315c63959463eedbdf2\", fee_recipient: \"0x123463a4b065722e99115d6c222f267d9cabb524\", bls_to_execution_changes_len: 0, blob_kzg_commitments_len: 0)"

This log I see every 20-30sec. It's mean Nimbus cannot import blocks from Prysm beacon.

etan-status commented 1 month ago

Can you share one of the failing blocks as .ssz or .json?

artjoma commented 1 month ago

Can you share one of the failing blocks as .ssz or .json?

I prepared test network. All infos inside archive. metadata.tar.gz

Preset: react_presets.tar.gz Increased MAX_EXTRA_DATA_BYTES* = 768 (!)

block 0 :
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "baseFeePerGas": "0x3b9aca00",
    "blobGasUsed": "0x0",
    "difficulty": "0x1",
    "excessBlobGas": "0x0",
    "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000123463a4b065722e99115d6c222f267d9cabb5240000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "gasLimit": "0x1c9c380",
    "gasUsed": "0x0",
    "hash": "0x5751d492dac42b463ca4bbd600e7a6c1f11c2ff0f63cc3d61ba9f6965596c4d5",
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "miner": "0x0000000000000000000000000000000000000000",
    "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "nonce": "0x0000000000000000",
    "number": "0x0",
    "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "size": "0x2bd",
    "stateRoot": "0x5626437f7795af4d8269cd4902425e43ea84b0d9c48d2a98a7925ccf95744cdd",
    "timestamp": "0x670841d3",
    "totalDifficulty": "0x1",
    "transactions": [],
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "uncles": [],
    "withdrawals": [],
    "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
  }
}

block 1:
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "baseFeePerGas": "0x342770c0",
    "blobGasUsed": "0x0",
    "difficulty": "0x0",
    "excessBlobGas": "0x0",
    "extraData": "0xf84ca00000000000000000000000000000000000000000000000000000000000000000eae983aa36a783688f51a01e7bdec89a2756eda84bd8168feb123f9677e6890e89dacef78801c5ac5d7f1f",
    "gasLimit": "0x1c9c380",
    "gasUsed": "0x0",
    "hash": "0xf8c414db6b0c4c011984df202866be1f0ef7ef718b1af9f908cfd4c4787d2c83",
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "miner": "0x123463a4b065722e99115d6c222f267d9cabb524",
    "mixHash": "0x5751d492dac42b463ca4bbd600e7a6c1f11c2ff0f63cc3d61ba9f6965596c4d5",
    "nonce": "0x0000000000000000",
    "number": "0x1",
    "parentBeaconBlockRoot": "0x92c009ffffcc0013add874f96b68591d4ca8d0fb0e2c94e99d7c5d65a789fb43",
    "parentHash": "0x5751d492dac42b463ca4bbd600e7a6c1f11c2ff0f63cc3d61ba9f6965596c4d5",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "size": "0x296",
    "stateRoot": "0x5626437f7795af4d8269cd4902425e43ea84b0d9c48d2a98a7925ccf95744cdd",
    "timestamp": "0x670841ef",
    "totalDifficulty": "0x1",
    "transactions": [],
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "uncles": [],
    "withdrawals": [],
    "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
  }
}

Nimbus logs:

NTC 2024-10-11 00:16:49.358+03:00 Received invalid sequence of blocks        topics="syncman" request=0:32@4 peer=16U*4xdSpT direction=forward blocks_count=29 blocks_map=x...xxxxxxxxxxxxxxxxxxxxxxxxxxxx sync_ident=main
INF 2024-10-11 00:16:49.951+03:00 Block batch signature verification failed  topics="gossip_blocks" signature=8ff55548 blockRoot=c155aa54 blck="(slot: 4, proposer_index: 113, parent_root: \"92c009ff\", state_root: \"00961c40\", eth1data: (deposit_root: f0a0278e4372459cca6159cd5e71cfee638302a7b9ca9b05c34181ac0a65ac5d, deposit_count: 0, block_hash: 0e14e6248598e9c2ad277486b8dd71d7494d25a9afe322bec41fe79d3d4a9905), graffiti: \"\", proposer_slashings_len: 0, attester_slashings_len: 0, attestations_len: 0, deposits_len: 0, voluntary_exits_len: 0, sync_committee_participants: 0, block_number: 1, block_hash: \"0xf8c414db6b0c4c011984df202866be1f0ef7ef718b1af9f908cfd4c4787d2c83\", parent_hash: \"0x5751d492dac42b463ca4bbd600e7a6c1f11c2ff0f63cc3d61ba9f6965596c4d5\", fee_recipient: \"0x123463a4b065722e99115d6c222f267d9cabb524\", bls_to_execution_changes_len: 0, blob_kzg_commitments_len: 0)"
NTC 2024-10-11 00:16:49.951+03:00 Received invalid sequence of blocks        topics="syncman" request=0:32@5 peer=16U*4xdSpT direction=forward blocks_count=29 blocks_map=x...xxxxxxxxxxxxxxxxxxxxxxxxxxxx sync_ident=main
INF 2024-10-11 00:16:49.999+03:00 Slot start                                 topics="beacnde" head=92c009ff:0 delay=460us248ns finalized=0:00000000 peers=0 slot=89 sync="--h--m (0.00%) 0.0000slots/s (wwDwwwwwww:0)" epoch=2
INF 2024-10-11 00:16:50.833+03:00 Block batch signature verification failed  topics="gossip_blocks" signature=8ff55548 blockRoot=c155aa54 blck="(slot: 4, proposer_index: 113, parent_root: \"92c009ff\", state_root: \"00961c40\", eth1data: (deposit_root: f0a0278e4372459cca6159cd5e71cfee638302a7b9ca9b05c34181ac0a65ac5d, deposit_count: 0, block_hash: 0e14e6248598e9c2ad277486b8dd71d7494d25a9afe322bec41fe79d3d4a9905), graffiti: \"\", proposer_slashings_len: 0, attester_slashings_len: 0, attestations_len: 0, deposits_len: 0, voluntary_exits_len: 0, sync_committee_participants: 0, block_number: 1, block_hash: \"0xf8c414db6b0c4c011984df202866be1f0ef7ef718b1af9f908cfd4c4787d2c83\", parent_hash: \"0x5751d492dac42b463ca4bbd600e7a6c1f11c2ff0f63cc3d61ba9f6965596c4d5\", fee_recipient: \"0x123463a4b065722e99115d6c222f267d9cabb524\", bls_to_execution_changes_len: 0, blob_kzg_commitments_len: 0)"
NTC 2024-10-11 00:16:50.833+03:00 Received invalid sequence of blocks        topics="syncman" request=0:32@6 peer=16U*4xdSpT direction=forward blocks_count=29 blocks_map=x...xxxxxxxxxxxxxxxxxxxxxxxxxxxx sync_ident=main
WRN 2024-10-11 00:16:53.918+03:00 Peer count low, no new peers discovered    topics="networking" discovered_nodes=0 new_peers=@[] current_peers=0 wanted_peers=160
INF 2024-10-11 00:16:55.836+03:00 Slot end                                   topics="beacnde" slot=89 nextActionWait=n/a nextAttestationSlot=-1 nextProposalSlot=-1 syncCommitteeDuties=none head=92c009ff:0
INF 2024-10-11 00:16:56.999+03:00 Slot start                                 topics="beacnde" head=92c009ff:0 delay=844us376ns finalized=0:00000000 peers=0 slot=90 sync="--h--m (0.00%) 0.0000slots/s (wwwwwwwwww:0)" epoch=2
WRN 2024-10-11 00:16:58.918+03:00 Peer count low, no new peers discovered    topics="networking" discovered_nodes=0 new_peers=@[] current_peers=0 wanted_peers=160
INF 2024-10-11 00:17:02.837+03:00 Slot end                                   topics="beacnde" slot=90 nextActionWait=n/a nextAttestationSlot=-1 nextProposalSlot=-1 syncCommitteeDuties=none head=92c009ff:0
WRN 2024-10-11 00:17:03.923+03:00 Peer count low, no new peers discovered    topics="networking" discovered_nodes=0 new_peers=@[] current_peers=0 wanted_peers=160
INF 2024-10-11 00:17:03.999+03:00 Slot start                                 topics="beacnde" head=92c009ff:0 delay=614us981ns finalized=0:00000000 peers=0 slot=91 sync="--h--m (0.00%) 0.0000slots/s (wwwwwwwwww:0)" epoch=2
WRN 2024-10-11 00:17:08.924+03:00 Peer count low, no new peers discovered    topics="networking" discovered_nodes=0 new_peers=@[] current_peers=0 wanted_peers=160
INF 2024-10-11 00:17:09.835+03:00 Slot end                                   topics="beacnde" slot=91 nextActionWait=n/a nextAttestationSlot=-1 nextProposalSlot=-1 syncCommitteeDuties=none head=92c009ff:0
INF 2024-10-11 00:17:10.999+03:00 Slot start                                 topics="beacnde" head=92c009ff:0 delay=772us975ns finalized=0:00000000 peers=0 slot=92 sync="--h--m (0.00%) 0.0000slots/s (wwwwwwwwww:0)" epoch=2
WRN 2024-10-11 00:17:13.925+03:00 Peer count low, no new peers discovered    topics="networking" discovered_nodes=0 new_peers=@[] current_peers=0 wanted_peers=160
INF 2024-10-11 00:17:16.835+03:00 Slot end                                   topics="beacnde" slot=92 nextActionWait=n/a nextAttestationSlot=-1 nextProposalSlot=-1 syncCommitteeDuties=none head=92c009ff:0
INF 2024-10-11 00:17:17.999+03:00 Slot start                                 topics="beacnde" head=92c009ff:0 delay=826us587ns finalized=0:00000000 peers=0 slot=93 sync="--h--m (0.00%) 0.0000slots/s (wwwwwwwwww:0)" epoch=2
WRN 2024-10-11 00:17:18.927+03:00 Peer count low, no new peers discovered    topics="networking" discovered_nodes=0 new_peers=@[] current_peers=0 wanted_peers=160
INF 2024-10-11 00:17:23.839+03:00 Slot end                                   topics="beacnde" slot=93 nextActionWait=n/a nextAttestationSlot=-1 nextProposalSlot=-1 syncCommitteeDuties=none head=92c009ff:0
WRN 2024-10-11 00:17:23.945+03:00 Peer count low, no new peers discovered    topics="networking" discovered_nodes=0 new_peers=@[] current_peers=0 wanted_peers=160
INF 2024-10-11 00:17:24.999+03:00 Slot start                                 topics="beacnde" head=92c009ff:0 delay=942us244ns finalized=0:00000000 peers=0 slot=94 sync="--h--m (0.00%) 0.0000slots/s (wwwwwwwwww:0)" epoch=2
WRN 2024-10-11 00:17:28.947+03:00 Peer count low, no new peers discovered    topics="networking" discovered_nodes=0 new_peers=@[] current_peers=0 wanted_peers=160
INF 2024-10-11 00:17:30.835+03:00 Slot end                                   topics="beacnde" slot=94 nextActionWait=n/a nextAttestationSlot=-1 nextProposalSlot=-1 syncCommitteeDuties=none head=92c009ff:0
INF 2024-10-11 00:17:31.999+03:00 Slot start                                 topics="beacnde" head=92c009ff:0 delay=265us950ns finalized=0:00000000 peers=0 slot=95 sync="--h--m (0.00%) 0.0000slots/s (wwwwwwwwww:0)" epoch=2
WRN 2024-10-11 00:17:33.948+03:00 Peer count low, no new peers discovered    topics="networking" discovered_nodes=0 new_peers=@[] current_peers=0 wanted_peers=160
INF 2024-10-11 00:17:37.835+03:00 Slot end                                   topics="beacnde" slot=95 nextActionWait=n/a nextAttestationSlot=-1 nextProposalSlot=-1 syncCommitteeDuties=none head=92c009ff:0
WRN 2024-10-11 00:17:38.951+03:00 Peer count low, no new peers discovered    topics="networking" discovered_nodes=0 new_peers=@[] current_peers=0 wanted_peers=160
INF 2024-10-11 00:17:39.000+03:00 Slot start                                 topics="beacnde" head=92c009ff:0 delay=516us955ns finalized=0:00000000 peers=0 slot=96 sync="--h--m (0.00%) 0.0000slots/s (wwwwwwwwww:0)" epoch=3
WRN 2024-10-11 00:17:43.952+03:00 Peer count low, no new peers discovered    topics="networking" discovered_nodes=0 new_peers=@[] current_peers=0 wanted_peers=160
INF 2024-10-11 00:17:44.836+03:00 Slot end                                   topics="beacnde" slot=96 nextActionWait=n/a nextAttestationSlot=-1 nextProposalSlot=-1 syncCommitteeDuties=none head=92c009ff:0
INF 2024-10-11 00:17:46.000+03:00 Slot start                                 topics="beacnde" head=92c009ff:0 delay=292us602ns finalized=0:00000000 peers=0 slot=97 sync="--h--m (0.00%) 0.0000slots/s (wwwwwwwwww:0)" epoch=3
WRN 2024-10-11 00:17:48.953+03:00 Peer count low, no new peers discovered    topics="networking" discovered_nodes=0 new_peers=@[] current_peers=1 wanted_peers=160
INF 2024-10-11 00:17:49.030+03:00 Block batch signature verification failed  topics="gossip_blocks" signature=8ff55548 blockRoot=c155aa54 blck="(slot: 4, proposer_index: 113, parent_root: \"92c009ff\", state_root: \"00961c40\", eth1data: (deposit_root: f0a0278e4372459cca6159cd5e71cfee638302a7b9ca9b05c34181ac0a65ac5d, deposit_count: 0, block_hash: 0e14e6248598e9c2ad277486b8dd71d7494d25a9afe322bec41fe79d3d4a9905), graffiti: \"\", proposer_slashings_len: 0, attester_slashings_len: 0, attestations_len: 0, deposits_len: 0, voluntary_exits_len: 0, sync_committee_participants: 0, block_number: 1, block_hash: \"0xf8c414db6b0c4c011984df202866be1f0ef7ef718b1af9f908cfd4c4787d2c83\", parent_hash: \"0x5751d492dac42b463ca4bbd600e7a6c1f11c2ff0f63cc3d61ba9f6965596c4d5\", fee_recipient: \"0x123463a4b065722e99115d6c222f267d9cabb524\", bls_to_execution_changes_len: 0, blob_kzg_commitments_len: 0)"
NTC 2024-10-11 00:17:49.034+03:00 Received invalid sequence of blocks        topics="syncman" request=0:32@7 peer=16U*4xdSpT direction=forward blocks_count=29 blocks_map=x...xxxxxxxxxxxxxxxxxxxxxxxxxxxx sync_ident=main
INF 2024-10-11 00:17:51.837+03:00 Slot end                                   topics="beacnde" slot=97 nextActionWait=n/a nextAttestationSlot=-1 nextProposalSlot=-1 syncCommitteeDuties=none head=92c009ff:0