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

fix(kvstore): Same-block execution support for persistent KV store #452

Merged

Conversation

lklimek
Copy link
Collaborator

@lklimek lklimek commented Sep 5, 2022

Issue being fixed or feature implemented

What was done?

How Has This Been Tested?

Breaking Changes

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

Copy link
Collaborator

@shotonoff shotonoff left a comment

Choose a reason for hiding this comment

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

🚀

@@ -36,11 +34,19 @@ type State struct {
db dbm.DB
Height int64 `json:"height"`
AppHash tmbytes.HexBytes `json:"app_hash"`

// validator set update
valSetUpdate types.ValidatorSetUpdate
Copy link
Collaborator

Choose a reason for hiding this comment

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

I deprecated storing validator set update from db in my refactoring

@lklimek lklimek marked this pull request as ready for review September 5, 2022 09:13
@lklimek lklimek merged commit a4c3595 into proof-of-concept-same-block-execution Sep 5, 2022
@lklimek lklimek deleted the sbe-persistent-kvstore branch September 5, 2022 09:13
lklimek added a commit that referenced this pull request Sep 9, 2022
* refactor: decouple dash parameters from a MakeBlock function to a Block.SetDashParams method

* feat: add node's pro-rtx-hash into a context

* feat: add proTxHash into context for consensus/reactor_test.go

* feat: some modifications for PoC same-block execution

* feat: change an updated struct from round state on uncommitted-state

* feat: support next-validators as for next-block execution mode

* feat: support next-validators for same-block execution mode

* feat: some modifications for next-core-lock

* chore: same block execution state/state_test.go (WIP)

* test(state): fix TestManyValidatorChangesSaveLoad()

* fix(state): panic on empty consensus params load

* chore(state): remove state.NextValidators

* chore(proto/abci): same block execution protobuf changes

* refactor(types): centralize generation of ResultsHash

* refactor(state): consolidate redundant code in block execution

* chore(state) execution fix for new data structures

* test(state): adapt TestProposerPriorityProposerAlternates for same block exec

* test(state): same block exec TestFourAddFourMinusOneGenesisValidators

* test(state): same block exec TestStoreLoadValidatorsIncrementsProposerPriority

* test(state): same block exec for TestManyValidatorChangesSaveLoad

* fix(state): same block exec TestConsensusParamsChangesSaveLoad

* test(state): fix TestProcessProposal

* chore(state): correct handling of ApplyBlock etc

* test(mempool): builds but fails

* refactor(state): UncommittedState now holds final values instead of updates

This was needed for clean implementation of NextValidatorsHash

* refactor(state): rename UncommittedChanges to Changeset

* chore: same block exec - block

* chore(state): state ID - start of work

* chore: SBE - block fields (WIP)

* chore: SBE chainlocks and proposed app version (WIP)

* test(state): SBE green (execution|state|validation)_test

* chore(abci): improve validation of prepare/process proposal responses

* chore(state): apphash defaults to array containing zeros

* test(state): TestStoreLoadValidators fixed for SBE

* chore(state): AppHash defaults to slice of 0s instead of nil

* chore(state): fix invalid state.LastStateID

* test(state): SBE TestPruneStates

* test(state): fix rollback_test

* fix(abci): correct handling of AppHash in Application

* test(store): update for SBE

* chore(types): rename stateID.LastAppHash to AppHash

* refactor(statesync): state provider returns AppHash as HexBytes

* test(statesync): fix for SBE

* test(consensus): show test logs on console

* test(consensus): fix byzantine test

* test(blocksync): update for SBE

* fix(state): events fired twice

* fix(consensus): proposal contains invalid chainlock height

* test(consensus): correct chainlock in initial block in SBE

* Update abci/example/kvstore/kvstore.go

Co-authored-by: lklimek <842586+lklimek@users.noreply.github.com>

* Update abci/example/kvstore/kvstore.go

Co-authored-by: lklimek <842586+lklimek@users.noreply.github.com>

* fix(state): double commits during replay

* test(consensus): fix replay handshake* tests (WIP)

* fix: evidence package

* fix: validator_conn_executor_test.go

* refactor: executing kvstore

* feat!(kvstore): same-block-execution KV store (#447)

* feat!(kvstore): same-block-execution KV store

* fix(kvstore): dstIter not closed correctly

* fix(kvstore): AppHash at genesis should be zero

* fix(kvstore): SBE support for persistent KV store (#452)

* test(proxy): fix test of Info()

* fix: some fixes and refactoring for stabilizing same-block execution (#451)

* fix: some fixes and refactoring for stabilizing same-block execution

* refactor: merge kvstore.App with kvstore.Application and remove kvstore_v2.go

* fix: kvstore_test.go

* fix: TestValUpdates

* fix: TestValUpdates

* fix: TestKVStore

* fix: rpc/client tests

* fix: make stable some tests affected by kvstore refactoring

* fix: update uncommitted state if a validator out of quorum set and a node has proposal block for the height

* Update internal/consensus/replay_test.go

Co-authored-by: lklimek <842586+lklimek@users.noreply.github.com>

* refactor: changes according to PR feedback

* fix: blocking wal_test.go because of default context

* fix: code style issues

* fix: abci-cli test

* fix: typo in struct name CurentRoundState => CurrentRoundState

* fix: a few data race issues

* fix: TestHandshakeReplayNone

* fix: ValidatorUpdate.MarshalJSON

* fix: ValidatorUpdate.UnmarshalJSON

* chore(e2e): prototype e2e test app for same-block execution

* fix(consensus): state is nil on genesis

* fix(state): invalid stateID height on genesis

* chore: improve logging

* Update abci/tests/server/client.go

Co-authored-by: lklimek <842586+lklimek@users.noreply.github.com>

* Update abci/tests/server/client.go

Co-authored-by: lklimek <842586+lklimek@users.noreply.github.com>

* Update internal/proxy/client_test.go

Co-authored-by: lklimek <842586+lklimek@users.noreply.github.com>

* refactor: changes according to PR feedback

Co-authored-by: lklimek <842586+lklimek@users.noreply.github.com>

* fix: stabilize codebase after merge / resolve conflicts

Co-authored-by: Lukasz Klimek <842586+lklimek@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants