eos icon indicating copy to clipboard operation
eos copied to clipboard

Process Generated Transactions

Open wanderingbort opened this issue 9 years ago • 1 comments

GeneratedTransaction s can be scheduled but they cannot be processed at the moment.

This task will refactor processing of SignedTransaction s that is currently part of chain_controller to allow for processing GenerateTransaction s as well with as much shared code as possible.

NB: this task will not provide API or WASM-VM support for generating transactions. That will come in another issue.

wanderingbort avatar Aug 15 '17 20:08 wanderingbort

Most of this is done. There are a few things left to do for #224 (like test cases).

This has exposed some cracks in our current transaction type hierarchy: Inheriting the generated "data" type from a type that provides functionality turns in to a messy diamond multiple inheritance when some of the functionality belong in the shared base class. This was discussed in the dev chat and resolved by extracting methods that only require the data from the shared base Transaction type into functions which take the least permissive Transaction& needed as an input.

This has also exposed the inappropriate use of ProcessedTransaction which is derived from SignedTransaction for synchronous transaction outputs. Unlike GeneratedTransactions these do not need an explicit ID and they are immediately processed so, they carry output. As a result we now have 3 variations of "output" transactions:

  • implicit id, with signatures, with output: ProcessedTransaction
  • explicit id to be applied in the future: GeneratedTransaction
  • implicit/no id with output: ProcessedSyncTransaction

After this issue is done, we may want to revisit the type system here from the generated types on through to make sure they are still consistent with the ideals of the system and that all the moving parts have value in the current set of working assumptions.

wanderingbort avatar Aug 25 '17 18:08 wanderingbort