Skip to content

Support submitting ProvenBatch #1112

@Mirko-von-Leipzig

Description

@Mirko-von-Leipzig

We'd like to allow users to submit an entire ProvenBatch directly. This enables transaction sets which must be bundled together e.g. atomic swaps.

This will require a new RPC endpoint, some mempool improvements and some care in designing around this concept to ensure there are no untoward side-effects.

RPC

Add a SubmitProvenBatch analogue to SubmitProvenTransaction to both RPC and block-producer gRPC schemas.

The RPC implementation should verify the integrity of the batch before proxying it on (similar to what the SubmitProvenTransaction does).

Mempool

The current implementation doesn't really allow for this because it assumes the atomic building block is a ProvenTransaction.

A ProvenBatch contains the transaction headers, but not the raw transaction data and we therefore cannot deconstruct it back to "atoms" but instead this becomes a new atomic unit of sorts.

Open questions

  1. What do we do if the submitted batch contains transactions already in the mempool?
  2. What do we do if the submitted batch depends on transactions which are not already in batches? The current design operates on a DAG basis where the roots are those which are available to choose from. This should be allowed but could result in strangeness if we allow (1) as some txs could be stuck in limbo..

Its possible to brute force this and hope that we consider every edge case. Ideal would be a graph structure where this sort of property falls out naturally. This may mean consolidating the transaction and batch graphs into a more general graph - currently the batch graph is effectively an overlay graph on-top of the transaction DAG.

cc @bobbinth

Metadata

Metadata

Labels

block-producerRelated to the block producer componentmempoolRelates to the mempoolrpcRelated to the RPC component

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions