From 842f8ca9acd835d782db8523e4e710a257f4a611 Mon Sep 17 00:00:00 2001 From: ironbeer <7997273+ironbeer@users.noreply.github.com> Date: Thu, 29 Aug 2024 14:27:30 +0900 Subject: [PATCH 1/2] Configured block time shortening epoch for the mainnet --- contracts/oasys/deployments.go | 2 +- contracts/oasys/oasys_test.go | 8 ++++---- params/oasys.go | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/contracts/oasys/deployments.go b/contracts/oasys/deployments.go index dd98663ff..4df89d527 100644 --- a/contracts/oasys/deployments.go +++ b/contracts/oasys/deployments.go @@ -20,7 +20,7 @@ var deploymentSets = map[common.Hash]map[uint64]deploymentSet{ 971800: deploymentSet{deployments7}, 1529980: deploymentSet{deployments9}, 1892000: deploymentSet{deployments10}, - 9999999: deploymentSet{deployments11}, // TODO + 4083828: deploymentSet{deployments11}, }, params.OasysTestnetGenesisHash: { 1: deploymentSet{deployments0}, diff --git a/contracts/oasys/oasys_test.go b/contracts/oasys/oasys_test.go index eb1493727..99f040cc7 100644 --- a/contracts/oasys/oasys_test.go +++ b/contracts/oasys/oasys_test.go @@ -1063,11 +1063,11 @@ func _deployments11(genesisHash common.Hash, contracts wantContracts) { contracts["0x0000000000000000000000000000000000001000"].storage = map[string]string{ // uint256[] public updates "0x0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000000002", - "0xb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf7": "0x00000000000000000000000000000000000000000000000000000000000003e7", + "0xb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf7": "0x00000000000000000000000000000000000000000000000000000000000002c6", // EnvironmentValue[] public values "0x0000000000000000000000000000000000000000000000000000000000000002": "0x0000000000000000000000000000000000000000000000000000000000000002", - "0x405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad7": "0x000000000000000000000000000000000000000000000000000000000057b700", - "0x405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad8": "0x00000000000000000000000000000000000000000000000000000000000003e7", + "0x405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad7": "0x00000000000000000000000000000000000000000000000000000000003e5080", + "0x405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad8": "0x00000000000000000000000000000000000000000000000000000000000002c6", "0x405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad9": "0x0000000000000000000000000000000000000000000000000000000000000006", "0x405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ada": "0x0000000000000000000000000000000000000000000000000000000000003840", "0x405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5adb": "0x000000000000000000000000000000000000000000000000000000000000000a", @@ -1140,7 +1140,7 @@ func TestDeploy(t *testing.T) { {971800, []deployFn{_deployments7}}, {1529980, []deployFn{_deployments9}}, {1892000, []deployFn{_deployments10}}, - {9999999, []deployFn{_deployments11}}, + {4083828, []deployFn{_deployments11}}, }, }, { diff --git a/params/oasys.go b/params/oasys.go index 0090ead48..46f4c60dc 100644 --- a/params/oasys.go +++ b/params/oasys.go @@ -10,9 +10,9 @@ const ( SHORT_BLOCK_TIME_SECONDS = 6 SHORT_BLOCK_TIME_EPOCH_PERIOD = 14400 // 6 sec * 14400 block = 1 days - SHORT_BLOCK_TIME_FORK_EPOCH_MAINNET = 999 // TODO - SHORT_BLOCK_TIME_FORK_EPOCH_TESTNET = 699 - SHORT_BLOCK_TIME_FORK_EPOCH_OTHERS = 10 // for local chain + SHORT_BLOCK_TIME_FORK_EPOCH_MAINNET = 710 // Block #4083840 + SHORT_BLOCK_TIME_FORK_EPOCH_TESTNET = 699 // Block #4020480 + SHORT_BLOCK_TIME_FORK_EPOCH_OTHERS = 10 // for local chain ) // EnvironmentValue is a representation of `Environment.EnvironmentValue`. From 95fd7e616f35af273bbae2499dd20cae96bc2117 Mon Sep 17 00:00:00 2001 From: ironbeer <7997273+ironbeer@users.noreply.github.com> Date: Thu, 29 Aug 2024 15:45:49 +0900 Subject: [PATCH 2/2] Fix block time shortening epoch for the mainnet --- contracts/oasys/deployments.go | 2 +- contracts/oasys/oasys_test.go | 8 ++++---- params/oasys.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/contracts/oasys/deployments.go b/contracts/oasys/deployments.go index 4df89d527..af5e27da3 100644 --- a/contracts/oasys/deployments.go +++ b/contracts/oasys/deployments.go @@ -20,7 +20,7 @@ var deploymentSets = map[common.Hash]map[uint64]deploymentSet{ 971800: deploymentSet{deployments7}, 1529980: deploymentSet{deployments9}, 1892000: deploymentSet{deployments10}, - 4083828: deploymentSet{deployments11}, + 4089588: deploymentSet{deployments11}, }, params.OasysTestnetGenesisHash: { 1: deploymentSet{deployments0}, diff --git a/contracts/oasys/oasys_test.go b/contracts/oasys/oasys_test.go index 99f040cc7..0e248cdaa 100644 --- a/contracts/oasys/oasys_test.go +++ b/contracts/oasys/oasys_test.go @@ -1063,11 +1063,11 @@ func _deployments11(genesisHash common.Hash, contracts wantContracts) { contracts["0x0000000000000000000000000000000000001000"].storage = map[string]string{ // uint256[] public updates "0x0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000000002", - "0xb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf7": "0x00000000000000000000000000000000000000000000000000000000000002c6", + "0xb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf7": "0x00000000000000000000000000000000000000000000000000000000000002c7", // EnvironmentValue[] public values "0x0000000000000000000000000000000000000000000000000000000000000002": "0x0000000000000000000000000000000000000000000000000000000000000002", - "0x405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad7": "0x00000000000000000000000000000000000000000000000000000000003e5080", - "0x405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad8": "0x00000000000000000000000000000000000000000000000000000000000002c6", + "0x405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad7": "0x00000000000000000000000000000000000000000000000000000000003e6700", + "0x405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad8": "0x00000000000000000000000000000000000000000000000000000000000002c7", "0x405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad9": "0x0000000000000000000000000000000000000000000000000000000000000006", "0x405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ada": "0x0000000000000000000000000000000000000000000000000000000000003840", "0x405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5adb": "0x000000000000000000000000000000000000000000000000000000000000000a", @@ -1140,7 +1140,7 @@ func TestDeploy(t *testing.T) { {971800, []deployFn{_deployments7}}, {1529980, []deployFn{_deployments9}}, {1892000, []deployFn{_deployments10}}, - {4083828, []deployFn{_deployments11}}, + {4089588, []deployFn{_deployments11}}, }, }, { diff --git a/params/oasys.go b/params/oasys.go index 46f4c60dc..867a14eb2 100644 --- a/params/oasys.go +++ b/params/oasys.go @@ -10,7 +10,7 @@ const ( SHORT_BLOCK_TIME_SECONDS = 6 SHORT_BLOCK_TIME_EPOCH_PERIOD = 14400 // 6 sec * 14400 block = 1 days - SHORT_BLOCK_TIME_FORK_EPOCH_MAINNET = 710 // Block #4083840 + SHORT_BLOCK_TIME_FORK_EPOCH_MAINNET = 711 // Block #4089600 SHORT_BLOCK_TIME_FORK_EPOCH_TESTNET = 699 // Block #4020480 SHORT_BLOCK_TIME_FORK_EPOCH_OTHERS = 10 // for local chain )