nimbus-eth2/beacon_chain
Etan Kissling eec6c04d32
do not descore peer when EL connection fails (#4020)
When the EL fails to respond to `newPayload`, e.g., because connection
to the EL got interrupted, or due to misconfiguration, optimistic blocks
cannot be imported according to spec. This condition is treated the same
as if the peer returned a block with missing parent which gets the block
out of our processing queue, but can have nasty side effects.

For example, if sync manager asks for validation of a block known to be
in the finalized range, if it receives a `MissingParent` verdict, the
peer is immediately removed from the peer pool.

```
DBG 2022-08-24 11:45:26.874+02:00 newPayload: inserting block into execution engine parentHash=e4ca7424 blockHash=36cdc198 stateRoot=cf3902c1 receiptsRoot=56e81f17 prevRandao=0b49a172 blockNumber=1518089 gasLimit=30000000 gasUsed=0 timestamp=1657980396 extraDataLen=0 baseFeePerGas=7 numTransactions=0
ERR 2022-08-24 11:45:26.875+02:00 newPayload failed                          msg="Transport is not initialised (missing a call to connect?)"
DBG 2022-08-24 11:45:26.875+02:00 Block pool rejected peer's response        topics="syncman" request=187232:32@1475 peer=16U*MsCJdx direction=forward blocks_map=xxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxx blocks_count=31 ok=false unviable=false missing_parent=true sync_ident=main
ERR 2022-08-24 11:45:26.875+02:00 Unexpected missing parent at finalized epoch slot topics="syncman" request=187232:32@1475 peer=16U*MsCJdx direction=forward rewind_to_slot=187232 blocks_count=31 blocks_map=xxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxx sync_ident=main
DBG 2022-08-24 11:45:26.875+02:00 Peer was removed from PeerPool due to low score topics="beacnde" peer=16U*MsCJdx peer_score=-1000 score_low_limit=0 score_high_limit=1000
DBG 2022-08-24 11:45:26.875+02:00 Lost connection to peer                    topics="networking" peer=16U*MsCJdx connections=0
```

By delaying issuing a verdict until the EL connection is restored and
`newPayload` successfully ran, the problem should be fixed. This also
induces back pressure to the sync manager by stopping download of new
blocks (or re-downloading the same block over and over again).
2022-08-24 16:55:41 +00:00
..
consensus_object_pools allow execution clients several seconds to construct blocks (#4012) 2022-08-23 19:19:52 +03:00
eth1 Require properly configured Engine API connection after the merge (#4006) 2022-08-22 22:44:40 +03:00
fork_choice update spec ref URLs (#4005) 2022-08-20 16:03:32 +00:00
gossip_processing do not descore peer when EL connection fails (#4020) 2022-08-24 16:55:41 +00:00
networking update spec ref URLs (#4005) 2022-08-20 16:03:32 +00:00
rpc allow execution clients several seconds to construct blocks (#4012) 2022-08-23 19:19:52 +03:00
spec update spec ref URLs in state_transition_epoch (#4016) 2022-08-23 13:06:12 +00:00
sync update spec ref URLs (#4005) 2022-08-20 16:03:32 +00:00
validator_client Fix a potential segfault and various potential stalls (#4003) 2022-08-19 21:51:30 +00:00
validators allow execution clients several seconds to construct blocks (#4012) 2022-08-23 19:19:52 +03:00
.editorconfig
.gitignore
beacon_chain_db.nim beacon_chain_db: proc -> func (#3931) 2022-08-01 16:17:06 +00:00
beacon_chain_db_immutable.nim update spec ref URLs (#4005) 2022-08-20 16:03:32 +00:00
beacon_chain_db_light_client.nim update LC spec references for v1.2.0-rc.2 (#3982) 2022-08-17 19:47:06 +00:00
beacon_clock.nim update spec ref URLs (#4005) 2022-08-20 16:03:32 +00:00
beacon_node.nim allow execution clients several seconds to construct blocks (#4012) 2022-08-23 19:19:52 +03:00
beacon_node_light_client.nim update LC spec references for v1.2.0-rc.2 (#3982) 2022-08-17 19:47:06 +00:00
beacon_node_status.nim compatibility with Nim 1.4+ (#3888) 2022-07-29 10:53:42 +00:00
conf.nim Require properly configured Engine API connection after the merge (#4006) 2022-08-22 22:44:40 +03:00
conf_light_client.nim update LC spec references for v1.2.0-rc.2 (#3982) 2022-08-17 19:47:06 +00:00
deposits.nim compatibility with Nim 1.4+ (#3888) 2022-07-29 10:53:42 +00:00
era_db.nim
extras.nim compatibility with Nim 1.4+ (#3888) 2022-07-29 10:53:42 +00:00
filepath.nim Keymanager API for the validator client (#3976) 2022-08-19 13:30:07 +03:00
interop.nim compatibility with Nim 1.4+ (#3888) 2022-07-29 10:53:42 +00:00
light_client.nim update LC spec references for v1.2.0-rc.2 (#3982) 2022-08-17 19:47:06 +00:00
nim.cfg
nimbus_beacon_node.nim allow execution clients several seconds to construct blocks (#4012) 2022-08-23 19:19:52 +03:00
nimbus_beacon_node.nim.cfg
nimbus_binary_common.nim Keymanager API for the validator client (#3976) 2022-08-19 13:30:07 +03:00
nimbus_light_client.nim Require properly configured Engine API connection after the merge (#4006) 2022-08-22 22:44:40 +03:00
nimbus_light_client.nim.cfg
nimbus_signing_node.nim MEV block proposal (#3883) 2022-08-01 09:41:47 +03:00
nimbus_signing_node.nim.cfg
nimbus_validator_client.nim Fix a potential segfault and various potential stalls (#4003) 2022-08-19 21:51:30 +00:00
nimbus_validator_client.nim.cfg
sszdump.nim compatibility with Nim 1.4+ (#3888) 2022-07-29 10:53:42 +00:00
statediff.nim compatibility with Nim 1.4+ (#3888) 2022-07-29 10:53:42 +00:00
statusbar.nim compatibility with Nim 1.4+ (#3888) 2022-07-29 10:53:42 +00:00
trusted_node_sync.nim Make it easier to test trustedNodeSync or different networks 2022-08-18 19:48:11 +03:00
version.nim Version 22.8.0 2022-08-23 01:11:29 +03:00
wallets.nim compatibility with Nim 1.4+ (#3888) 2022-07-29 10:53:42 +00:00