penumbra-zone / tower-abci

Tower-based ABCI interface.
MIT License
75 stars 24 forks source link

docs: comments about consensus concurrency control #45

Closed aakoshh closed 4 months ago

aakoshh commented 5 months ago

Closes #44

Added comments to all examples, the main README and the Buffer to mention that Tower layering should be used to control the concurrency of the Consensus service if the implementation of request handling in call of the actual application service is asynchronous.

An example of an asynchronous implementation is here, which exhibited transaction reordering.

Implementation notes

I found that I needed to do the following combo to make it work with ABCI++ in v0.37:

This shouldn't be an issue with v0.38 which uses finalize_block.

I thought about adding it as an example to kvstore_037 but it would needlessly complicate it, as it's immune by the virtue of being synchronous.