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

runtime/consensus/tendermint/verifier: Support same-block validation #5300

Merged
merged 4 commits into from Jul 4, 2023

Conversation

peternose
Copy link
Contributor

@peternose peternose commented Jul 3, 2023

Using metadata transaction to verify the latest consensus block. These changes should allow queries for the latest runtime state.

Currently, light blocks are fetched twice for the same height, i.e. before sending light block to the runtime, and when doing runtime header verification. This could be optimized by sending height instead of a block.

go/runtime/registry/host.go Outdated Show resolved Hide resolved
go/runtime/registry/host.go Outdated Show resolved Hide resolved
go/runtime/registry/host.go Outdated Show resolved Hide resolved
@peternose peternose force-pushed the peternose/feature/same-block-validation branch from d640e69 to ebf412c Compare July 3, 2023 23:36
@peternose peternose marked this pull request as ready for review July 3, 2023 23:56
@peternose peternose added c:breaking/runtime Category: breaking runtime changes c:breaking Category: breaking code change and removed c:breaking/runtime Category: breaking runtime changes c:breaking Category: breaking code change labels Jul 3, 2023
if err != nil {
return nil, fmt.Errorf("client: failed to get epoch at height %d: %w", annBlk.Height, err)
}
// TODO: Remove once same block consensus validation is deployed.
Copy link
Member

Choose a reason for hiding this comment

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

Created a task for this so we don't forget.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will create a draft PR also.

@kostko
Copy link
Member

kostko commented Jul 4, 2023

Currently, light blocks are fetched twice for the same height, i.e. before sending light block to the runtime, and when doing runtime header verification. This could be optimized by sending height instead of a block.

Yeah, makes sense, will open an issue.

@peternose peternose force-pushed the peternose/feature/same-block-validation branch from ebf412c to 0b29088 Compare July 4, 2023 13:00
@peternose peternose enabled auto-merge July 4, 2023 13:20
The post-execution state of the latest consensus block is now verified
using the block metadata transaction, effectively eliminating any block
delay for state verification.
@peternose peternose force-pushed the peternose/feature/same-block-validation branch from 0b29088 to 167d666 Compare July 4, 2023 13:25
@peternose peternose merged commit 94815c8 into master Jul 4, 2023
3 checks passed
@peternose peternose deleted the peternose/feature/same-block-validation branch July 4, 2023 13:51
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.

None yet

2 participants