Skip to content

Commit

Permalink
Update Berlin Block numbers (#1929)
Browse files Browse the repository at this point in the history
Update ropsten, goerli, rinkeby, and mainnet block numbers to activate
Berlin.

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
(cherry picked from commit d291026)
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
  • Loading branch information
shemnon committed Feb 22, 2021
1 parent 04081b1 commit 2e57c5b
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
- [Fast sync when running Besu on cloud providers](KNOWN_ISSUES.md#fast-sync-when-running-besu-on-cloud-providers)
- [Privacy users with private transactions created using v1.3.4 or earlier](KNOWN_ISSUES.md#privacy-users-with-private-transactions-created-using-v134-or-earlier)

## 21.1.0
* Added activation blocks for Berlin Network Upgrade [\#1929](https://github.com/hyperledger/besu/pull/1929)

## 21.1.0-RC2
### Additions and Improvements
* Support for the Berlin Network Upgrade, although the block number must be set manually with `--override-genesis-config=berlinBlock=<blocknumber>`. This is because the block numbers haven't been determined yet. The next release will include the number in the genesis file so it will support Berlin with no intervention. [\#1898](https://github.com/hyperledger/besu/pull/1898)
Expand Down
1 change: 1 addition & 0 deletions config/src/main/resources/goerli.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"chainId":5,
"petersburgBlock":0,
"istanbulBlock":1561651,
"berlinBlock":4460644,
"clique":{
"blockperiodseconds":15,
"epochlength":30000
Expand Down
1 change: 1 addition & 0 deletions config/src/main/resources/mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"petersburgBlock": 7280000,
"istanbulBlock": 9069000,
"muirGlacierBlock": 9200000,
"berlinBlock": 12244000,
"ethash": {
}
},
Expand Down
1 change: 1 addition & 0 deletions config/src/main/resources/rinkeby.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"constantinopleBlock": 3660663,
"petersburgBlock": 4321234,
"istanbulBlock": 5435345,
"berlinBlock": 8290928,
"clique": {
"blockperiodseconds": 15,
"epochlength": 30000
Expand Down
1 change: 1 addition & 0 deletions config/src/main/resources/ropsten.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"petersburgBlock": 4939394,
"istanbulBlock": 6485846,
"muirGlacierBlock": 7117117,
"berlinBlock": 9812189,
"ethash": {
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public void shouldReturnDefaultProtocolSpecsWhenCustomNumbersAreNotUsed() {
Assertions.assertThat(sched.getByBlockNumber(7_280_000L).getName()).isEqualTo("Petersburg");
Assertions.assertThat(sched.getByBlockNumber(9_069_000L).getName()).isEqualTo("Istanbul");
Assertions.assertThat(sched.getByBlockNumber(9_200_000L).getName()).isEqualTo("MuirGlacier");
Assertions.assertThat(sched.getByBlockNumber(Long.MAX_VALUE).getName())
.isEqualTo("MuirGlacier");
Assertions.assertThat(sched.getByBlockNumber(12_244_000L).getName()).isEqualTo("Berlin");
Assertions.assertThat(sched.getByBlockNumber(Long.MAX_VALUE).getName()).isEqualTo("Berlin");
}

@Test
Expand Down Expand Up @@ -103,8 +103,8 @@ public void shouldCreateRopstenConfig() throws Exception {
Assertions.assertThat(sched.getByBlockNumber(4_939_394L).getName()).isEqualTo("Petersburg");
Assertions.assertThat(sched.getByBlockNumber(6_485_846L).getName()).isEqualTo("Istanbul");
Assertions.assertThat(sched.getByBlockNumber(7_117_117L).getName()).isEqualTo("MuirGlacier");
Assertions.assertThat(sched.getByBlockNumber(Long.MAX_VALUE).getName())
.isEqualTo("MuirGlacier");
Assertions.assertThat(sched.getByBlockNumber(9_812_189L).getName()).isEqualTo("Berlin");
Assertions.assertThat(sched.getByBlockNumber(Long.MAX_VALUE).getName()).isEqualTo("Berlin");
}

@Test
Expand All @@ -117,7 +117,8 @@ public void shouldCreateGoerliConfig() throws Exception {
.getConfigOptions());
Assertions.assertThat(sched.getByBlockNumber(0L).getName()).isEqualTo("Petersburg");
Assertions.assertThat(sched.getByBlockNumber(1_561_651L).getName()).isEqualTo("Istanbul");
Assertions.assertThat(sched.getByBlockNumber(Long.MAX_VALUE).getName()).isEqualTo("Istanbul");
Assertions.assertThat(sched.getByBlockNumber(4_460_644L).getName()).isEqualTo("Berlin");
Assertions.assertThat(sched.getByBlockNumber(Long.MAX_VALUE).getName()).isEqualTo("Berlin");
}

@Test
Expand All @@ -136,6 +137,7 @@ public void shouldCreateRinkebyConfig() throws Exception {
Assertions.assertThat(sched.getByBlockNumber(3_660_663L).getName()).isEqualTo("Constantinople");
Assertions.assertThat(sched.getByBlockNumber(4_321_234L).getName()).isEqualTo("Petersburg");
Assertions.assertThat(sched.getByBlockNumber(5_435_345L).getName()).isEqualTo("Istanbul");
Assertions.assertThat(sched.getByBlockNumber(Long.MAX_VALUE).getName()).isEqualTo("Istanbul");
Assertions.assertThat(sched.getByBlockNumber(8_290_928L).getName()).isEqualTo("Berlin");
Assertions.assertThat(sched.getByBlockNumber(Long.MAX_VALUE).getName()).isEqualTo("Berlin");
}
}

0 comments on commit 2e57c5b

Please sign in to comment.