-
Notifications
You must be signed in to change notification settings - Fork 711
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a new
Upgrade
transaction to perform a network upgrade (#567)
Corresponding implementation: FuelLabs/fuel-vm#707 The change adds a new `Upgrade` transaction that allows upgrading either consensus parameters or state transition function used by the network to produce future blocks. The purpose of the upgrade is defined by the `Upgrade Purpose` type. The `Upgrade` transaction is chargeable, and the sender should pay for it. Transaction inputs should contain only base assets. Only the privileged address can upgrade the network. The privileged address can be either a real account or a predicate. We use postcard algorithm to serialize and deserialize consensus parameters during the upgrade. This algorithm works with numbers in a more sufficient way and compresses them well.
- Loading branch information
Showing
7 changed files
with
136 additions
and
55 deletions.
There are no files selected for viewing
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
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
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
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
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 |
---|---|---|
@@ -1,20 +1,21 @@ | ||
# Consensus Parameters | ||
|
||
| name | type | description | | ||
|-----------------------------|-----------|-----------------------------------------------| | ||
| `GAS_PER_BYTE` | `uint64` | Gas charged per byte of the transaction. | | ||
| `GAS_PRICE_FACTOR` | `uint64` | Unit factor for gas price. | | ||
| `MAX_GAS_PER_TX` | `uint64` | Maximum gas per transaction. | | ||
| `MAX_INPUTS` | `uint64` | Maximum number of inputs. | | ||
| `MAX_OUTPUTS` | `uint64` | Maximum number of outputs. | | ||
| `MAX_PREDICATE_LENGTH` | `uint64` | Maximum length of predicate, in instructions. | | ||
| `MAX_GAS_PER_PREDICATE` | `uint64` | Maximum gas per predicate. | | ||
| `MAX_PREDICATE_DATA_LENGTH` | `uint64` | Maximum length of predicate data, in bytes. | | ||
| `MAX_SCRIPT_LENGTH` | `uint64` | Maximum length of script, in instructions. | | ||
| `MAX_SCRIPT_DATA_LENGTH` | `uint64` | Maximum length of script data, in bytes. | | ||
| `MAX_MESSAGE_DATA_LENGTH` | `uint64` | Maximum length of message data, in bytes. | | ||
| `MAX_STORAGE_SLOTS` | `uint64` | Maximum number of initial storage slots. | | ||
| `MAX_TRANSACTION_SIZE` | `uint64` | Maximum size of a transaction, in bytes. | | ||
| `MAX_WITNESSES` | `uint64` | Maximum number of witnesses. | | ||
| `CHAIN_ID` | `uint64` | A unique per-chain identifier. | | ||
| `BASE_ASSET_ID` | `bytes32` | The base asset of the chain. | | ||
| name | type | description | | ||
|-----------------------------|-----------|----------------------------------------------------------------| | ||
| `GAS_PER_BYTE` | `uint64` | Gas charged per byte of the transaction. | | ||
| `GAS_PRICE_FACTOR` | `uint64` | Unit factor for gas price. | | ||
| `MAX_GAS_PER_TX` | `uint64` | Maximum gas per transaction. | | ||
| `MAX_INPUTS` | `uint64` | Maximum number of inputs. | | ||
| `MAX_OUTPUTS` | `uint64` | Maximum number of outputs. | | ||
| `MAX_PREDICATE_LENGTH` | `uint64` | Maximum length of predicate, in instructions. | | ||
| `MAX_GAS_PER_PREDICATE` | `uint64` | Maximum gas per predicate. | | ||
| `MAX_PREDICATE_DATA_LENGTH` | `uint64` | Maximum length of predicate data, in bytes. | | ||
| `MAX_SCRIPT_LENGTH` | `uint64` | Maximum length of script, in instructions. | | ||
| `MAX_SCRIPT_DATA_LENGTH` | `uint64` | Maximum length of script data, in bytes. | | ||
| `MAX_MESSAGE_DATA_LENGTH` | `uint64` | Maximum length of message data, in bytes. | | ||
| `MAX_STORAGE_SLOTS` | `uint64` | Maximum number of initial storage slots. | | ||
| `MAX_TRANSACTION_SIZE` | `uint64` | Maximum size of a transaction, in bytes. | | ||
| `MAX_WITNESSES` | `uint64` | Maximum number of witnesses. | | ||
| `CHAIN_ID` | `uint64` | A unique per-chain identifier. | | ||
| `BASE_ASSET_ID` | `bytes32` | The base asset of the chain. | | ||
| `PRIVELEGED_ADDRESS` | `bytes32` | The privileged address of the network who can perform upgrade. | | ||
This comment has been minimized.
Sorry, something went wrong. |
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
Oops, something went wrong.
Should be
PRIVILEGED_ADDRESS