FederatedSidechains
FederatedSidechains copied to clipboard
General Improvements to the CrossChainTransferStore
This class is big and devoid of logs. We need to
- simplify it
- add unit tests
- add more logs
The CrossChainTransferStoreTests class already contains a number of unit tests that test such issues as:
- signature merging
- withdrawal transaction creation
- reorgs
- recovery from chain
- wallet synchronization
- transaction and signature validation
so this is the appropriate place to add any additional tests.
Alternatively additional test classes can leverage the CrossChainTestBase class.
I've added some notes on simplification to #279. Let me know your thoughts on this:
- Let go of the idea of broadcasting transactions between members in a loose asynchronous manner.
- Have a single method (it could call other methods) used by the leader that:
- Builds a transaction
- Passes the transaction among members via parallel synchronous calls for signing.
- Broadcasts the transaction if enough signatures were collected.
- This will require a quorum to be online simultaneously but should not be too big an ask.