From 836915f84d51c37dcc74c263a7ec3253f6c1b596 Mon Sep 17 00:00:00 2001 From: Facundo Medica Date: Mon, 26 Sep 2022 14:47:02 -0300 Subject: [PATCH 1/6] chore: modify eth block delay --- orchestrator/main_loops.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/orchestrator/main_loops.go b/orchestrator/main_loops.go index e24fe87c..03b6bfc1 100644 --- a/orchestrator/main_loops.go +++ b/orchestrator/main_loops.go @@ -504,7 +504,7 @@ func getEthBlockDelay(chainID uint64) uint64 { // Mainline Ethereum, Ethereum classic, or the Ropsten, Kotti, Mordor testnets // all POW Chains case 1, 3, 6, 7: - return 13 + return 96 // Dev, our own Gravity Ethereum testnet, and Hardhat respectively // all single signer chains with no chance of any reorgs @@ -519,6 +519,6 @@ func getEthBlockDelay(chainID uint64) uint64 { // assume the safe option (POW) where we don't know default: - return 13 + return 96 } } From 4d1b635078b065e1a53111a1174ffd47d84992de Mon Sep 17 00:00:00 2001 From: Facundo Medica Date: Mon, 26 Sep 2022 14:59:26 -0300 Subject: [PATCH 2/6] chore: modify eth block delay --- orchestrator/main_loops.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/orchestrator/main_loops.go b/orchestrator/main_loops.go index 03b6bfc1..8c24e2a6 100644 --- a/orchestrator/main_loops.go +++ b/orchestrator/main_loops.go @@ -501,11 +501,14 @@ func (p *gravityOrchestrator) ERC20ToDenom(ctx context.Context, tokenAddr ethcmn // mechanism to prevent relaying an event that is not yet considered final. func getEthBlockDelay(chainID uint64) uint64 { switch chainID { - // Mainline Ethereum, Ethereum classic, or the Ropsten, Kotti, Mordor testnets - // all POW Chains - case 1, 3, 6, 7: + // Mainline Ethereum + case 1: return 96 + // Ethereum classic, or the Ropsten, Kotti, Mordor testnets all POW Chains + case 3, 6, 7: + return 13 + // Dev, our own Gravity Ethereum testnet, and Hardhat respectively // all single signer chains with no chance of any reorgs case 2018, 15, 31337: From e4a9f9c7c7d34d9968657cebc7f65c0bd14e84a3 Mon Sep 17 00:00:00 2001 From: Facundo Medica Date: Mon, 26 Sep 2022 15:04:13 -0300 Subject: [PATCH 3/6] fix test --- orchestrator/main_loops_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orchestrator/main_loops_test.go b/orchestrator/main_loops_test.go index 0d6e2353..659a4363 100644 --- a/orchestrator/main_loops_test.go +++ b/orchestrator/main_loops_test.go @@ -55,7 +55,7 @@ func TestERC20ToDenom(t *testing.T) { } func TestGetEthBlockDelay(t *testing.T) { - assert.Equal(t, uint64(13), getEthBlockDelay(1)) + assert.Equal(t, uint64(96), getEthBlockDelay(1)) assert.Equal(t, uint64(0), getEthBlockDelay(2018)) assert.Equal(t, uint64(10), getEthBlockDelay(5)) assert.Equal(t, uint64(13), getEthBlockDelay(1235)) From b2467301a32d46e08d79e505ed95ea97ea64e5fd Mon Sep 17 00:00:00 2001 From: Facundo Medica Date: Mon, 26 Sep 2022 15:08:41 -0300 Subject: [PATCH 4/6] fix test --- orchestrator/main_loops_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orchestrator/main_loops_test.go b/orchestrator/main_loops_test.go index 659a4363..754d973d 100644 --- a/orchestrator/main_loops_test.go +++ b/orchestrator/main_loops_test.go @@ -58,5 +58,5 @@ func TestGetEthBlockDelay(t *testing.T) { assert.Equal(t, uint64(96), getEthBlockDelay(1)) assert.Equal(t, uint64(0), getEthBlockDelay(2018)) assert.Equal(t, uint64(10), getEthBlockDelay(5)) - assert.Equal(t, uint64(13), getEthBlockDelay(1235)) + assert.Equal(t, uint64(96), getEthBlockDelay(1235)) } From 93da4a41e571adaaf6010b813ece3534a4789041 Mon Sep 17 00:00:00 2001 From: Facundo Medica Date: Mon, 26 Sep 2022 17:45:15 -0300 Subject: [PATCH 5/6] changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1997238..e8bd11bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,10 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Improvements +- [#367] Set ETH block delay to 96 blocks + +### Improvements + [#362](https://github.com/umee-network/peggo/pull/362) Update umeed to v3. [#343](https://github.com/umee-network/peggo/pull/343) Upgrade to cosmos-sdk v0.46.1. [#341](https://github.com/umee-network/peggo/pull/341) Fix linter. From 5d2cc39f137b5a4382448b7ac2f1ad065065bbaa Mon Sep 17 00:00:00 2001 From: Facundo Medica Date: Mon, 26 Sep 2022 17:45:26 -0300 Subject: [PATCH 6/6] changelog --- CHANGELOG.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8bd11bd..50ab94ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,10 +45,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Improvements -- [#367] Set ETH block delay to 96 blocks - -### Improvements - +[#367] Set ETH block delay to 96 blocks [#362](https://github.com/umee-network/peggo/pull/362) Update umeed to v3. [#343](https://github.com/umee-network/peggo/pull/343) Upgrade to cosmos-sdk v0.46.1. [#341](https://github.com/umee-network/peggo/pull/341) Fix linter.