runtime/consensus/verifier: Support trust root consensus layer upgrades
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"}
Codecov Report
Merging #4903 (dbdd00f) into master (5a149fc) will increase coverage by
0.10%. The diff coverage is71.42%.
:exclamation: 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%) |
:arrow_up: |
| ...onsensus/tendermint/apps/beacon/state/state_vrf.go | 73.33% <0.00%> (-13.34%) |
:arrow_down: |
| go/worker/common/committee/p2p.go | 70.00% <0.00%> (-6.67%) |
:arrow_down: |
| go/worker/common/p2p/dispatch.go | 71.52% <0.00%> (-5.56%) |
:arrow_down: |
| go/genesis/api/api.go | 68.42% <0.00%> (-5.50%) |
:arrow_down: |
| go/worker/beacon/tx_retry.go | 90.47% <0.00%> (-4.77%) |
:arrow_down: |
| .../worker/compute/executor/committee/transactions.go | 86.36% <0.00%> (-4.55%) |
:arrow_down: |
| go/common/sgx/common.go | 66.01% <0.00%> (-3.89%) |
:arrow_down: |
| go/consensus/tendermint/full/light.go | 59.25% <0.00%> (-3.71%) |
:arrow_down: |
| ... 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.