Skip to content

Commit

Permalink
Merge branch 'zkevm-2.60' into arpit/update-zero-file
Browse files Browse the repository at this point in the history
  • Loading branch information
cffls committed Oct 7, 2024
2 parents 4dc1194 + 500812d commit f64e8b0
Show file tree
Hide file tree
Showing 49 changed files with 684 additions and 427 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/ci_zkevm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: 0xPolygon/kurtosis-cdk
ref: v0.2.7
ref: v0.2.12
path: kurtosis-cdk

- name: Install Kurtosis CDK tools
Expand All @@ -104,6 +104,7 @@ jobs:
run: |
sed -i '/zkevm.sequencer-batch-seal-time:/d' templates/cdk-erigon/config.yml
sed -i '/zkevm.sequencer-non-empty-batch-seal-time:/d' templates/cdk-erigon/config.yml
sed -i '/sentry.drop-useless-peers:/d' templates/cdk-erigon/config.yml
- name: Configure Kurtosis CDK
working-directory: ./kurtosis-cdk
Expand All @@ -118,7 +119,7 @@ jobs:
- name: Monitor verified batches
working-directory: ./kurtosis-cdk
shell: bash
run: timeout 900s .github/scripts/monitor-verified-batches.sh --rpc-url $(kurtosis port print cdk-v1 cdk-erigon-node-001 http-rpc) --target 20 --timeout 900
run: timeout 900s .github/scripts/monitor-verified-batches.sh --rpc-url $(kurtosis port print cdk-v1 cdk-erigon-node-001 rpc) --target 20 --timeout 900

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
Expand All @@ -128,13 +129,9 @@ jobs:
kurtosis files download cdk-v1 bridge-config-artifact
echo "BRIDGE_ADDRESS=$(/usr/local/bin/yq '.NetworkConfig.PolygonBridgeAddress' bridge-config-artifact/bridge-config.toml)" >> $GITHUB_ENV
echo "ETH_RPC_URL=$(kurtosis port print cdk-v1 el-1-geth-lighthouse rpc)" >> $GITHUB_ENV
echo "L2_RPC_URL=$(kurtosis port print cdk-v1 cdk-erigon-node-001 http-rpc)" >> $GITHUB_ENV
echo "L2_RPC_URL=$(kurtosis port print cdk-v1 cdk-erigon-node-001 rpc)" >> $GITHUB_ENV
echo "BRIDGE_API_URL=$(kurtosis port print cdk-v1 zkevm-bridge-service-001 rpc)" >> $GITHUB_ENV
- name: Fund claim tx manager
run: |
cast send --legacy --private-key "0x12d7de8621a77640c9241b2595ba78ce443d05e94090365ab3bb5e19df82c625" --value 5ether 0x5f5dB0D4D58310F53713eF4Df80ba6717868A9f8 --gas-limit 50000 --rpc-url $L2_RPC_URL
- name: Clone bridge repository
run: git clone --recurse-submodules -j8 https://github.com/0xPolygonHermez/zkevm-bridge-service.git -b develop bridge

Expand All @@ -152,7 +149,7 @@ jobs:
TestL1AddrPrivate="0x12d7de8621a77640c9241b2595ba78ce443d05e94090365ab3bb5e19df82c625"
TestL2AddrPrivate="0x12d7de8621a77640c9241b2595ba78ce443d05e94090365ab3bb5e19df82c625"
[ConnectionConfig]
L1NodeURL="${ETH_RPC_URL}"
L1NodeURL="http://${ETH_RPC_URL}"
L2NodeURL="${L2_RPC_URL}"
BridgeURL="${BRIDGE_API_URL}"
L1BridgeAddr="${BRIDGE_ADDRESS}"
Expand Down Expand Up @@ -198,7 +195,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: 0xPolygon/kurtosis-cdk
ref: v0.2.4
ref: v0.2.12
path: kurtosis-cdk

- name: Install Kurtosis CDK tools
Expand Down Expand Up @@ -229,13 +226,15 @@ jobs:
sed -i '/zkevm.sequencer-batch-seal-time:/d' templates/cdk-erigon/config.yml
sed -i '/zkevm.sequencer-non-empty-batch-seal-time:/d' templates/cdk-erigon/config.yml
sed -i '/zkevm\.sequencer-initial-fork-id/d' ./templates/cdk-erigon/config.yml
sed -i '/sentry.drop-useless-peers:/d' templates/cdk-erigon/config.yml
sed -i '/zkevm\.pool-manager-url/d' ./templates/cdk-erigon/config.yml
sed -i '$a\zkevm.disable-virtual-counters: true' ./templates/cdk-erigon/config.yml
- name: Configure Kurtosis CDK
working-directory: ./kurtosis-cdk
run: |
/usr/local/bin/yq -i '.args.cdk_erigon_node_image = "cdk-erigon:local"' params.yml
/usr/local/bin/yq -i '.args.zkevm_bridge_service_image = "hermeznetwork/zkevm-bridge-service:v0.5.0-RC8"' params.yml
/usr/local/bin/yq -i '.args.erigon_strict_mode = false' params.yml
sed -i 's/"londonBlock": [0-9]\+/"londonBlock": 0/' ./templates/cdk-erigon/chainspec.json
sed -i 's/"normalcyBlock": [0-9]\+/"normalcyBlock": 0/' ./templates/cdk-erigon/chainspec.json
sed -i 's/"shanghaiTime": [0-9]\+/"shanghaiTime": 0/' ./templates/cdk-erigon/chainspec.json
Expand All @@ -248,7 +247,7 @@ jobs:

- name: Dynamic gas fee tx load test
working-directory: ./kurtosis-cdk
run: /usr/local/bin/polycli loadtest --rpc-url "$(kurtosis port print cdk-v1 cdk-erigon-node-001 http-rpc)" --private-key "0x12d7de8621a77640c9241b2595ba78ce443d05e94090365ab3bb5e19df82c625" --verbosity 700 --requests 500 --rate-limit 50 --mode uniswapv3
run: /usr/local/bin/polycli loadtest --rpc-url "$(kurtosis port print cdk-v1 cdk-erigon-node-001 rpc)" --private-key "0x12d7de8621a77640c9241b2595ba78ce443d05e94090365ab3bb5e19df82c625" --verbosity 700 --requests 500 --rate-limit 50 --mode uniswapv3

- name: Upload logs
uses: actions/upload-artifact@v3
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ base and run `go run cmd/hack/allocs/main.go [your-file-name]` to convert it to
**Tip**: the contract addresses in the `dynamic-{network}.yaml` can be found in the files output when launching the network:
- zkevm.address-sequencer => create_rollup_output.json => `sequencer`
- zkevm.address-zkevm => create_rollup_output.json => `rollupAddress`
- zkevm.address-admin => deploy_output.json => `admin`
- zkevm.address-rollup => deploy_output.json => `polygonRollupManagerAddress`
- zkevm.address-ger-manager => deploy_output.json => `polygonZkEVMGlobalExitRootAddress`

Expand Down Expand Up @@ -191,7 +190,6 @@ For a full explanation of the config options, see below:
- `zkevm.l1-rpc-url`: L1 Ethereum RPC URL.
- `zkevm.address-sequencer`: The contract address for the sequencer
- `zkevm.address-zkevm`: The address for the zkevm contract
- `zkevm.address-admin`: The address for the admin contract
- `zkevm.address-rollup`: The address for the rollup contract
- `zkevm.address-ger-manager`: The address for the GER manager contract
- `zkevm.rpc-ratelimit`: Rate limit for RPC calls.
Expand Down
5 changes: 3 additions & 2 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ var (
}
AddressAdminFlag = cli.StringFlag{
Name: "zkevm.address-admin",
Usage: "Admin address",
Usage: "Admin address (Deprecated)",
Value: "",
}
AddressRollupFlag = cli.StringFlag{
Expand Down Expand Up @@ -670,7 +670,8 @@ var (
DefaultGasPrice = cli.Uint64Flag{
Name: "zkevm.default-gas-price",
Usage: "Set the default/min gas price",
Value: 0,
// 0.01 gwei
Value: 10000000,
}
MaxGasPrice = cli.Uint64Flag{
Name: "zkevm.max-gas-price",
Expand Down
2 changes: 1 addition & 1 deletion consensus/misc/eip1559.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (f eip1559Calculator) CurrentFees(chainConfig *chain.Config, db kv.Getter)
func CalcBaseFee(config *chain.Config, parent *types.Header) *big.Int {
// If the current block is the first EIP-1559 block, return the InitialBaseFee.
if !config.IsLondon(parent.Number.Uint64()) {
return new(big.Int).SetUint64(params.InitialBaseFee)
return new(big.Int).SetUint64(config.ZkDefaultGasPrice)
}

var (
Expand Down
2 changes: 2 additions & 0 deletions consensus/misc/eip1559_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ func copyConfig(original *chain.Config) *chain.Config {
func config() *chain.Config {
config := copyConfig(params.TestChainConfig)
config.LondonBlock = big.NewInt(5)
// setting the default expected fee for tests
config.ZkDefaultGasPrice = params.InitialBaseFee
return config
}

Expand Down
6 changes: 4 additions & 2 deletions core/blockchain_zkevm.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,10 @@ func ProcessReceiptForBlockExecution(receipt *types.Receipt, roHermezDb state.Re
receipt.CumulativeGasUsed = receipt.GasUsed
}

for _, l := range receipt.Logs {
l.ApplyPaddingToLogsData(chainConfig.IsForkID8Elderberry(blockNum), chainConfig.IsForkID12Banana(blockNum))
if !chainConfig.IsNormalcy(blockNum) {
for _, l := range receipt.Logs {
l.ApplyPaddingToLogsData(chainConfig.IsForkID8Elderberry(blockNum), chainConfig.IsForkID12Banana(blockNum))
}
}

return nil
Expand Down
14 changes: 14 additions & 0 deletions core/rawdb/accessors_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,20 @@ func ReadBodyWithTransactions(db kv.Getter, hash common.Hash, number uint64) (*t
return body, err
}

func ReadCanonicalBodyWithTransactions(db kv.Getter, hash common.Hash, number uint64) *types.Body {
body, baseTxId, txAmount := ReadBody(db, hash, number)
if body == nil {
return nil
}
var err error
body.Transactions, err = CanonicalTransactions(db, baseTxId, txAmount)
if err != nil {
log.Error("failed ReadTransactionByHash", "hash", hash, "block", number, "err", err)
return nil
}
return body
}

func RawTransactionsRange(db kv.Getter, from, to uint64) (res [][]byte, err error) {
blockKey := make([]byte, dbutils.NumberLength+length.Hash)
encNum := make([]byte, 8)
Expand Down
4 changes: 2 additions & 2 deletions core/rawdb/accessors_chain_zkevm.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ func WriteBodyAndTransactions(db kv.RwTx, hash libcommon.Hash, number uint64, tx
}
transactionV3, _ := kvcfg.TransactionsV3.Enabled(db.(kv.Tx))
if transactionV3 {
err = OverwriteTransactions(db, txs, data.BaseTxId, &hash)
err = OverwriteTransactions(db, txs, data.BaseTxId+1, &hash)
} else {
err = OverwriteTransactions(db, txs, data.BaseTxId, nil)
err = OverwriteTransactions(db, txs, data.BaseTxId+1, nil)
}
if err != nil {
return fmt.Errorf("failed to WriteTransactions: %w", err)
Expand Down
96 changes: 96 additions & 0 deletions core/rawdb/accessors_chain_zkevm_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
package rawdb

import (
"testing"

libcommon "github.com/ledgerwatch/erigon-lib/common"
"github.com/ledgerwatch/erigon-lib/kv/dbutils"
"github.com/ledgerwatch/erigon-lib/kv/memdb"
"github.com/ledgerwatch/erigon/common/u256"
"github.com/ledgerwatch/erigon/core/types"
"github.com/ledgerwatch/erigon/crypto"
"github.com/ledgerwatch/erigon/params"
"github.com/ledgerwatch/erigon/rlp"
"github.com/stretchr/testify/require"
"golang.org/x/crypto/sha3"
)

func TestBodyStorageZkevm(t *testing.T) {
_, tx := memdb.NewTestTx(t)
require := require.New(t)

var testKey, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
testAddr := crypto.PubkeyToAddress(testKey.PublicKey)

mustSign := func(tx types.Transaction, s types.Signer) types.Transaction {
r, err := types.SignTx(tx, s, testKey)
require.NoError(err)
return r
}

// prepare db so it works with our test
signer1 := types.MakeSigner(params.HermezMainnetChainConfig, 1, 1)
body := &types.Body{
Transactions: []types.Transaction{
mustSign(types.NewTransaction(1, testAddr, u256.Num1, 1, u256.Num1, nil), *signer1),
mustSign(types.NewTransaction(2, testAddr, u256.Num1, 2, u256.Num1, nil), *signer1),
},
Uncles: []*types.Header{{Extra: []byte("test header")}},
}

// Create a test body to move around the database and make sure it's really new
hasher := sha3.NewLegacyKeccak256()
_ = rlp.Encode(hasher, body)
hash := libcommon.BytesToHash(hasher.Sum(nil))

if entry := ReadCanonicalBodyWithTransactions(tx, hash, 0); entry != nil {
t.Fatalf("Non existent body returned: %v", entry)
}
require.NoError(WriteBody(tx, hash, 0, body))
if entry := ReadCanonicalBodyWithTransactions(tx, hash, 0); entry == nil {
t.Fatalf("Stored body not found")
} else if types.DeriveSha(types.Transactions(entry.Transactions)) != types.DeriveSha(types.Transactions(body.Transactions)) || types.CalcUncleHash(entry.Uncles) != types.CalcUncleHash(body.Uncles) {
t.Fatalf("Retrieved body mismatch: have %v, want %v", entry, body)
}
if entry := ReadBodyRLP(tx, hash, 0); entry == nil {
t.Fatalf("Stored body RLP not found")
} else {
hasher := sha3.NewLegacyKeccak256()
hasher.Write(entry)

if calc := libcommon.BytesToHash(hasher.Sum(nil)); calc != hash {
t.Fatalf("Retrieved RLP body mismatch: have %v, want %v", entry, body)
}
}

// zkevm check with overwriting transactions
bodyForStorage, err := ReadBodyForStorageByKey(tx, dbutils.BlockBodyKey(0, hash))
if err != nil {
t.Fatalf("ReadBodyForStorageByKey failed: %s", err)
}
// overwrite the transactions using the new code from zkevm
require.NoError(WriteBodyAndTransactions(tx, hash, 0, body.Transactions, bodyForStorage))

// now re-run the checks from above after reading the body again
if entry := ReadCanonicalBodyWithTransactions(tx, hash, 0); entry == nil {
t.Fatalf("Stored body not found")
} else if types.DeriveSha(types.Transactions(entry.Transactions)) != types.DeriveSha(types.Transactions(body.Transactions)) || types.CalcUncleHash(entry.Uncles) != types.CalcUncleHash(body.Uncles) {
t.Fatalf("Retrieved body mismatch: have %v, want %v", entry, body)
}
if entry := ReadBodyRLP(tx, hash, 0); entry == nil {
t.Fatalf("Stored body RLP not found")
} else {
hasher := sha3.NewLegacyKeccak256()
hasher.Write(entry)

if calc := libcommon.BytesToHash(hasher.Sum(nil)); calc != hash {
t.Fatalf("Retrieved RLP body mismatch: have %v, want %v", entry, body)
}
}

// Delete the body and verify the execution
DeleteBody(tx, hash, 0)
if entry := ReadCanonicalBodyWithTransactions(tx, hash, 0); entry != nil {
t.Fatalf("Deleted body returned: %v", entry)
}
}
4 changes: 2 additions & 2 deletions core/state/intra_block_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,8 @@ func (sdb *IntraBlockState) SetCode(addr libcommon.Address, code []byte) {
return
}

hashedBytecode := utils.HashContractBytecode(hex.EncodeToString(code))
stateObject.SetCode(libcommon.HexToHash(hashedBytecode), code)
hashedBytecode := utils.HashContractBytecodeBigInt(hex.EncodeToString(code))
stateObject.SetCode(libcommon.BigToHash(hashedBytecode), code)
}
}

Expand Down
1 change: 1 addition & 0 deletions erigon-lib/chain/chain_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ type Config struct {
NormalcyBlock *big.Int `json:"normalcyBlock,omitempty"`

AllowFreeTransactions bool `json:"allowFreeTransactions,omitempty"`
ZkDefaultGasPrice uint64 `json:"zkDefaultGasFee,omitempty"`
}

type BorConfig interface {
Expand Down
11 changes: 4 additions & 7 deletions eth/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,7 @@ func New(ctx context.Context, stack *node.Node, config *ethconfig.Config, logger
cfg := backend.config

backend.chainConfig.AllowFreeTransactions = cfg.AllowFreeTransactions
backend.chainConfig.ZkDefaultGasPrice = cfg.DefaultGasPrice
l1Urls := strings.Split(cfg.L1RpcUrl, ",")

if cfg.Zk.L1CacheEnabled {
Expand Down Expand Up @@ -2083,20 +2084,16 @@ func setBorDefaultTxPoolPriceLimit(chainConfig *chain.Config, config txpoolcfg.C
func l1ContractAddressCheck(ctx context.Context, cfg *ethconfig.Zk, l1BlockSyncer *syncer.L1Syncer) (bool, error) {
l1AddrRollup, err := l1BlockSyncer.CallRollupManager(ctx, &cfg.AddressZkevm)
if err != nil {
log.Warn("L1 contract address check failed (RollupManager)", "err", err)
return false, err
}
if l1AddrRollup != cfg.AddressRollup {
log.Warn("L1 contract address check failed (AddressRollup)", "expected", cfg.AddressRollup, "actual", l1AddrRollup)
return false, nil
}

l1AddrAdmin, err := l1BlockSyncer.CallAdmin(ctx, &cfg.AddressZkevm)
if err != nil {
return false, err
}
if l1AddrAdmin != cfg.AddressAdmin {
log.Warn("L1 contract address check failed (AddressAdmin)", "expected", cfg.AddressAdmin, "actual", l1AddrAdmin)
return false, nil
if cfg.AddressAdmin != (libcommon.Address{}) {
log.Warn("🚨 zkevm.address-admin configuration parameter is deprecated and it will be removed in upcoming releases")
}

l1AddrGerManager, err := l1BlockSyncer.CallGlobalExitRootManager(ctx, &cfg.AddressZkevm)
Expand Down
3 changes: 1 addition & 2 deletions hermezconfig-bali.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ zkevm.l1-rpc-url: https://rpc.sepolia.org

zkevm.address-sequencer: "0x9aeCf44E36f20DC407d1A580630c9a2419912dcB"
zkevm.address-zkevm: "0x89BA0Ed947a88fe43c22Ae305C0713eC8a7Eb361"
zkevm.address-admin: "0x229A5bDBb09d8555f9214F7a6784804999BA4E0D"
zkevm.address-rollup: "0xE2EF6215aDc132Df6913C8DD16487aBF118d1764"
zkevm.address-ger-manager: "0x2968D6d736178f8FE7393CC33C87f29D9C287e78"

Expand All @@ -32,4 +31,4 @@ http.api: [eth, debug, net, trace, web3, erigon, zkevm]
http.addr: 0.0.0.0
http.vhosts: any
http.corsdomain: any
ws: true
ws: true
1 change: 0 additions & 1 deletion hermezconfig-cardona.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ zkevm.l1-rpc-url: https://rpc.sepolia.org

zkevm.address-sequencer: "0x761d53b47334bee6612c0bd1467fb881435375b2"
zkevm.address-zkevm: "0xA13Ddb14437A8F34897131367ad3ca78416d6bCa"
zkevm.address-admin: "0xff6250d0e86a2465b0c1bf8e36409503d6a26963"
zkevm.address-rollup: "0x32d33d5137a7cffb54c5bf8371172bcec5f310ff"
zkevm.address-ger-manager: "0xAd1490c248c5d3CbAE399Fd529b79B42984277DF"

Expand Down
1 change: 0 additions & 1 deletion hermezconfig-dev.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ zkevm.l1-rpc-url: https://rpc.eu-central-1.gateway.fm/v4/ethereum/non-archival/s

zkevm.address-sequencer: "0xfa3b44587990f97ba8b6ba7e230a5f0e95d14b3d"
zkevm.address-zkevm: "0x31A6ae85297DD0EeBD66D7556941c33Bd41d565C"
zkevm.address-admin: "0x9EA9db6af0FEfd30d22F813bE32E4E17A3189E6a"
zkevm.address-rollup: "0x9fB0B4A5d4d60aaCfa8DC20B8DF5528Ab26848d3"
zkevm.address-ger-manager: "0x76216E45Bdd20022eEcC07999e50228d7829534B"

Expand Down
1 change: 0 additions & 1 deletion hermezconfig-estest-syncer.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ zkevm.l1-rpc-url: "https://rpc.eu-central-1.gateway.fm/v4/ethereum/non-archival/

zkevm.address-sequencer: "0x7597b12b953bffe1457d89e7e4fe3da149b45d88"
zkevm.address-zkevm: "0x9b2e7dC74B5a1Ecb894F0BAAe99a9F3CB60FC455"
zkevm.address-admin: "0xa0ee057f2746d3282a10b8cd26a351b5ca121e8d"
zkevm.address-rollup: "0x7DFba61a337741a3d2F99Cc73069c9D0De8aa933"
zkevm.address-ger-manager: "0x0FE6A2FcF455b9B8004fd625909857933d3c7494"

Expand Down
1 change: 0 additions & 1 deletion hermezconfig-mainnet-shadowfork.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ zkevm.l1-rpc-url: https://rpc.eu-central-1.gateway.fm/v4/ethereum/non-archival/s

zkevm.address-sequencer: ""
zkevm.address-zkevm: ""
zkevm.address-admin: "0x9fB0B4A5d4d60aaCfa8DC20B8DF5528Ab26848d3"
zkevm.address-rollup: "0x31A6ae85297DD0EeBD66D7556941c33Bd41d565C"
zkevm.address-ger-manager: "0x76216E45Bdd20022eEcC07999e50228d7829534B"

Expand Down
1 change: 0 additions & 1 deletion hermezconfig-mainnet.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ zkevm.l1-rpc-url: https://rpc.eth.gateway.fm/

zkevm.address-sequencer: "0x148Ee7dAF16574cD020aFa34CC658f8F3fbd2800"
zkevm.address-zkevm: "0x519E42c24163192Dca44CD3fBDCEBF6be9130987"
zkevm.address-admin: "0x242daE44F5d8fb54B198D03a94dA45B5a4413e21"
zkevm.address-rollup: "0x5132A183E9F3CB7C848b0AAC5Ae0c4f0491B7aB2"
zkevm.address-ger-manager: "0x580bda1e7A0CFAe92Fa7F6c20A3794F169CE3CFb"

Expand Down
3 changes: 1 addition & 2 deletions smt/pkg/blockinfo/block_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,7 @@ func (b *BlockInfoTree) GenerateBlockTxKeysVals(

logToEncode := "0x" + hex.EncodeToString(rLog.Data) + reducedTopics

hash := utils.HashContractBytecode(logToEncode)
logEncodedBig := utils.ConvertHexToBigInt(hash)
logEncodedBig := utils.HashContractBytecodeBigInt(logToEncode)
key, val, err = generateTxLog(txIndexBig, big.NewInt(logIndex), logEncodedBig)
if err != nil {
return nil, nil, err
Expand Down
Loading

0 comments on commit f64e8b0

Please sign in to comment.