stellar / stellar-core

Reference implementation for the peer-to-peer agent that manages the Stellar network.
https://www.stellar.org
Other
3.11k stars 963 forks source link

tech debt: cleanup or remove transactions "stacks" #3846

Closed marta-lokhova closed 3 weeks ago

marta-lokhova commented 1 year ago

To be done after https://github.com/stellar/stellar-core/issues/3782 is completed and rolled out on the network.

The change above makes the notion of "tx stacks" (aka chains of transactions for the same source account) obsolete. At a minimum, we can change the API so callers like the transaction queue and transaction limiter don't need to be aware of the tx stacks used underneath. We could also potentially simplify the underlying surge pricing ordering mechanism to remove the notion of tx stacks completely, but this might be harder due to the need to validate pre-protocol-20 transaction sets, which still contain tx stacks. This requires investigation to determine code to clean up/remove.

marta-lokhova commented 6 months ago

As part of this cleanup, we should also remove any logic inside the TransactionQueue module that deals with chains of transactions per source account.

MonsieurNicolas commented 6 months ago

+1 on doing this work. When we do it, we should also revisit tests as all this complexity is not needed and in some cases the intent of the test may not be valid anymore.

I don't think we need to validate pre-20 txsets: when replaying transactions from history, the only thing we need to ensure is that hashes are correct (we don't call checkValid on tx sets and only apply transactions).

marta-lokhova commented 1 month ago

Bumping the priority of this issue: I think we need the cleanup to avoid maintenance burden when we implement parallelization changes.

marta-lokhova commented 4 weeks ago

Note that @dmkozh's https://github.com/stellar/stellar-core/pull/4383 PR will close this issue