Closes #300
The test for escape hatch is not ready.
This PR:
Adds the escape hatch in the batch poster. The escape hatch is a function being called periodically, and it works as following:
if hotshot was dwon, check if hotshot is live
if hotshot was up, check if hotshot is down. If there is also a hotshot transaction waiting for being finalized, then check hotshot liveness of its corresponding L1 height. If down, remove the pending queue and submitted positions and set a value indicating messages skipping espresso validation.
if hotshot is down, and escape hatch is on. Then espresso validation will be circumvented
if hotshot is down, and escape hatch is off. Then batch poster will submit transactions to hotshot when it goes back live
Refactors a bit to make the workflow more comprehensible.
Fixes submitting positions to the pending queue
Add a specific escape hatch for it
This PR does not:
test the escape hatch totally. Now we don't have a good way to see if any hotshot transactions occur when hotshot is down and escape hatch is on. Or we can think of any other way to test the escape hatch fully. However, this PR has already included so many stuff. Getting it merged first can reduce conflicts
Closes #300 The test for escape hatch is not ready.
This PR:
This PR does not:
test the escape hatch totally. Now we don't have a good way to see if any hotshot transactions occur when hotshot is down and escape hatch is on. Or we can think of any other way to test the escape hatch fully. However, this PR has already included so many stuff. Getting it merged first can reduce conflicts
Key places to review:
batch_poster.go transaction_streamer.go