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

state: synchronize the ProcessProposal implementation with the latest version of the spec #7961

Merged
merged 54 commits into from
Feb 25, 2022

Conversation

williambanfield
Copy link
Contributor

@williambanfield williambanfield commented Feb 22, 2022

This change implements the spec for ProcessProposal. It first calls the Tendermint block validation logic to check that all of the proposed block fields are well formed and do not violate any of the rules for Tendermint to consider the block valid and then passes the validated block the ProcessProposal.

This change also adds additional fixtures to test the change. It adds the baseMock types that holds a mock as well as a reference to BaseApplication. If the function was not setup by the test on the contained mock Application, the type delegates to the BaseApplication and returns what BaseApplication returns.

The change also switches the makeState helper to take an arg struct so that an ABCI application can be plumbed through when needed.

closes: #7656

@williambanfield williambanfield force-pushed the wb/abci-process-proposal-synchronize branch from 097f108 to b0f02a9 Compare February 22, 2022 14:19
abci/types/mocks/base.go Show resolved Hide resolved
abci/types/mocks/base.go Show resolved Hide resolved
internal/state/execution.go Show resolved Hide resolved
@williambanfield williambanfield added the S:automerge Automatically merge PR when requirements pass label Feb 25, 2022
Copy link
Contributor

@thanethomson thanethomson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Also gave me a good overview of some of the state manipulation machinery 🧑‍🎓 Just not sure why the E2E test's failing.

@mergify mergify bot merged commit c80734e into master Feb 25, 2022
@mergify mergify bot deleted the wb/abci-process-proposal-synchronize branch February 25, 2022 18:56
@sergio-mena sergio-mena added this to In progress in ABCI++ via automation Jul 6, 2022
@sergio-mena sergio-mena moved this from In progress to Done in ABCI++ Jul 6, 2022
@sergio-mena sergio-mena mentioned this pull request Jul 22, 2022
35 tasks
sergio-mena added a commit that referenced this pull request Jul 28, 2022
cmwaters added a commit that referenced this pull request Jul 28, 2022
sergio-mena added a commit that referenced this pull request Aug 3, 2022
sergio-mena added a commit that referenced this pull request Aug 3, 2022
sergio-mena added a commit that referenced this pull request Aug 3, 2022
* ----start----

* [PARTIAL cherry-pick] ABCI Vote Extension 2 (#6885)

* Cherry-picked #6567: state/types: refactor makeBlock, makeBlocks and makeTxs (#6567)

* [Cherrypicked] types: remove panic from block methods (#7501)

* [cherrypicked] abci++: synchronize PrepareProposal with the newest version of the spec (#8094)

This change implements the logic for the PrepareProposal ABCI++ method call. The main logic for creating and issuing the PrepareProposal request lives in execution.go and is tested in a set of new tests in execution_test.go. This change also updates the mempool mock to use a mockery generated version and removes much of the plumbing for the no longer used ABCIResponses.

* make proto-gen

* Backported EvidenceList's method ToABCI from #7961

* make build

* Fix mockery for Mempool

* mockery

* Backported abci Application mocks from #7961

* mockery2

* Fixed new PrepareProposal test cases in state/execution_test.go

* Fixed returned errors in consensus/state.go

* lint

* Addressed @cmwaters' comment

Co-authored-by: mconcat <monoidconcat@gmail.com>
Co-authored-by: JayT106 <JayT106@users.noreply.github.com>
Co-authored-by: Sam Kleinman <garen@tychoish.com>
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
samricotta pushed a commit that referenced this pull request Aug 16, 2022
* ----start----

* [PARTIAL cherry-pick] ABCI Vote Extension 2 (#6885)

* Cherry-picked #6567: state/types: refactor makeBlock, makeBlocks and makeTxs (#6567)

* [Cherrypicked] types: remove panic from block methods (#7501)

* [cherrypicked] abci++: synchronize PrepareProposal with the newest version of the spec (#8094)

This change implements the logic for the PrepareProposal ABCI++ method call. The main logic for creating and issuing the PrepareProposal request lives in execution.go and is tested in a set of new tests in execution_test.go. This change also updates the mempool mock to use a mockery generated version and removes much of the plumbing for the no longer used ABCIResponses.

* make proto-gen

* Backported EvidenceList's method ToABCI from #7961

* make build

* Fix mockery for Mempool

* mockery

* Backported abci Application mocks from #7961

* mockery2

* Fixed new PrepareProposal test cases in state/execution_test.go

* Fixed returned errors in consensus/state.go

* lint

* Addressed @cmwaters' comment

Co-authored-by: mconcat <monoidconcat@gmail.com>
Co-authored-by: JayT106 <JayT106@users.noreply.github.com>
Co-authored-by: Sam Kleinman <garen@tychoish.com>
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S:automerge Automatically merge PR when requirements pass
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

ABCI++: Synchronize ProcessProposal spec and implementation
3 participants