Merge pull request #2535 from nspcc-dev/drop-hf-prefix

config: s/HF_Aspidochelone/Aspidochelone/
This commit is contained in:
Roman Khimov 2022-06-03 11:59:53 +03:00 committed by GitHub
commit 7a2199c495
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 9 additions and 9 deletions

View file

@ -37,7 +37,7 @@ ProtocolConfiguration:
VerifyTransactions: false
P2PSigExtensions: false
Hardforks:
HF_Aspidochelone: 1730000
Aspidochelone: 1730000
NativeActivations:
ContractManagement: [0]
StdLib: [0]

View file

@ -40,7 +40,7 @@ ProtocolConfiguration:
VerifyTransactions: false
P2PSigExtensions: false
Hardforks:
HF_Aspidochelone: 210000
Aspidochelone: 210000
NativeActivations:
ContractManagement: [0]
StdLib: [0]

View file

@ -21,7 +21,7 @@ ProtocolConfiguration:
OracleContract: [0]
Notary: [0]
Hardforks:
HF_Aspidochelone: 25
Aspidochelone: 25
ApplicationConfiguration:
# LogPath could be set up in case you need stdout logs to some proper file.

View file

@ -30,7 +30,7 @@ ProtocolConfiguration:
OracleContract: [0]
Notary: [0]
Hardforks:
HF_Aspidochelone: 25
Aspidochelone: 25
ApplicationConfiguration:
# LogPath could be set up in case you need stdout logs to some proper file.

View file

@ -204,7 +204,7 @@ protocol-related settings described in the table below.
| --- | --- | --- | --- | --- |
| CommitteeHistory | map[uint32]int | none | Number of committee members after the given height, for example `{0: 1, 20: 4}` sets up a chain with one committee member since the genesis and then changes the setting to 4 committee members at the height of 20. `StandbyCommittee` committee setting must have the number of keys equal or exceeding the highest value in this option. Blocks numbers where the change happens must be divisible by the old and by the new values simultaneously. If not set, committee size is derived from the `StandbyCommittee` setting and never changes. |
| GarbageCollectionPeriod | `uint32` | 10000 | Controls MPT garbage collection interval (in blocks) for configurations with `RemoveUntraceableBlocks` enabled and `KeepOnlyLatestState` disabled. In this mode the node stores a number of MPT trees (corresponding to `MaxTraceableBlocks` and `StateSyncInterval`), but the DB needs to be clean from old entries from time to time. Doing it too often will cause too much processing overhead, doing it too rarely will leave more useless data in the DB. |
| Hardforks | `map[string]uint32` | [] | The set of incompatible changes that affect node behaviour starting from the specified height. The default value is an empty set which should be interpreted as "each known hard-fork is applied from the zero blockchain height". The list of valid hard-fork names:<br>`HF_Aspidochelone` represents hard-fork introduced in [#2469](https://github.com/nspcc-dev/neo-go/pull/2469) (ported from the [reference](https://github.com/neo-project/neo/pull/2712)). It adjusts the prices of `System.Contract.CreateStandardAccount` and `System.Contract.CreateMultisigAccount` interops so that the resulting prices are in accordance with `sha256` method of native `CryptoLib` contract. `HF_Aspidochelone` is also includes [#2519](https://github.com/nspcc-dev/neo-go/pull/2519) (ported from the [reference](https://github.com/neo-project/neo/pull/2749)). It adjusts the price of `System.Runtime.GetRandom` interop and fixes its vulnerability. |
| Hardforks | `map[string]uint32` | [] | The set of incompatible changes that affect node behaviour starting from the specified height. The default value is an empty set which should be interpreted as "each known hard-fork is applied from the zero blockchain height". The list of valid hard-fork names:<br>`Aspidochelone` represents hard-fork introduced in [#2469](https://github.com/nspcc-dev/neo-go/pull/2469) (ported from the [reference](https://github.com/neo-project/neo/pull/2712)). It adjusts the prices of `System.Contract.CreateStandardAccount` and `System.Contract.CreateMultisigAccount` interops so that the resulting prices are in accordance with `sha256` method of native `CryptoLib` contract. `Aspidochelone` is also includes [#2519](https://github.com/nspcc-dev/neo-go/pull/2519) (ported from the [reference](https://github.com/neo-project/neo/pull/2749)). It adjusts the price of `System.Runtime.GetRandom` interop and fixes its vulnerability. |
| KeepOnlyLatestState | `bool` | `false` | Specifies if MPT should only store latest state. If true, DB size will be smaller, but older roots won't be accessible. This value should remain th
e same for the same database. | Conflicts with `P2PStateExchangeExtensions`. |
| Magic | `uint32` | `0` | Magic number which uniquely identifies NEO network. |

View file

@ -9,7 +9,7 @@ const (
// HFAspidochelone represents hard-fork introduced in #2469 (ported from
// https://github.com/neo-project/neo/pull/2712) and #2519 (ported from
// https://github.com/neo-project/neo/pull/2749).
HFAspidochelone Hardfork = 1 << iota // HF_Aspidochelone
HFAspidochelone Hardfork = 1 << iota // Aspidochelone
)
// hardforks holds a map of Hardfork string representation to its type.

View file

@ -11,9 +11,9 @@ func _() {
_ = x[HFAspidochelone-1]
}
const _Hardfork_name = "HF_Aspidochelone"
const _Hardfork_name = "Aspidochelone"
var _Hardfork_index = [...]uint8{0, 16}
var _Hardfork_index = [...]uint8{0, 13}
func (i Hardfork) String() string {
i -= 1

View file

@ -102,7 +102,7 @@ func TestProtocolConfigurationValidation(t *testing.T) {
require.Error(t, p.Validate())
p = &ProtocolConfiguration{
Hardforks: map[string]uint32{
"HF_Unknown": 123, // Unknown hard-fork.
"Unknown": 123, // Unknown hard-fork.
},
}
require.Error(t, p.Validate())