From 071f6b51262551a7e40cd6b2b3113c92e8c60a2f Mon Sep 17 00:00:00 2001 From: Hsiao-Wei Wang Date: Wed, 25 Mar 2020 14:59:41 +0800 Subject: [PATCH] Gasprice rework: use `MIN_GASPRICE` as the initial gasprice and change `MIN_GASPRICE` to 8 gwei --- configs/mainnet.yaml | 7 ++----- configs/minimal.yaml | 6 ++---- specs/phase1/beacon-chain.md | 2 +- specs/phase1/phase1-fork.md | 3 +-- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/configs/mainnet.yaml b/configs/mainnet.yaml index 8306bb378..6d71cfa47 100644 --- a/configs/mainnet.yaml +++ b/configs/mainnet.yaml @@ -162,9 +162,6 @@ DOMAIN_CUSTODY_BIT_SLASHING: 0x83000000 # --------------------------------------------------------------- PHASE_1_FORK_VERSION: 0x01000000 INITIAL_ACTIVE_SHARDS: 64 -# Placeholder -INITIAL_GASPRICE: 10 - # Phase 1: General # --------------------------------------------------------------- @@ -190,8 +187,8 @@ SHARD_BLOCK_OFFSETS: [1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233] MAX_SHARD_BLOCKS_PER_ATTESTATION: 12 # 2**14 (= 16,384) Gwei MAX_GASPRICE: 16384 -# 2**5 (= 32) Gwei -MIN_GASPRICE: 32 +# 2**3 (= 8) Gwei +MIN_GASPRICE: 8 # 2**3 (= 8) GASPRICE_ADJUSTMENT_COEFFICIENT: 8 diff --git a/configs/minimal.yaml b/configs/minimal.yaml index e5d6ca308..9daf428b4 100644 --- a/configs/minimal.yaml +++ b/configs/minimal.yaml @@ -164,8 +164,6 @@ DOMAIN_CUSTODY_BIT_SLASHING: 0x83000000 PHASE_1_FORK_VERSION: 0x01000001 # [customized] reduced for testing INITIAL_ACTIVE_SHARDS: 4 -# Placeholder -INITIAL_GASPRICE: 10 # Phase 1: General @@ -192,8 +190,8 @@ SHARD_BLOCK_OFFSETS: [1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233] MAX_SHARD_BLOCKS_PER_ATTESTATION: 12 # 2**14 (= 16,384) Gwei MAX_GASPRICE: 16384 -# 2**5 (= 32) Gwei -MIN_GASPRICE: 32 +# 2**3 (= 8) Gwei +MIN_GASPRICE: 8 # 2**3 (= 8) GASPRICE_ADJUSTMENT_COEFFICIENT: 8 diff --git a/specs/phase1/beacon-chain.md b/specs/phase1/beacon-chain.md index e434e7eae..3db7f9537 100644 --- a/specs/phase1/beacon-chain.md +++ b/specs/phase1/beacon-chain.md @@ -101,7 +101,7 @@ Configuration is not namespaced. Instead it is strictly an extension; | `SHARD_BLOCK_OFFSETS` | `[1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233]` | | | `MAX_SHARD_BLOCKS_PER_ATTESTATION` | `len(SHARD_BLOCK_OFFSETS)` | | | `MAX_GASPRICE` | `Gwei(2**14)` (= 16,384) | Gwei | | -| `MIN_GASPRICE` | `Gwei(2**5)` (= 32) | Gwei | | +| `MIN_GASPRICE` | `Gwei(2**3)` (= 8) | Gwei | | | `GASPRICE_ADJUSTMENT_COEFFICIENT` | `2**3` (= 8) | | | `DOMAIN_SHARD_PROPOSAL` | `DomainType('0x80000000')` | | | `DOMAIN_SHARD_COMMITTEE` | `DomainType('0x81000000')` | | diff --git a/specs/phase1/phase1-fork.md b/specs/phase1/phase1-fork.md index adb0cd236..173fceeb4 100644 --- a/specs/phase1/phase1-fork.md +++ b/specs/phase1/phase1-fork.md @@ -36,7 +36,6 @@ Warning: this configuration is not definitive. | - | - | | `PHASE_1_FORK_VERSION` | `Version('0x01000000')` | | `INITIAL_ACTIVE_SHARDS` | `2**6` (= 64) | -| `INITIAL_GASPRICE` | `Gwei(10)` | ## Fork to Phase 1 @@ -102,7 +101,7 @@ def upgrade_to_phase1(pre: phase0.BeaconState) -> BeaconState: shard_states=List[ShardState, MAX_SHARDS]( ShardState( slot=pre.slot, - gasprice=INITIAL_GASPRICE, + gasprice=MIN_GASPRICE, data=Root(), latest_block_root=Root(), ) for i in range(INITIAL_ACTIVE_SHARDS)