lambdaclass/lambda_ethereum_consensus

Attestation or Sync committee addition to SubnetInfo not yet created

Closed this issue · 0 comments

On long running test there are some cases where for one reason or another (probably due to delays) attestations or sync committee messages are needed to be added to a subnet that wasn't created yet. We need to make sure, as the spec defines, that the attestation added match our current view of the chain.

This is an old issue that happened sporadically and right now appeared to be triggered more consistently by the test where sync committee calculation lasts longer (we are most of the validators in the test on main spec). Here is an example log:

ERROR 21:08:14.499 GenServer LambdaEthereumConsensus.Libp2pPort terminating
** (MatchError) no match of right hand side value: :not_found
    (lambda_ethereum_consensus 0.1.0) lib/types/sync_subnet_info.ex:102: Types.SyncSubnetInfo.fetch_subnet_info!/1
    (lambda_ethereum_consensus 0.1.0) lib/types/sync_subnet_info.ex:57: Types.SyncSubnetInfo.add_message!/2
    (lambda_ethereum_consensus 0.1.0) lib/lambda_ethereum_consensus/p2p/gossip/sync_committee.ex:34: LambdaEthereumConsensus.P2P.Gossip.SyncCommittee.handle_gossip_message/4
    (lambda_ethereum_consensus 0.1.0) lib/lambda_ethereum_consensus/metrics.ex:115: anonymous fn/3 in LambdaEthereumConsensus.Metrics.handler_span/3
    (telemetry 1.3.0) /consensus/deps/telemetry/src/telemetry.erl:324: :telemetry.span/3
    (lambda_ethereum_consensus 0.1.0) lib/libp2p_port.ex:604: LambdaEthereumConsensus.Libp2pPort.handle_notification/2
    (lambda_ethereum_consensus 0.1.0) lib/libp2p_port.ex:537: LambdaEthereumConsensus.Libp2pPort.handle_info/2
    (stdlib 5.2.3) gen_server.erl:1095: :gen_server.try_handle_info/3