Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom abci interface to extended Tendermint abci interface #688

Open
4 tasks done
ulbqb opened this issue Aug 4, 2023 · 4 comments · Fixed by #689
Open
4 tasks done

Custom abci interface to extended Tendermint abci interface #688

ulbqb opened this issue Aug 4, 2023 · 4 comments · Fixed by #689
Assignees
Labels
C: proposal Classification: Proposal for specification, algorithm, architecture, or communication Stale For github bot

Comments

@ulbqb
Copy link
Member

ulbqb commented Aug 4, 2023

Protocol Change Proposal

Note
This proposal is not breaking change.

Summary

I propose to make current Ostracon ABCI interface extended Tendermint abci interface.

Problem Definition

Many things must be done to leverage the cosmos ecosystem.

This proposal reduces tasks for abci interface diff.

Proposal

I propose following changes.

- message RequestBeginBlock {
-   bytes                          hash                    = 1;
-   tendermint.types.Header        header                  = 2 [(gogoproto.nullable) = false];
-   tendermint.abci.LastCommitInfo last_commit_info        = 3 [(gogoproto.nullable) = false];
-   repeated tendermint.abci.Evidence byzantine_validators = 4 [(gogoproto.nullable) = false];
- 
-   // *** Ostracon Extended Fields ***
-   ostracon.types.Entropy entropy = 1000 [(gogoproto.nullable) = false];
- }

+ message RequestPreBeginBlock {
+   ostracon.types.Entropy entropy = 1 [(gogoproto.nullable) = false];
+ }
+ 
+ message ResponsePreBeginBlock {}

service ABCIApplication {
  rpc Echo(tendermint.abci.RequestEcho) returns (tendermint.abci.ResponseEcho);
  rpc Flush(tendermint.abci.RequestFlush) returns (tendermint.abci.ResponseFlush);
  rpc Info(tendermint.abci.RequestInfo) returns (tendermint.abci.ResponseInfo);
  rpc SetOption(tendermint.abci.RequestSetOption) returns (tendermint.abci.ResponseSetOption);
  rpc DeliverTx(tendermint.abci.RequestDeliverTx) returns (tendermint.abci.ResponseDeliverTx);
  rpc CheckTx(tendermint.abci.RequestCheckTx) returns (ResponseCheckTx);
  rpc Query(tendermint.abci.RequestQuery) returns (tendermint.abci.ResponseQuery);
  rpc Commit(tendermint.abci.RequestCommit) returns (tendermint.abci.ResponseCommit);
  rpc InitChain(tendermint.abci.RequestInitChain) returns (tendermint.abci.ResponseInitChain);
-   rpc BeginBlock(RequestBeginBlock) returns (tendermint.abci.ResponseBeginBlock);
+   rpc PreBeginBlock(PreRequestBeginBlock) returns (PreResponseBeginBlock);
+   rpc BeginBlock(tendermint.abci.RequestBeginBlock) returns (tendermint.abci.ResponseBeginBlock);
  rpc EndBlock(tendermint.abci.RequestEndBlock) returns (tendermint.abci.ResponseEndBlock);
  rpc ListSnapshots(tendermint.abci.RequestListSnapshots) returns (tendermint.abci.ResponseListSnapshots);
  rpc OfferSnapshot(tendermint.abci.RequestOfferSnapshot) returns (tendermint.abci.ResponseOfferSnapshot);
  rpc LoadSnapshotChunk(tendermint.abci.RequestLoadSnapshotChunk) returns (tendermint.abci.ResponseLoadSnapshotChunk);
  rpc ApplySnapshotChunk(tendermint.abci.RequestApplySnapshotChunk) returns (tendermint.abci.ResponseApplySnapshotChunk);
  rpc BeginRecheckTx(RequestBeginRecheckTx) returns (ResponseBeginRecheckTx);
  rpc EndRecheckTx(RequestEndRecheckTx) returns (ResponseEndRecheckTx);
}

This change make current Ostracon interface purely extended Tendermint interface. Entropy is not used anywhere, so it may not be necessary to implement PreBeginBlock.
Ostracon ABCI = Tendermint ABCI + PreBeginBlock + BeginRecheckTx + EndRecheckTx


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@ulbqb ulbqb self-assigned this Aug 7, 2023
@ulbqb ulbqb added the C: proposal Classification: Proposal for specification, algorithm, architecture, or communication label Aug 7, 2023
@tnasu
Copy link
Member

tnasu commented Aug 7, 2023

@ulbqb Do you mean that our change should only be adding services (and requests/responses) in the ABCI interface? I agree with your proposal since we were taking a lot of time to solve conflicts when we were doing backporting.

NOTE:

rpc CheckTx(tendermint.abci.RequestCheckTx) returns (ResponseCheckTx);

we can also update ResponseCheckTx now.

@ulbqb ulbqb changed the title Ostracon ABCI interface to extended tendermint abci interface Ostracon abci interface to extended Tendermint abci interface Aug 8, 2023
@ulbqb
Copy link
Member Author

ulbqb commented Aug 8, 2023

Do you mean that our change should only be adding services (and requests/responses) in the ABCI interface?

Yes.

@ulbqb
Copy link
Member Author

ulbqb commented Aug 8, 2023

It was decided to just delete Entropy from RequestBeginBlock in a private discussion. Sending Entropy to SDK is pending until It's time to use Entropy.

Also, sending Entropy has following considerations:

  • Timing (before BeginBlock? before EndBlock?)
  • Height may be required to send Entropy.

@ulbqb
Copy link
Member Author

ulbqb commented Aug 9, 2023

we can also update ResponseCheckTx now.

OK, let's update ResponseCheckTx as well.

@ulbqb ulbqb changed the title Ostracon abci interface to extended Tendermint abci interface Custom abci interface to extended Tendermint abci interface Aug 9, 2023
@github-actions github-actions bot added the Stale For github bot label Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: proposal Classification: Proposal for specification, algorithm, architecture, or communication Stale For github bot
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants