FederatedSidechains icon indicating copy to clipboard operation
FederatedSidechains copied to clipboard

General Improvements to the CrossChainTransferStore

Open bokobza opened this issue 7 years ago • 2 comments

This class is big and devoid of logs. We need to

  • simplify it
  • add unit tests
  • add more logs

bokobza avatar Dec 14 '18 15:12 bokobza

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.

quantumagi avatar Dec 14 '18 23:12 quantumagi

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.

quantumagi avatar Dec 14 '18 23:12 quantumagi