cosmos-sdk icon indicating copy to clipboard operation
cosmos-sdk copied to clipboard

EPIC: Baseapp++

Open tac0turtle opened this issue 3 years ago • 8 comments
trafficstars

Summary

Tendermint team has been working on a refactor of the abci layer to enable more use cases. This has been a requested feature by many users and will be a focus of the sdk team once a release of 0.36 is cut and SDK team has completed app wiring migration.

More Information can be found on the design here: https://github.com/tendermint/tendermint/tree/master/spec/abci%2B%2B

Phase 1

Phase 1 of baseapp++ will be focused on prepare proposal and process proposal.

  • [x] #12770
  • [x] #13150
  • [x] #13151
  • [ ] Release baseapp

Phase 2

Phase 2 of baseapp++ will commence once tendermint releases a version of abci with vote extensions and finalise block

  • [ ] ADR for vote extensions and finalise block
  • [ ] Implement vote extensions
  • [ ] Implement finalize block
  • [ ] Release Baseapp

For Admin Use

  • [x] Not duplicate issue
  • [ ] Appropriate labels applied
  • [ ] Appropriate contributors tagged
  • [ ] Contributor assigned/self-assigned

tac0turtle avatar Jun 15 '22 20:06 tac0turtle

Is the plan to switch to the newly introduced "same block execution" or keep using "next block execution"?

Asking to learn - why would we prefer one over the other in the SDK?

p0mvn avatar Jun 26 '22 15:06 p0mvn

I think the idea here @p0mvn is to refactor/update the BaseApp implementation to implement the new ABCI++ interface and deprecate or remove the old methods.

alexanderbez avatar Jun 26 '22 23:06 alexanderbez

Is the plan to switch to the newly introduced "same block execution" or keep using "next block execution"?

Asking to learn - why would we prefer one over the other in the SDK?

We will continue to use next-block execution because the sdk is built with the off by one approach of delayed execution (next-block execution), if we move to immediate execution (same-block execution) we would need to refactor quite a few things

tac0turtle avatar Jun 26 '22 23:06 tac0turtle

The ability to do same block execution would be nice, how bad would the refactor be @marbar3778 ?

itsdevbear avatar Sep 30 '22 21:09 itsdevbear

immediate execution would be a fairly hefty rewrite, I believe, as staking and other modules assume H+1. Optimistic execution, where we start execution in the process proposal phase is a lot lighter of a lift

tac0turtle avatar Oct 02 '22 12:10 tac0turtle

Yeah it's not trivial because as @marbar3778 pointed out there are various places in the SDK where we have this "off by 1" assumption, so it's not just a few changes to baseapp :-/

In any case, we're proposing the execute the entire block in ProcessProposal, where apps (if they decide) can actually execute this in parallel with Tendermint's voting rounds.

alexanderbez avatar Oct 02 '22 18:10 alexanderbez

Immediate execution seems like the "more correct" way to do things long term though? Should improve UX a lot since chain will feel "snappier" when using. Less important in a world of sub second block times, but still seems important?

I know this would mess with the distributor for sure, but I presume also evidence crisis etc. would need a big refactor. Would optimistic processing get close to similar performance?

itsdevbear avatar Oct 03 '22 19:10 itsdevbear

Long term? Yes. It's not on our immediate roadmap though as ABCI++ integration is more important along with store improvements as that is the biggest pain point atm. People don't really mind the current execution model, granted it is annoying.

alexanderbez avatar Oct 03 '22 21:10 alexanderbez