From f76726c84b28dc8af8b45420ee5d23e8777c8165 Mon Sep 17 00:00:00 2001 From: z-bowen Date: Wed, 12 Sep 2018 13:06:27 +0200 Subject: [PATCH] Problem: We need a way to synchronize a halt to block production to allow for upgrades across breaking changes Solution: Created `MigrationElection` --- .../transaction_migration_election_v2.0.yaml | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 bigchaindb/common/schema/transaction_migration_election_v2.0.yaml diff --git a/bigchaindb/common/schema/transaction_migration_election_v2.0.yaml b/bigchaindb/common/schema/transaction_migration_election_v2.0.yaml new file mode 100644 index 00000000..7905d884 --- /dev/null +++ b/bigchaindb/common/schema/transaction_migration_election_v2.0.yaml @@ -0,0 +1,44 @@ +# Copyright BigchainDB GmbH and BigchainDB contributors +# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0) +# Code is Apache-2.0 and docs are CC-BY-4.0 + +--- +"$schema": "http://json-schema.org/draft-04/schema#" +type: object +title: Migration Election Schema - Propose a halt in block production to allow for a version change +required: +- operation +- asset +- outputs +properties: + operation: + type: string + value: "MIGRATION_ELECTION" + asset: + additionalProperties: false + properties: + data: + additionalProperties: false + properties: + seed: + type: string + required: + - data + outputs: + type: array + items: + "$ref": "#/definitions/output" +definitions: + output: + type: object + properties: + condition: + type: object + required: + - uri + properties: + uri: + type: string + pattern: "^ni:///sha-256;([a-zA-Z0-9_-]{0,86})[?]\ + (fpt=ed25519-sha-256(&)?|cost=[0-9]+(&)?|\ + subtypes=ed25519-sha-256(&)?){2,3}$"