Skip to content
Permalink
Browse files
Gasprice rework: use MIN_GASPRICE as the initial gasprice and chang…
…e `MIN_GASPRICE` to 8 gwei
  • Loading branch information
hwwhww committed Mar 31, 2020
1 parent 073f78e commit 071f6b51262551a7e40cd6b2b3113c92e8c60a2f
Showing 4 changed files with 6 additions and 12 deletions.
@@ -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

@@ -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

@@ -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')` | |
@@ -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)

0 comments on commit 071f6b5

Please sign in to comment.