From eebed6ba7c20eeedaa32bab9c47131087592ad91 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Wed, 9 Oct 2024 10:07:01 +0800 Subject: [PATCH 1/2] Problem: no header hash from fallback historicalInfo and reduce DefaultHeaderHashNum to 256 --- CHANGELOG.md | 2 +- go.mod | 2 +- go.sum | 4 ++-- gomod2nix.toml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0ce5a0e5f..0f4734f295 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,7 @@ * [#1609](https://github.com/crypto-org-chain/cronos/pull/1609) Fix query address-by-acc-num by account_id instead of id. * [#1611](https://github.com/crypto-org-chain/cronos/pull/1611) Fix multisig account failed on threshold encode after send tx. * [#1617](https://github.com/crypto-org-chain/cronos/pull/1617) Fix unsuppored sign mode SIGN_MODE_TEXTUAL for bank transfer. -* [#1621](https://github.com/crypto-org-chain/cronos/pull/1621) Update ethermint to the fix of broken opBlockhash and tx validation. +* [#1621](https://github.com/crypto-org-chain/cronos/pull/1621), [1630](https://github.com/crypto-org-chain/cronos/pull/1630) Update ethermint to the fix of broken opBlockhash and tx validation. * [#1623](https://github.com/crypto-org-chain/cronos/pull/1623) Ensure expedited related gov params pass the basic validation. *Sep 13, 2024* diff --git a/go.mod b/go.mod index ae09b3cd20..bbdce122d1 100644 --- a/go.mod +++ b/go.mod @@ -273,7 +273,7 @@ replace ( github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.4.2 github.com/ethereum/go-ethereum => github.com/crypto-org-chain/go-ethereum v1.10.20-0.20240926023215-d2275b4afb9a // develop - github.com/evmos/ethermint => github.com/crypto-org-chain/ethermint v0.6.1-0.20241004074623-853e1e5b3475 + github.com/evmos/ethermint => github.com/crypto-org-chain/ethermint v0.6.1-0.20241009020150-a2ad87c8a1cc // Fix upstream GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h vulnerabilities. // TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409 github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.0 diff --git a/go.sum b/go.sum index 0b2a9a9b12..fca9a50df2 100644 --- a/go.sum +++ b/go.sum @@ -428,8 +428,8 @@ github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20240930015419-f4ea363b3fdf github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20240930015419-f4ea363b3fdf/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM= github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20240930015419-f4ea363b3fdf h1:u6BY+dtlmhuQYfPDnpGhDBF2uiCA0HvrIk22L67nB6Q= github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20240930015419-f4ea363b3fdf/go.mod h1:V6DImnwJMTq5qFjeGWpXNiT/fjgE4HtmclRmTqRVM3w= -github.com/crypto-org-chain/ethermint v0.6.1-0.20241004074623-853e1e5b3475 h1:NazTUTxkx8/C7HNzhsXJ7x/lR4dHlmKaVbqtdW4i8Vw= -github.com/crypto-org-chain/ethermint v0.6.1-0.20241004074623-853e1e5b3475/go.mod h1:LUv3b8+dRjqAI9UTml5XzjExT2ANyvjtkFssi7lIRb0= +github.com/crypto-org-chain/ethermint v0.6.1-0.20241009020150-a2ad87c8a1cc h1:EzwyKF5qc7UvOVMbUR+rE34b24tWbQc/Fp/Eer9s33A= +github.com/crypto-org-chain/ethermint v0.6.1-0.20241009020150-a2ad87c8a1cc/go.mod h1:LUv3b8+dRjqAI9UTml5XzjExT2ANyvjtkFssi7lIRb0= github.com/crypto-org-chain/go-block-stm v0.0.0-20240919080136-6c49aef68716 h1:OvD5Rm0B6LHUJk6z858UgwdP72jU2DuUdXeclRyKpDI= github.com/crypto-org-chain/go-block-stm v0.0.0-20240919080136-6c49aef68716/go.mod h1:iwQTX9xMX8NV9k3o2BiWXA0SswpsZrDk5q3gA7nWYiE= github.com/crypto-org-chain/go-ethereum v1.10.20-0.20240926023215-d2275b4afb9a h1:IUPD+dg1YQl8cLocxQ/Mbx/ObTgAgcrZlcBhFjsLO40= diff --git a/gomod2nix.toml b/gomod2nix.toml index 7ddc52c9ac..af0274cff1 100644 --- a/gomod2nix.toml +++ b/gomod2nix.toml @@ -262,8 +262,8 @@ schema = 3 hash = "sha256-ozwVS2BhAoz+OOisAyMhgg+lq8FdQjf90xoOq9cxtGw=" replaced = "github.com/crypto-org-chain/go-ethereum" [mod."github.com/evmos/ethermint"] - version = "v0.6.1-0.20241004074623-853e1e5b3475" - hash = "sha256-ThAVz/yMndPH0fd0Nn8dYdnhaRC0uTf1PEd3KlEonLw=" + version = "v0.6.1-0.20241009020150-a2ad87c8a1cc" + hash = "sha256-He4f1fVYCqTfRqjJ2v3v+00aRX3RQcYzYrqy3VlDxt4=" replaced = "github.com/crypto-org-chain/ethermint" [mod."github.com/fatih/color"] version = "v1.16.0" From 4969210fc5d12de94dcbd347c2abdd1c3b09c25b Mon Sep 17 00:00:00 2001 From: mmsqe Date: Wed, 9 Oct 2024 10:25:06 +0800 Subject: [PATCH 2/2] fix test --- integration_tests/test_upgrade.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration_tests/test_upgrade.py b/integration_tests/test_upgrade.py index 928748df94..1b1729d8e0 100644 --- a/integration_tests/test_upgrade.py +++ b/integration_tests/test_upgrade.py @@ -286,7 +286,7 @@ def do_upgrade(plan_name, target, mode=None): assert_evm_params(cli, e1, target_height1 - 1) assert f0 == cli.query_params("feemarket", height=target_height0 - 1) assert f1 == cli.query_params("feemarket", height=target_height1 - 1) - assert cli.query_params("evm")["header_hash_num"] == "10000", p + assert cli.query_params("evm")["header_hash_num"] == "256", p with pytest.raises(AssertionError): cli.query_params("icaauth") assert_gov_params(cli, gov_param)