cyphernode icon indicating copy to clipboard operation
cyphernode copied to clipboard

Batch management and monitoring

Open FrancisPouliot opened this issue 7 years ago • 2 comments

Batches should have a unique ID so that we can do some more advanced operations on them.

Also, there should be a way to add multiple transactions to a batch via a single API call (e.g. import transactions into batch). CSV option could be interesting here.

Then we should have some notification system that tells the app the status of the batch:

  • Get information on a batch: time reamining, amount of bitcoins, list of tx, batch size (kb)
  • List batches (if we allow multiple at once)
  • Set automated threshold for notification (Bitcoin amount? Batch size?)

FrancisPouliot avatar Sep 26 '18 18:09 FrancisPouliot

API configs and routes:

Enable batching

  • simple on/off switch
  • parameters: batch frequency
  • batching schedule (optional): batch at predetermined times, e.g. Mondays 9AM and Tuesdays 2PM

Create a batch

  • create batch via API using multiple addresses and amounts
  • create a batch via CSV upload of addresses and amounts
  • create a batch from transactions
  • create a batch for PBST signing
  • create a batch from multiple signed PBST files

Batch IDs

  • generate unique ID for each batch which is saved and logged in Cyphernode
  • index all batches

Batch statuses:

  • pending: when the batch is accumulating transactions
  • done: when the batch has been signed and broadcast

Batch data for lookup:

  • status
  • start time
  • if done: time
  • if done: tx id
  • if done: tx fees
  • if done: # confirmations
  • number of transactions in batch
  • total amount of bitcoins in batch
  • number of inputs and outputs
  • batch size
  • if pending: time remaining until broadcast
  • if pending: expected broadcast time according to schedule

FrancisPouliot avatar Oct 20 '18 18:10 FrancisPouliot

Batch actions

  • cancel batch (no broadcast or signing)
  • optional (security tradeoff): broadcast batch overriding the batch schedule
  • add offline signing: require batches to be signed offline using PSBT
  • offline signing threshold: only transactions over (x) amount of bitcoins must be signed offline

FrancisPouliot avatar Oct 20 '18 18:10 FrancisPouliot