mit-dci / opencbdc-tx

A transaction processor for a hypothetical, general-purpose, central bank digital currency
Other
906 stars 201 forks source link

Don't send the entire compact_tx in a tx_notify_request #18

Open narula opened 3 years ago

narula commented 3 years ago

Right now, each shard includes the entire compact_tx in the tx_notify_request message to the atomizer when it attests to a transaction's inputs.

If a transaction spans multiple shards, the compact_tx is getting sent to the atomizer n_shards times.

Instead, the shard could send a smaller (compacter?) transaction which just includes the inputs it is attesting to. Perhaps the lowest index shard could be responsible for sending the transaction's outputs.

wadagso-gertjaap commented 3 years ago

I've thought about this somewhat, and came up with a few thoughts:

I'd be happy to take a stab at implementing this. Seems doable.

Another optimization further down the chain is to have sentinels only send transactions to shards that need to attest something (it seems the routing being static allows for that?). Is there a reason not to do that?