NethermindEth / near-sffl

https://nffl.nethermind.io/
MIT License
6 stars 3 forks source link

Properly handle checkpoint submission failure #245

Open Hyodar opened 4 weeks ago

Hyodar commented 4 weeks ago

Very rarely it seems like we get an error while sending a checkpoint task, even though it does send the transaction. For example, from testnet-0:

{"level":"error","ts":1717659728.592507,"caller":"aggregator/aggregator.go:406","msg":"Aggregator failed to send checkpoint","err":"send: failed to estimate gas and nonce\nsend: tx 0x1e3f8d9fc8484c2ff79b7534fea63e69790c6141d0bf9defcb7c24b5630fb64b failed.: FeeTooLowToCompete","stacktrace":"github.com/NethermindEth/near-sffl/aggregator.(*Aggregator).sendNewCheckpointTask\n\t/app/aggregator/aggregator.go:406"}

Still, the transaction was indeed sent and operators did try answering to it, but as we exit early when sending the checkpoint tx fails, the task was not initialized. This looks like an RPC issue - maybe we need to set more sensible timeouts or retries?