Skip to content

Optimize ABCI Response Information and flag to save ABCI results #8028 #8946 - #9090

Merged
samricotta merged 29 commits into
v0.35.xfrom
sam/abci-responses
Aug 2, 2022
Merged

samricotta merged 29 commits into
v0.35.xfrom
sam/abci-responses

Conversation

@samricotta

@samricotta samricotta commented Jul 25, 2022 •

Copy link
Copy Markdown
Contributor

Closes: #8028, #8946

Adds a flag to the config.go which enables discarding of abci responses. This flag is used when saving and loading the abciresponses to overwrite the current abciresponses with the last response. This way the node operator can decide if they would like to save or discard the responses for efficiency purposes.

(@cmwaters) NOTE: A different solution is used for ABCI++ branches whereby the last ABCI responses are not needed for crash recovery

@cason

cason commented Jul 25, 2022

Copy link
Copy Markdown

I would remove #9054 from the list of issues closed by this PR, as it is WIP (i.e., more dependencies can be linked).

@cmwaters

Copy link
Copy Markdown
Contributor

I would remove #9054 from the list of issues closed by this PR, as it is WIP (i.e., more dependencies can be linked).

I think that issue is pretty tightly scoped. I don't think there will be anything else pinned to it but if everyone else wants, we can just reference it instead of closing it

@cason

cason commented Jul 25, 2022

Copy link
Copy Markdown

I based my observation on this comment, and the Thane's reply to it:

#9054 (comment)

@cmwaters cmwaters added the S:backport-to-v0.34.x Tell mergify to backport the PR to v0.34.x label Jul 25, 2022

@creachadair creachadair left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Another subtlety that we should document somewhere is that changing this setting is a one-way operation: If you have responses enabled and disable them, you can't safely "re-enable" them later, as the key layout is different for the two modes (and of course, there's no way to recover "missed" heights).

Also, I wonder: Do we need to provide some kind of migration for when these are first turned on, to ensure the existing per-height key is converted to be a single global key?

Comment thread config/config.go Resolved
Comment thread config/config.go Resolved
@cmwaters

Copy link
Copy Markdown
Contributor

Another subtlety that we should document somewhere is that changing this setting is a one-way operation: If you have responses enabled and disable them, you can't safely "re-enable" them later, as the key layout is different for the two modes (and of course, there's no way to recover "missed" heights).

Can you elaborate. In my head, I don't see why you couldn't re-enable them. It will start persisting responses from that height onwards.

@cmwaters

Copy link
Copy Markdown
Contributor

I think adding a single boolean flag to an object like the state store reduces the readability and can cause more confusion as soon as you need a second option. I might be inclined to either pass an options struct or pass a configuration object it self (so you get keyword arguments, in effect) but I don't think there's any particularly problem with this as is.

I think that makes sense

(Just checking this doesn't need to go into master)

Nope just this, v0.34 and main

@mark-rushakoff mark-rushakoff left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I mostly just left some style comments as I am still building context on the codebase.

Comment thread CHANGELOG_PENDING.md Resolved
Comment thread internal/state/store.go Resolved
Comment thread internal/state/store.go Resolved
Comment thread internal/state/store.go Resolved
Comment thread internal/state/store.go Resolved
Comment thread internal/state/store.go Resolved
Comment thread internal/state/store.go Resolved
Comment thread internal/state/store.go Resolved
Comment thread internal/state/store_test.go Resolved
Comment thread internal/state/store_test.go Resolved

@williambanfield williambanfield left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Mostly style comments, in general the logic looks correct.

Comment thread internal/state/store.go Resolved
Comment thread internal/state/store.go Resolved
Comment thread internal/state/store.go Resolved
Comment thread internal/state/store.go Resolved
Comment thread internal/state/store.go Resolved
Comment thread internal/state/store_test.go Resolved
Comment thread internal/state/store_test.go Resolved
Comment thread test/e2e/generator/generate.go Resolved
Comment thread proto/tendermint/state/types.proto Resolved
Comment thread config/config.go Resolved
@samricotta
samricotta changed the base branch from v0.35.x to v0.34.x August 2, 2022 07:59
@samricotta
samricotta changed the base branch from v0.34.x to 0.35x August 2, 2022 09:25
@samricotta
samricotta changed the base branch from 0.35x to v0.35.x August 2, 2022 09:28
@samricotta
samricotta merged commit 312a505 into v0.35.x Aug 2, 2022
@samricotta
samricotta deleted the sam/abci-responses branch August 2, 2022 09:55
samricotta added a commit that referenced this pull request Aug 11, 2022
*backport of sam/abci-responses

Co-authored-by: William Banfield <[email protected]>
samricotta added a commit that referenced this pull request Aug 11, 2022
*backport of sam/abci-responses

Co-authored-by: William Banfield <[email protected]>
samricotta added a commit that referenced this pull request Aug 11, 2022
*backport of sam/abci-responses

Co-authored-by: William Banfield <[email protected]>
@thanethomson thanethomson mentioned this pull request Aug 17, 2022
4 tasks done
samricotta added a commit that referenced this pull request Aug 18, 2022
*backport of sam/abci-responses

Co-authored-by: William Banfield <[email protected]>
samricotta added a commit that referenced this pull request Aug 19, 2022
*backport of sam/abci-responses

Co-authored-by: William Banfield <[email protected]>
samricotta added a commit that referenced this pull request Aug 22, 2022
* Backport of sam/abci-responses (#9090) (#9159)

Signed-off-by: Thane Thomson <[email protected]>
Co-authored-by: William Banfield <[email protected]>
Co-authored-by: Thane Thomson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S:backport-to-v0.34.x Tell mergify to backport the PR to v0.34.x

Projects

Status: Done/Merged

Development

Successfully merging this pull request may close these issues.

7 participants