-
Notifications
You must be signed in to change notification settings - Fork 86
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
BSIP Draft: Versioning BitShares and Block Producer Publishing Version #120
Open
xeroc
wants to merge
2
commits into
bitshares:master
Choose a base branch
from
blockchainprojects:bsip-versioning-bitshares-and-witness-publishing-version
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
83 changes: 83 additions & 0 deletions
83
bsip-versioning-bitshares-and-witness-publishing-version.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
BSIP: <NUMBER> | ||
Title: Create versioning for the Bitshares Blockchain | ||
Authors: Fabian Schuh <https://github.com/xeroc> | ||
Status: Draft | ||
Type: Protocol | ||
Created: 2018-10-11 | ||
Discussion: https://github.com/bitshares/bitshares-core/issues/1173 | ||
Worker: <Id of worker proposal> | ||
|
||
# Abstract | ||
|
||
In BitShares witnesses serve as a neutral third party. They are validating | ||
signatures and timestamping transactions by including them in blocks. One | ||
elected witness is signing the block and applying it to the database, hence | ||
changing the state of the database. | ||
|
||
Due to consensus requirements, all witnesses need to agree on the set of rules, | ||
i.e., the protocol. Currently there is no way to tell whether a witness-node | ||
has an outdated version running or not. | ||
|
||
To solve this problem this BSIP introduces a way to store the version of the witness | ||
on the blockchain. Furthermore a versioning scheme, which is currently | ||
not part of the BitShares code, will be introduced to represent the version. | ||
|
||
# Motivation | ||
|
||
In case of a protocol upgrade a witness running an old version of the BitShares | ||
code will be unable to validate a transaction, which was introduced with the | ||
new upgrade. The transaction won't be applied to the blockchain. If the majority | ||
of the block producers agreed on a version different from the one used locally, the | ||
local blockchain will get stuck with no meaningful reason provided. | ||
|
||
The goal is to provide means to the node operators to identify that the | ||
blockchain protocol has advanced. This could be achieved by monitoring the | ||
blockchain and notifying the nodes when a outdated version is detected. | ||
|
||
# Specifications | ||
|
||
## Witness Object | ||
|
||
The `witness_object` is added a `running_version` variable. It shows the | ||
current running version of a particular witness. | ||
|
||
With every signed block it will be checked that, the `running_version` hasn't | ||
changed. If `running_version != current_version`, `running_version` is replaced | ||
by `current_version`. Also `current_version` is included in to the current | ||
block, so everyone can see that it has upgraded its code. | ||
|
||
## Versioning | ||
|
||
The used versioning scheme is `Major.Minor.Patch`. | ||
- Major: consensus changes | ||
- Minor: changes not impacting consensus | ||
- Patch: hotfix | ||
|
||
For the pupose of this BSIP a `version` class is used. It contains the three | ||
numbers of the version and the `hardfork_time`, which shows when the hardfork | ||
occured. | ||
|
||
For clarification all occurences of `HARDFORK_XXX_TIME` are changed to | ||
`HARDFORK_XXX_VERSION`. To not change the old behaviour in the code, operator | ||
overloads for adding/subtracting time offsets for: | ||
- `uint_32` | ||
- `fc::microseconds` | ||
- `fc::time_point_sec` | ||
were added to the `version` class. | ||
|
||
When the version of the witness changes, it is included in to the block. | ||
Also the `witness_object.running_version` is modified in this case. | ||
|
||
# Discussion | ||
|
||
To be found in the forum - see link above. | ||
|
||
# Summary for Shareholders | ||
|
||
This BSIP introduces a way to publish the running version of a witness to the | ||
blockchain. It greatly reduces the risk of having an outdated version running | ||
on a witness node. | ||
|
||
# Copyright | ||
|
||
This document is placed in the public domain. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: should be "purpose" instead of "pupose"