Near-One / rainbow-bridge

🌈🌈🌈 NEAR <> Ethereum Decentralized Bridge
GNU General Public License v3.0
326 stars 99 forks source link

eth2near-relay panicked at 'Header has unknown parent. Parent should be submitted first. #407

Closed mfornet closed 3 years ago

mfornet commented 3 years ago

This is a log I see frequently while running the eth2near-relay.

Error: {"ActionError":{"index":0,"kind":{"FunctionCallError":{"HostError":{"GuestPanic":{"panic_msg":"panicked at 'Header has unknown parent. Parent should be submitted first.', eth-client/src/lib.rs:240:27"}}}}}}
    at txnStatus (/home/max/rainbow-bridge-cli/utils/borsh.js:283:9)
    at process._tickCallback (internal/process/next_tick.js:68:7)

The ethereum client on near is still making progress.

mfornet commented 3 years ago

This problem is due to the async nature of submitting transactions, since some of them might not be processed in order which is required.

The fix was implemented in #463. Transactions are sent in batches which are guaranteed to be processed in order, and batches are being sent synchronously (one batch is sent after the previous one is applied).