Don't return errors on HTTP API for already-known messages
Issue Addressed
- Resolves #3266
Proposed Changes
Return 200 OK rather than an error when a block, attestation or sync message is already known.
Presently, we will log return an error which causes a BN to go "offline" from the VCs perspective which causes the fallback mechanism to do work to try and avoid and upcheck offline nodes. This can be observed as instability in the vc_beacon_nodes_available_count metric.
The current behaviour also causes scary logs for the user. There's nothing to actually be concerned about when we see duplicate messages, this can happen on fallback systems (see code comments).
Additional Info
NA
Thanks! All conflicts resolved. That publish_block function is a nice improvement!
Approved modulo typo fixes!
Thanks! Sorry for zombie-ing those typos again!
bors r+
Pull request successfully merged into unstable.
Build succeeded:
- arbitrary-check
- beacon-chain-tests
- cargo-audit
- cargo-fmt
- cargo-udeps
- cargo-vendor
- check-benchmarks
- check-consensus
- check-msrv
- clippy
- debug-tests-ubuntu
- dockerfile-ubuntu
- doppelganger-protection-test
- ef-tests-ubuntu
- eth1-simulator-ubuntu
- execution-engine-integration-ubuntu
- merge-transition-ubuntu
- no-eth1-simulator-ubuntu
- op-pool-tests
- release-tests-ubuntu
- release-tests-windows
- state-transition-vectors-ubuntu