* Rewrite tendermint's message handling loop to much more clearly match the paper
No longer checks relevant branches upon messages, yet all branches upon any
state change. This is slower, yet easier to review and likely without one or
two rare edge cases.
When reviewing, please see page 5 of https://arxiv.org/pdf/1807.04938.pdf.
Lines from the specified algorithm can be found in the code by searching for
"// L".
* Sane rebroadcasting of consensus messages
Instead of broadcasting the last n messages on the Tributary side of things, we
now have the machine rebroadcast the message tape for the current block.
* Only rebroadcast messages which didn't error in some way
* Only rebroadcast our own messages for tendermint
Instead of saving, for every sent message, if it was sent or not, we track the
latest block/round participated in. These two keys are comprehensive to all
prior block/rounds. We then use three keys for the latest round's
proposal/prevote/precommit, enabling tracking current state as necessary to
prevent equivocations with just 5 keys.
The storage of the latest three messages also enables proper rebroadcasting of
the current round (not implemented in this commit).
Online validators should inherently have them. Offline validators will receive
from the sync protocol.
This does somewhat eliminate the class of nodes who would follow the blockchain
(without validating it), yet that's fine for the performance benefit.
I didn't remove async-recursion when I updated the repo to 1.77 as I forgot we
used it in the tests. I still had to add some Box::pins, which may have been a
valid option, on the prior Rust version, yet at least resolves everything now.
Also updates everything which doesn't introduce further depends.
* start Router contract
* use calldata for function args
* var name changes
* start testing router contract
* test with and without abi.encode
* cleanup
* why tf isn't tests/utils working
* cleanup tests
* remove unused files
* wip
* fix router contract and tests, add set/update public keys funcs
* impl some Froms
* make execute non-reentrant
* cleanup
* update Router to use ReentrancyGuard
* update contract to use errors, use bitfield in Executed event, minor other fixes
* wip
* fix build issues from merge, tests ok
* Router.sol cleanup
* cleanup, uncomment stuff
* bump ethers.rs version to latest
* make contract functions take generic middleware
* update build script to assert no compiler errors
* hardcode pubkey parity into contract, update tests
* Polish coins/ethereum in various ways
---------
Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
Exposes flush calls.
Adds safety, at the cost of a panic risk, as multiple TXNs simultaneously
writing to a key will now cause a panic. This should be fine and the safety is
appreciated.