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

Roothash processing fees #2504

Merged
merged 10 commits into from
Jan 15, 2020
Merged

Roothash processing fees #2504

merged 10 commits into from
Jan 15, 2020

Conversation

kostko
Copy link
Member

@kostko kostko commented Dec 30, 2019

Part of #2406.

TODO

  • Charge per-epoch maintenance fee.
  • Suspend runtimes which did not pay the maintenance fee.
  • Restore suspended runtimes from genesis dump.
  • Resume runtimes which paid the maintenance fee.
  • Emit runtime registered event when the runtime is resumed.
  • Add missing existence checks to registerRuntime.
  • E2E tests.

@kostko kostko changed the title Kostko/feature/rt registration Roothash processing fees Dec 30, 2019
@codecov
Copy link

codecov bot commented Dec 30, 2019

Codecov Report

Merging #2504 into master will decrease coverage by 0.08%.
The diff coverage is 60.84%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2504      +/-   ##
==========================================
- Coverage   66.97%   66.89%   -0.09%     
==========================================
  Files         328      330       +2     
  Lines       30263    30498     +235     
==========================================
+ Hits        20270    20403     +133     
- Misses       7469     7538      +69     
- Partials     2524     2557      +33
Impacted Files Coverage Δ
go/roothash/api/block/header.go 72.97% <ø> (ø) ⬆️
go/consensus/tendermint/apps/roothash/query.go 56% <ø> (+7.72%) ⬆️
go/consensus/tendermint/abci/context.go 80.95% <0%> (-1.98%) ⬇️
go/common/crypto/signature/signature.go 55.26% <0%> (-2.01%) ⬇️
go/consensus/tendermint/apps/beacon/beacon.go 73.07% <100%> (ø) ⬆️
go/storage/client/client.go 76.25% <100%> (-1.53%) ⬇️
go/worker/common/committee/group.go 81.52% <100%> (+0.48%) ⬆️
go/consensus/tendermint/tests/genesis/genesis.go 96.92% <100%> (+0.25%) ⬆️
go/oasis-node/cmd/debug/byzantine/epochtime.go 100% <100%> (ø)
go/registry/api/api.go 39.19% <13.63%> (-2.06%) ⬇️
... and 40 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6d59b5f...80cb5dd. Read the comment docs.

@kostko kostko added the c:breaking/consensus Category: breaking consensus changes label Jan 3, 2020
@kostko kostko force-pushed the kostko/feature/rt-registration branch 7 times, most recently from 6f3b705 to 7cd1536 Compare January 7, 2020 12:51
@kostko kostko force-pushed the kostko/feature/rt-registration branch 6 times, most recently from 21371cd to c6acc1d Compare January 8, 2020 08:40
@kostko kostko mentioned this pull request Jan 8, 2020
@kostko kostko force-pushed the kostko/feature/rt-registration branch 7 times, most recently from 0727eb7 to 373f63f Compare January 10, 2020 12:06
@kostko kostko marked this pull request as ready for review January 10, 2020 12:52
@kostko kostko force-pushed the kostko/feature/rt-registration branch 2 times, most recently from 52f453c to ffd9087 Compare January 12, 2020 15:50
@kostko kostko force-pushed the kostko/feature/rt-registration branch 4 times, most recently from fe9724b to e130bfa Compare January 13, 2020 11:16
@@ -122,7 +122,7 @@ func (app *beaconApplication) onBeaconEpochChange(ctx *abci.Context, epoch epoch
case true:
// UNSAFE/DEBUG - Deterministic beacon.
entropyCtx = debugEntropyCtx
entropy = []byte("If you change this, you will fuck up the byzantine tests!!")
entropy = []byte("If you change this, you will fuck up the byzantine tests!!!")
Copy link
Contributor

Choose a reason for hiding this comment

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

At some point we should probably just add in hacks to the scheduler that just schedules things "correctly" for the byzantine tests.

)
return errors.Wrap(err, "registry: genesis suspended runtime registration failure")
}
var rt registry.Runtime
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of doing this, just make app.registerRuntime return (*registry.Runtime, error)?

Otherwise, the cbor.Unmarshal call failing is a sign that something when absolutely horrifically wrong since the runtime registration does an Unmarshal.

go/consensus/tendermint/apps/registry/state/state.go Outdated Show resolved Hide resolved
go/consensus/tendermint/apps/registry/state/state.go Outdated Show resolved Hide resolved
go/oasis-test-runner/scenario/e2e/identity_cli.go Outdated Show resolved Hide resolved
@kostko kostko force-pushed the kostko/feature/rt-registration branch from e130bfa to e28cc5e Compare January 14, 2020 12:45
@kostko kostko force-pushed the kostko/feature/rt-registration branch from e28cc5e to a3e3b56 Compare January 14, 2020 15:55
kostko added 10 commits January 15, 2020 09:34
This avoids the need for passing the message type as an interface{} and
thus reflection. It also cleans up some unnecessary arguments.
This refactors the rather large onCommitteeChanged method so that it is
possible to apply runtime state updates in a single pass:

- Preparation of new commitment pool structures based on the latest
  scheduler and registry states is now part of prepareNewCommittees.

- Failing to fetch either committees from scheduler state or node info
  from registry state is now a hard error as it indicates some kind of
  internal state inconsistency.
Previously the set of orphaned nodes was not cleared when doing rollback
which could have resulted in incorrect nodes being marked as orphaned.
Previously a compute worker would start processing requests even if the
runtime required a key manager but one wasn't yet available. This caused
the processing of confidential runtime transactions to fail.
@kostko kostko force-pushed the kostko/feature/rt-registration branch from a3e3b56 to 80cb5dd Compare January 15, 2020 08:35
@kostko kostko merged commit f3750b9 into master Jan 15, 2020
@kostko kostko deleted the kostko/feature/rt-registration branch January 21, 2020 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c:breaking/consensus Category: breaking consensus changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants