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/verifier: Support trust root consensus layer upgrades #4903

Merged
merged 2 commits into from
Sep 1, 2022

Conversation

peternose
Copy link
Contributor

@peternose peternose commented Aug 24, 2022

Tested locally. Without changes compute workers are stuck with error messages Consensus verifier failed to initialize.

{"err":"builder: I/O error\n\nCaused by:\n   0: rpc error\n   1: server error: module: consensus code: 3 message: consensus: version not found\n, ...}

With changes compute workers report error message Not enough trust to accept new chain context when there is not enough trust to do the transition

{"level":"info","log_event":"consensus/tendermint/verifier/chain_context/no_trust","module":"runtime/consensus/tendermint/verifier","msg":"Not enough trust to accept new chain context","runtime_id":"8000000000000000000000000000000000000000000000000000000000000000","runtime_name":"test-runtime","tally":"VotingPowerTally { total: 3, tallied: 2, trust_threshold: TrustThresholdFraction { numerator: 2, denominator: 3 } }","ts":"2022-08-24T04:30:43.604572699Z"}

or Failed to accept new chain context if new light blocks are invalid (e.g. invalid time, height, hash, ...).

{"error":"NonIncreasingHeight(NonIncreasingHeightSubdetail { got: block::Height(46), expected: block::Height(51) })","level":"info","log_event":"consensus/tendermint/verifier/chain_context/failed","module":"runtime/consensus/tendermint/verifier","msg":"Failed to accept new chain context","runtime_id":"8000000000000000000000000000000000000000000000000000000000000000","runtime_name":"test-runtime","ts":"2022-08-24T04:29:42.405580653Z"}

@peternose peternose force-pushed the peternose/feature/trust-root branch 4 times, most recently from e7dca1b to e00dc3a Compare August 24, 2022 08:29
@codecov
Copy link

codecov bot commented Aug 24, 2022

Codecov Report

Merging #4903 (dbdd00f) into master (5a149fc) will increase coverage by 0.10%.
The diff coverage is 71.42%.

❗ Current head dbdd00f differs from pull request most recent head c77ee97. Consider uploading reports for the commit c77ee97 to get more accurate results

@@            Coverage Diff             @@
##           master    #4903      +/-   ##
==========================================
+ Coverage   66.60%   66.70%   +0.10%     
==========================================
  Files         464      464              
  Lines       50981    50984       +3     
==========================================
+ Hits        33955    34011      +56     
+ Misses      12834    12795      -39     
+ Partials     4192     4178      -14     
Impacted Files Coverage Δ
go/runtime/host/protocol/types.go 54.54% <ø> (ø)
go/runtime/registry/host.go 75.10% <71.42%> (+6.09%) ⬆️
...onsensus/tendermint/apps/beacon/state/state_vrf.go 73.33% <0.00%> (-13.34%) ⬇️
go/worker/common/committee/p2p.go 70.00% <0.00%> (-6.67%) ⬇️
go/worker/common/p2p/dispatch.go 71.52% <0.00%> (-5.56%) ⬇️
go/genesis/api/api.go 68.42% <0.00%> (-5.50%) ⬇️
go/worker/beacon/tx_retry.go 90.47% <0.00%> (-4.77%) ⬇️
.../worker/compute/executor/committee/transactions.go 86.36% <0.00%> (-4.55%) ⬇️
go/common/sgx/common.go 66.01% <0.00%> (-3.89%) ⬇️
go/consensus/tendermint/full/light.go 59.25% <0.00%> (-3.71%) ⬇️
... and 31 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@peternose peternose marked this pull request as ready for review August 24, 2022 09:03
@peternose peternose force-pushed the peternose/feature/trust-root branch 7 times, most recently from 5fd68c9 to 77e39bd Compare August 26, 2022 10:25
.buildkite/scripts/test_e2e.sh Show resolved Hide resolved
.buildkite/code.pipeline.yml Outdated Show resolved Hide resolved
go/oasis-test-runner/scenario/e2e/runtime/trust_root.go Outdated Show resolved Hide resolved
@peternose peternose force-pushed the peternose/feature/trust-root branch 2 times, most recently from 260040a to ea911f6 Compare August 26, 2022 12:12
@peternose peternose requested a review from kostko August 29, 2022 08:36
.buildkite/code.pipeline.yml Outdated Show resolved Hide resolved
runtime/src/consensus/tendermint/verifier.rs Outdated Show resolved Hide resolved
@peternose peternose requested a review from kostko August 31, 2022 09:39
Copy link
Member

@kostko kostko left a comment

Choose a reason for hiding this comment

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

Looks nice, thanks! Just one minor thing that could maybe be changed.

go/runtime/host/protocol/types.go Show resolved Hide resolved
@@ -242,6 +242,15 @@ func (h *runtimeHostHandler) Handle(ctx context.Context, body *protocol.Body) (*
Block: *lb,
}}, nil
}
if body.HostFetchGenesisHeightRequest != nil {
doc, err := h.consensus.GetGenesisDocument(ctx)
Copy link
Member

Choose a reason for hiding this comment

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

Could also introduce the GetGenesisBlock method to the consensus backend.

@peternose peternose merged commit b64e8b5 into master Sep 1, 2022
@peternose peternose deleted the peternose/feature/trust-root branch September 1, 2022 21:18
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