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

go/roothash: Drop support for multiple committees #3179

Merged
merged 3 commits into from
Aug 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changelog/3179.breaking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
go/roothash: Drop support for multiple committees

Since there is currently no transaction scheduler implementation which would
support multiple committees, there is no sense in having the merge node as it
could be a source of bugs.

The merge node is also the only client for the Merge* storage operations, so
they can just be removed in order to reduce the exposed API surface.
31 changes: 0 additions & 31 deletions docs/consensus/roothash.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,35 +46,4 @@ type ExecutorCommit struct {
[executor commitments]: https://pkg.go.dev/github.com/oasisprotocol/oasis-core/go/roothash/api/commitment?tab=doc#ExecutorCommitment
<!-- markdownlint-enable line-length -->

### Merge Commit

The merge commit method allows a merge node to submit commitments of an executed
state merge. A new merge commit transaction can be generated using
[`NewMergeCommitTx`].

**Method name:**

```
roothash.MergeCommit
```

**Body:**

```golang
type ExecutorCommit struct {
ID common.Namespace `json:"id"`
Commits []commitment.MergeCommitment `json:"commits"`
}
```

**Fields:**

* `id` specifies the [runtime identifier] of a runtime this commit is for.
* `commits` are the [merge commitments].

<!-- markdownlint-disable line-length -->
[`NewMergeCommitTx`]: https://pkg.go.dev/github.com/oasisprotocol/oasis-core/go/roothash/api?tab=doc#NewMergeCommitTx
[merge commitments]: https://pkg.go.dev/github.com/oasisprotocol/oasis-core/go/roothash/api/commitment?tab=doc#MergeCommitment
<!-- markdownlint-enable line-length -->

## Events
2 changes: 1 addition & 1 deletion docs/images/oasis-core-high-level.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/images/oasis-core-runtime-details.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ implementations.
* Transaction Processing Pipeline
* Transaction Scheduler Nodes
* Executor Nodes
* Merge Nodes
* Storage Nodes
* Key Manager Nodes
* Oasis Node (`oasis-node`)
Expand Down
4 changes: 0 additions & 4 deletions docs/oasis-node/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ oasis_storage_successes | Counter | Number of storage successes. | call | [stora
oasis_storage_value_size | Summary | Storage call value size (bytes). | call | [storage](../../go/storage/metrics.go)
oasis_up | Gauge | Is oasis-test-runner active for specific scenario. | | [oasis-node/cmd/common/metrics](../../go/oasis-node/cmd/common/metrics/metrics.go)
oasis_worker_aborted_batch_count | Counter | Number of aborted batches. | runtime | [worker/compute/executor/committee](../../go/worker/compute/executor/committee/node.go)
oasis_worker_aborted_merge_count | Counter | Number of aborted merges. | runtime | [worker/compute/merge/committee](../../go/worker/compute/merge/committee/node.go)
oasis_worker_batch_processing_time | Summary | Time it takes for a batch to finalize (seconds). | runtime | [worker/compute/executor/committee](../../go/worker/compute/executor/committee/node.go)
oasis_worker_batch_read_time | Summary | Time it takes to read a batch from storage (seconds). | runtime | [worker/compute/executor/committee](../../go/worker/compute/executor/committee/node.go)
oasis_worker_batch_runtime_processing_time | Summary | Time it takes for a batch to be processed by the runtime (seconds). | runtime | [worker/compute/executor/committee](../../go/worker/compute/executor/committee/node.go)
Expand All @@ -85,12 +84,9 @@ oasis_worker_epoch_number | Gauge | Current epoch number as seen by the worker.
oasis_worker_epoch_transition_count | Counter | Number of epoch transitions. | runtime | [worker/common/committee](../../go/worker/common/committee/node.go)
oasis_worker_execution_discrepancy_detected_count | Counter | Number of detected execute discrepancies. | runtime | [worker/compute/executor/committee](../../go/worker/compute/executor/committee/node.go)
oasis_worker_failed_round_count | Counter | Number of failed roothash rounds. | runtime | [worker/common/committee](../../go/worker/common/committee/node.go)
oasis_worker_inconsistent_merge_root_count | Counter | Number of inconsistent merge roots. | runtime | [worker/compute/merge/committee](../../go/worker/compute/merge/committee/node.go)
oasis_worker_merge_discrepancy_detected_count | Counter | Number of detected merge discrepancies. | runtime | [worker/compute/merge/committee](../../go/worker/compute/merge/committee/node.go)
oasis_worker_node_registered | Gauge | Is oasis node registered (binary). | | [worker/registration](../../go/worker/registration/worker.go)
oasis_worker_processed_block_count | Counter | Number of processed roothash blocks. | runtime | [worker/common/committee](../../go/worker/common/committee/node.go)
oasis_worker_processed_event_count | Counter | Number of processed roothash events. | runtime | [worker/common/committee](../../go/worker/common/committee/node.go)
oasis_worker_roothash_merge_commit_latency | Summary | Latency of roothash merge commit (seconds). | runtime | [worker/compute/merge/committee](../../go/worker/compute/merge/committee/node.go)
oasis_worker_storage_commit_latency | Summary | Latency of storage commit calls (state + outputs) (seconds). | runtime | [worker/compute/executor/committee](../../go/worker/compute/executor/committee/node.go)
oasis_worker_storage_full_round | Gauge | The last round that was fully synced and finalized. | runtime | [worker/storage/committee](../../go/worker/storage/committee/node.go)
oasis_worker_storage_pending_round | Gauge | The last round that is in-flight for syncing. | runtime | [worker/storage/committee](../../go/worker/storage/committee/node.go)
Expand Down
1 change: 0 additions & 1 deletion docs/runtime/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ roles (it can have multiple roles at once):

* Transaction scheduler.
* Executor node (primary or backup).
* Merge node (primary or backup).

Subject to runtime configuration, each committee can contain multiple nodes of
the same kind (e.g., multiple executor nodes). Some are considered _primary_
Expand Down
2 changes: 1 addition & 1 deletion docs/toc.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* [Operation Model](runtime/index.md#operation-model)
* [Runtime Host Protocol](runtime/runtime-host-protocol.md)
* [Identifiers](runtime/identifiers.md)
* Oasis Node (`oasis-node`)
* Oasis Node
* [RPC](oasis-node/rpc.md)
* [Metrics](oasis-node/metrics.md)

Expand Down
6 changes: 3 additions & 3 deletions go/common/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,19 @@ var (
// the runtime.
//
// NOTE: This version must be synced with runtime/src/common/version.rs.
RuntimeHostProtocol = Version{Major: 0, Minor: 15, Patch: 0}
RuntimeHostProtocol = Version{Major: 0, Minor: 16, Patch: 0}

// RuntimeCommitteeProtocol versions the P2P protocol used by the runtime
// committee members.
RuntimeCommitteeProtocol = Version{Major: 0, Minor: 10, Patch: 0}
RuntimeCommitteeProtocol = Version{Major: 0, Minor: 11, Patch: 0}

// ConsensusProtocol versions all data structures and processing used by
// the epochtime, beacon, registry, roothash, etc. modules that are
// backend by consensus.
//
// NOTE: Any change in the major or minor versions are considered
// breaking changes for the protocol.
ConsensusProtocol = Version{Major: 0, Minor: 26, Patch: 0}
ConsensusProtocol = Version{Major: 0, Minor: 27, Patch: 0}

// Tendermint exposes the tendermint core version.
Tendermint = parseSemVerStr(version.TMCoreSemVer)
Expand Down
12 changes: 0 additions & 12 deletions go/consensus/tendermint/apps/roothash/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,24 +68,12 @@ type ValueExecutorCommitted struct {
Event roothash.ExecutorCommittedEvent `json:"event"`
}

// ValueMergeCommitted is the value component of a KeyMergeCommitted.
type ValueMergeCommitted struct {
ID common.Namespace `json:"id"`
Event roothash.MergeCommittedEvent `json:"event"`
}

// ValueFinalized is the value component of a TagFinalized.
type ValueFinalized struct {
ID common.Namespace `json:"id"`
Round uint64 `json:"round"`
}

// ValueMergeDiscrepancyDetected is the value component of a KeyMergeDiscrepancyDetected.
type ValueMergeDiscrepancyDetected struct {
Event roothash.MergeDiscrepancyDetectedEvent `json:"event"`
ID common.Namespace `json:"id"`
}

// ValueExecutionDiscrepancyDetected is the value component of a KeyMergeDiscrepancyDetected.
type ValueExecutionDiscrepancyDetected struct {
ID common.Namespace `json:"id"`
Expand Down
Loading