From 80825b04e81e1d567f5cccccb631bd88b6b465fc Mon Sep 17 00:00:00 2001 From: Kirill Date: Thu, 9 Jan 2025 03:54:51 +0400 Subject: [PATCH] Add tests --- .../sepolia-integration/block/64164.json | 327 ++++++++++++++++++ .../sepolia-integration/signature/64164.json | 7 + .../state_update/64164.json | 58 ++++ core/block.go | 2 +- core/block_pkg_test.go | 61 +++- core/block_test.go | 25 ++ core/transaction.go | 5 +- 7 files changed, 478 insertions(+), 7 deletions(-) create mode 100644 clients/feeder/testdata/sepolia-integration/block/64164.json create mode 100644 clients/feeder/testdata/sepolia-integration/signature/64164.json create mode 100644 clients/feeder/testdata/sepolia-integration/state_update/64164.json diff --git a/clients/feeder/testdata/sepolia-integration/block/64164.json b/clients/feeder/testdata/sepolia-integration/block/64164.json new file mode 100644 index 0000000000..7a2ada6267 --- /dev/null +++ b/clients/feeder/testdata/sepolia-integration/block/64164.json @@ -0,0 +1,327 @@ +{ + "block_hash": "0x386d167f026a854a8f31bfdc338645d601d1be4327e62390cc514522028bcd3", + "parent_block_hash": "0x4202a086d133d2a2e093e5550f37ffbf872a5ec659361ef9f45a6754657deb9", + "block_number": 64164, + "state_root": "0x1595ba3681219079689f1e49ad33026bc9ce96df6b6e0274440bff8adc24507", + "transaction_commitment": "0x51ce2cac09741ec58d4705f3334a421c60df616f5b778c61f45288a1915b782", + "event_commitment": "0x74243db179307a176a4e68c71162206e04d031bbf30665f726bc943563e631b", + "receipt_commitment": "0x5f0b74a50d4b9fb52486001f184418d10e702d6d5114d1f69241a4e272e8c77", + "state_diff_commitment": "0x78e182e5c6b73cdbf64678f09db6d6000ab5dbb7019284a0e6206c84c0be979", + "state_diff_length": 9, + "status": "ACCEPTED_ON_L2", + "l1_da_mode": "BLOB", + "l1_gas_price": { + "price_in_wei": "0xcd62576b", + "price_in_fri": "0x17842b1d0815" + }, + "l1_data_gas_price": { + "price_in_wei": "0x31ea", + "price_in_fri": "0x5b70ba9" + }, + "l2_gas_price": { + "price_in_wei": "0x15081", + "price_in_fri": "0x268771a6" + }, + "transactions": [ + { + "transaction_hash": "0x57f07d54cd337ce92ff67b8c831c80c19a6c48c2dcaecbb6d9175a3d2f07034", + "version": "0x3", + "signature": [ + "0x2a1658d74c85266cec309b15fb623ae7b18854a8e08e84834067fd68f07d15a", + "0x5304bd3e7151d87fabe5977a1d19c2cc9025cce27a2ce0b26a46633386add94" + ], + "nonce": "0x44d", + "nonce_data_availability_mode": 0, + "fee_data_availability_mode": 0, + "resource_bounds": { + "L1_DATA_GAS": { + "max_amount": "0x186a0", + "max_price_per_unit": "0x2d79883d20000" + }, + "L1_GAS": { + "max_amount": "0x186a0", + "max_price_per_unit": "0x2d79883d20000" + }, + "L2_GAS": { + "max_amount": "0x5f5e100", + "max_price_per_unit": "0xba43b7400" + } + }, + "tip": "0x0", + "paymaster_data": [], + "sender_address": "0x745d525a3582e91299d8d7c71730ffc4b1f191f5b219d800334bc0edad0983b", + "calldata": [ + "0x1", + "0x28c62efb55444e72ba017fd975177c3960fc62a1c213713691dff28c0a81424", + "0x5df99ae77df976b4f0e5cf28c7dcfe09bd6e81aab787b19ac0c08e03d928cf", + "0x1", + "0x37df8ea7f7996394a2473a5a1fa72395cff87eeb7f18c1aa5ec687374b942b4" + ], + "account_deployment_data": [], + "type": "INVOKE_FUNCTION" + }, + { + "transaction_hash": "0x7fc00513fc32dbefd3bc86f776a9e852aedb7244915a7ffa15966bf10633c6d", + "version": "0x3", + "signature": [ + "0x4a2af5acf5804dd6599dcb4988a92ab1f0d9b769157c774e397204655cfabc4", + "0x1b06ccd6ddc30a0b50e0719b50c0b964244f642b911d9cac969e8347bf53285" + ], + "nonce": "0x44e", + "nonce_data_availability_mode": 0, + "fee_data_availability_mode": 0, + "resource_bounds": { + "L1_DATA_GAS": { + "max_amount": "0x186a0", + "max_price_per_unit": "0x2d79883d20000" + }, + "L1_GAS": { + "max_amount": "0x186a0", + "max_price_per_unit": "0x2d79883d20000" + }, + "L2_GAS": { + "max_amount": "0x5f5e100", + "max_price_per_unit": "0xba43b7400" + } + }, + "tip": "0x0", + "paymaster_data": [], + "sender_address": "0x745d525a3582e91299d8d7c71730ffc4b1f191f5b219d800334bc0edad0983b", + "calldata": [ + "0x1", + "0x28c62efb55444e72ba017fd975177c3960fc62a1c213713691dff28c0a81424", + "0x1a8e87e9d2008fcd3ce423ae5219c21e49be18d05d72825feb7e2bb687ba35c", + "0x2", + "0x4dc1706fe707e529d72edb6cca3065bb", + "0x8b36c22567ccc4bda5afeee404b3699" + ], + "account_deployment_data": [], + "type": "INVOKE_FUNCTION" + }, + { + "transaction_hash": "0x4ae5a49ac6e5572789802a40bd294758b0bf12a8f96587599afe79b3f6c0609", + "version": "0x1", + "max_fee": "0x11c37937e08000", + "signature": [ + "0x75995ac8a373d95c02c3cf634fd086b61db0566ee70d4619a278288bd8dbfee", + "0x34b403b6deaa2068b83236993646ade9621cc1877a1b6f6bb04d2aa7f3f48b8" + ], + "nonce": "0x44f", + "sender_address": "0x745d525a3582e91299d8d7c71730ffc4b1f191f5b219d800334bc0edad0983b", + "calldata": [ + "0x2", + "0x28c62efb55444e72ba017fd975177c3960fc62a1c213713691dff28c0a81424", + "0x27a4a7332e590dd789019a6d125ff2aacd358e453090978cbf81f0d85e4c045", + "0x2", + "0xa6ffa15adc862eda3fce22525194b6b6983574bcaeac2a8c53747b258cd958", + "0x792f5d669c1d635f97ebe6002cf2725937281c2b20b31528d37016ff781e584", + "0x28c62efb55444e72ba017fd975177c3960fc62a1c213713691dff28c0a81424", + "0x31aafc75f498fdfa7528880ad27246b4c15af4954f96228c9a132b328de1c92", + "0x6", + "0x526f36d5c58e4e5415236ec9e621cebbf40b13e70f286c72ceafec56ce93160", + "0x3", + "0x4dad4c6a104d839b4785ed5b1e58fba346abb0d5dfd0d42ea2bc0921af7d405", + "0x5136723ddddf642feca9ef13e3b48b02cf00c8b4d9bd0c4077239623dda166", + "0x7fe6fcecc78e12cdef8f201e6259eae77bbd62c76921263428e9f107b3862a0", + "0x4ac932a6b33d761b443ada748daa58833315bcfa30e62b4620097467f4b2450" + ], + "type": "INVOKE_FUNCTION" + }, + { + "transaction_hash": "0x4aebca1a8399e488bf8c2f8518f397747308372764b34ca1f623d2689c0819", + "version": "0x1", + "max_fee": "0x11c37937e08000", + "signature": [ + "0x63a06c7daecc979f5aac1902339d9fe607fa1f091a0195d69756cce5634501a", + "0x5adf5b8015255c7626654b61f2b291f7d29bc4cae6acf0ad48b9ff36d051558" + ], + "nonce": "0x450", + "sender_address": "0x745d525a3582e91299d8d7c71730ffc4b1f191f5b219d800334bc0edad0983b", + "calldata": [ + "0x1", + "0x4138fd51f90d171df37e9d4419c8cdb67d525840c58f8a5c347be93a1c5277d", + "0x17da35ce4ed77e22e3b9149fd965dba57351a6c29f588a7d245e208d073e4c1", + "0x0" + ], + "type": "INVOKE_FUNCTION" + } + ], + "timestamp": 1736378061, + "sequencer_address": "0x1176a1bd84444c89232ec27754698e5d2e7e1a7f1539f12027f28b23ec9f3d8", + "transaction_receipts": [ + { + "execution_status": "SUCCEEDED", + "transaction_index": 0, + "transaction_hash": "0x57f07d54cd337ce92ff67b8c831c80c19a6c48c2dcaecbb6d9175a3d2f07034", + "l2_to_l1_messages": [], + "events": [ + { + "from_address": "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d", + "keys": [ + "0x99cd8bde557814842a3121e8ddfd433a539b8c9f14bf31ebf108d12e6196e9" + ], + "data": [ + "0x745d525a3582e91299d8d7c71730ffc4b1f191f5b219d800334bc0edad0983b", + "0x1176a1bd84444c89232ec27754698e5d2e7e1a7f1539f12027f28b23ec9f3d8", + "0x1b9d688c83e7e", + "0x0" + ] + } + ], + "execution_resources": { + "n_steps": 4467, + "builtin_instance_counter": { + "pedersen_builtin": 19, + "range_check_builtin": 137, + "poseidon_builtin": 3 + }, + "n_memory_holes": 0, + "data_availability": { + "l1_gas": 0, + "l1_data_gas": 128, + "l2_gas": 0 + }, + "total_gas_consumed": { + "l1_gas": 0, + "l1_data_gas": 128, + "l2_gas": 751525 + } + }, + "actual_fee": "0x1b9d688c83e7e" + }, + { + "execution_status": "SUCCEEDED", + "transaction_index": 1, + "transaction_hash": "0x7fc00513fc32dbefd3bc86f776a9e852aedb7244915a7ffa15966bf10633c6d", + "l2_to_l1_messages": [], + "events": [ + { + "from_address": "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d", + "keys": [ + "0x99cd8bde557814842a3121e8ddfd433a539b8c9f14bf31ebf108d12e6196e9" + ], + "data": [ + "0x745d525a3582e91299d8d7c71730ffc4b1f191f5b219d800334bc0edad0983b", + "0x1176a1bd84444c89232ec27754698e5d2e7e1a7f1539f12027f28b23ec9f3d8", + "0x27a6fb6b2ba9e", + "0x0" + ] + } + ], + "execution_resources": { + "n_steps": 4475, + "builtin_instance_counter": { + "poseidon_builtin": 3, + "pedersen_builtin": 20, + "range_check_builtin": 137 + }, + "n_memory_holes": 0, + "data_availability": { + "l1_gas": 0, + "l1_data_gas": 128, + "l2_gas": 0 + }, + "total_gas_consumed": { + "l1_gas": 0, + "l1_data_gas": 128, + "l2_gas": 1079125 + } + }, + "actual_fee": "0x27a6fb6b2ba9e" + }, + { + "execution_status": "SUCCEEDED", + "transaction_index": 2, + "transaction_hash": "0x4ae5a49ac6e5572789802a40bd294758b0bf12a8f96587599afe79b3f6c0609", + "l2_to_l1_messages": [], + "events": [ + { + "from_address": "0x28c62efb55444e72ba017fd975177c3960fc62a1c213713691dff28c0a81424", + "keys": [ + "0x15bd0500dc9d7e69ab9577f73a8d753e8761bed10f25ba0f124254dc4edb8b4" + ], + "data": [ + "0x526f36d5c58e4e5415236ec9e621cebbf40b13e70f286c72ceafec56ce93160", + "0x3", + "0x4dad4c6a104d839b4785ed5b1e58fba346abb0d5dfd0d42ea2bc0921af7d405", + "0x5136723ddddf642feca9ef13e3b48b02cf00c8b4d9bd0c4077239623dda166", + "0x7fe6fcecc78e12cdef8f201e6259eae77bbd62c76921263428e9f107b3862a0" + ] + }, + { + "from_address": "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7", + "keys": [ + "0x99cd8bde557814842a3121e8ddfd433a539b8c9f14bf31ebf108d12e6196e9" + ], + "data": [ + "0x745d525a3582e91299d8d7c71730ffc4b1f191f5b219d800334bc0edad0983b", + "0x1176a1bd84444c89232ec27754698e5d2e7e1a7f1539f12027f28b23ec9f3d8", + "0x140ed2b0b3", + "0x0" + ] + } + ], + "execution_resources": { + "n_steps": 5035, + "builtin_instance_counter": { + "range_check_builtin": 205, + "pedersen_builtin": 29, + "poseidon_builtin": 5 + }, + "n_memory_holes": 0, + "data_availability": { + "l1_gas": 0, + "l1_data_gas": 256, + "l2_gas": 0 + }, + "total_gas_consumed": { + "l1_gas": 25, + "l1_data_gas": 288, + "l2_gas": 0 + } + }, + "actual_fee": "0x140ed2b0b3" + }, + { + "execution_status": "SUCCEEDED", + "transaction_index": 3, + "transaction_hash": "0x4aebca1a8399e488bf8c2f8518f397747308372764b34ca1f623d2689c0819", + "l2_to_l1_messages": [], + "events": [ + { + "from_address": "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7", + "keys": [ + "0x99cd8bde557814842a3121e8ddfd433a539b8c9f14bf31ebf108d12e6196e9" + ], + "data": [ + "0x745d525a3582e91299d8d7c71730ffc4b1f191f5b219d800334bc0edad0983b", + "0x1176a1bd84444c89232ec27754698e5d2e7e1a7f1539f12027f28b23ec9f3d8", + "0x16033bcdd7d", + "0x0" + ] + } + ], + "execution_resources": { + "n_steps": 4459, + "builtin_instance_counter": { + "pedersen_builtin": 18, + "range_check_builtin": 137, + "poseidon_builtin": 3 + }, + "n_memory_holes": 0, + "data_availability": { + "l1_gas": 0, + "l1_data_gas": 128, + "l2_gas": 0 + }, + "total_gas_consumed": { + "l1_gas": 439, + "l1_data_gas": 128, + "l2_gas": 0 + } + }, + "actual_fee": "0x16033bcdd7d" + } + ], + "starknet_version": "0.13.4" +} \ No newline at end of file diff --git a/clients/feeder/testdata/sepolia-integration/signature/64164.json b/clients/feeder/testdata/sepolia-integration/signature/64164.json new file mode 100644 index 0000000000..c2955fe512 --- /dev/null +++ b/clients/feeder/testdata/sepolia-integration/signature/64164.json @@ -0,0 +1,7 @@ +{ + "block_hash": "0x386d167f026a854a8f31bfdc338645d601d1be4327e62390cc514522028bcd3", + "signature": [ + "0x3693cdfee86842e03c9cd98373e13e29d582cabfa21f50f12427d6a9c077e1a", + "0x26aef04285d6cd6af4d13de0139c97dcbf883c4d26aea4d8848cafd372c8dcf" + ] +} \ No newline at end of file diff --git a/clients/feeder/testdata/sepolia-integration/state_update/64164.json b/clients/feeder/testdata/sepolia-integration/state_update/64164.json new file mode 100644 index 0000000000..cf3a5cc89a --- /dev/null +++ b/clients/feeder/testdata/sepolia-integration/state_update/64164.json @@ -0,0 +1,58 @@ +{ + "block_hash": "0x386d167f026a854a8f31bfdc338645d601d1be4327e62390cc514522028bcd3", + "new_root": "0x1595ba3681219079689f1e49ad33026bc9ce96df6b6e0274440bff8adc24507", + "old_root": "0x6cd011b95b2cc99846b978dd21f06d9572214bc8101b207539e8ad28f4e2e62", + "state_diff": { + "storage_diffs": { + "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7": [ + { + "key": "0x14ef16ae40c3041a0d8a3f068e1bca0d2ea854cc59162bed84fcc492c70b7ac", + "value": "0x8ab3a3f98ffbeacc" + }, + { + "key": "0x5496768776e3db30053404f18067d81a6e06f5a2b0de326e21298fd9d569a9a", + "value": "0xa98fd2ecc9bf3851d" + } + ], + "0x2": [ + { + "key": "0x0", + "value": "0x157" + }, + { + "key": "0xa6ffa15adc862eda3fce22525194b6b6983574bcaeac2a8c53747b258cd958", + "value": "0x156" + } + ], + "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d": [ + { + "key": "0x14ef16ae40c3041a0d8a3f068e1bca0d2ea854cc59162bed84fcc492c70b7ac", + "value": "0x2190d9c3ae7164d6bfd" + }, + { + "key": "0x5496768776e3db30053404f18067d81a6e06f5a2b0de326e21298fd9d569a9a", + "value": "0x1043f568dd2e1fb6bc6e" + } + ], + "0x1": [ + { + "key": "0xfa9a", + "value": "0x55783487620026c4725c20fb04c8e4f14bef16b28cecb637cbcbe0a9d3ae426" + } + ], + "0x28c62efb55444e72ba017fd975177c3960fc62a1c213713691dff28c0a81424": [ + { + "key": "0xa6ffa15adc862eda3fce22525194b6b6983574bcaeac2a8c53747b258cd958", + "value": "0x792f5d669c1d635f97ebe6002cf2725937281c2b20b31528d37016ff781e584" + } + ] + }, + "nonces": { + "0x745d525a3582e91299d8d7c71730ffc4b1f191f5b219d800334bc0edad0983b": "0x451" + }, + "deployed_contracts": [], + "old_declared_contracts": [], + "declared_classes": [], + "replaced_classes": [] + } +} \ No newline at end of file diff --git a/core/block.go b/core/block.go index bc52c9cca4..ee152aa2d0 100644 --- a/core/block.go +++ b/core/block.go @@ -255,7 +255,7 @@ func post0132Hash(b *Block, stateDiff *StateDiff) (*felt.Felt, *BlockCommitments var tErr, eErr, rErr error wg.Go(func() { - txCommitment, tErr = transactionCommitmentPoseidon(b.Transactions) + txCommitment, tErr = transactionCommitmentPoseidon0132(b.Transactions) }) wg.Go(func() { eCommitment, eErr = eventCommitmentPoseidon(b.Receipts) diff --git a/core/block_pkg_test.go b/core/block_pkg_test.go index adc58dfc95..6d03bb401e 100644 --- a/core/block_pkg_test.go +++ b/core/block_pkg_test.go @@ -9,9 +9,9 @@ import ( "github.com/stretchr/testify/require" ) -func TestTransactionCommitmentPoseidon(t *testing.T) { +func TestTransactionCommitmentPoseidon0134(t *testing.T) { t.Run("nil", func(t *testing.T) { - c, err := transactionCommitmentPoseidon(nil) + c, err := transactionCommitmentPoseidon0134(nil) require.NoError(t, err) assert.Equal(t, &felt.Zero, c) }) @@ -40,7 +40,60 @@ func TestTransactionCommitmentPoseidon(t *testing.T) { txs = append(txs, invoke, deployAccount, declare) } - c, err := transactionCommitmentPoseidon(txs) + c, err := transactionCommitmentPoseidon0134(txs) + require.NoError(t, err) + expected := utils.HexToFelt(t, "0x4ca6d4ceb367bf070d896a1479190d3c7b751f525e69a46ee2c83f0afe7cb8") + assert.Equal(t, expected, c, "expected: %s, got: %s", expected, c) + }) + t.Run("txs without signature", func(t *testing.T) { + txs := []Transaction{ + &L1HandlerTransaction{ + TransactionHash: utils.HexToFelt(t, "0x1"), + }, + &DeployTransaction{ + TransactionHash: utils.HexToFelt(t, "0x2"), + }, + } + + c, err := transactionCommitmentPoseidon0134(txs) + require.NoError(t, err) + expected := utils.HexToFelt(t, "0x5ecb75d7a86984ec8ef9d5fbbe49ef8737c37246d33cf73037df1ceb412244e") + assert.Equal(t, expected, c, "expected: %s, got: %s", expected, c) + }) +} + +func TestTransactionCommitmentPoseidon0132(t *testing.T) { + t.Run("nil", func(t *testing.T) { + c, err := transactionCommitmentPoseidon0132(nil) + require.NoError(t, err) + assert.Equal(t, &felt.Zero, c) + }) + t.Run("txs with signature", func(t *testing.T) { + var txs []Transaction + + type signature = []*felt.Felt + // actual tx hash is irrelevant so it's ok to have different transactions with the same hash + txHash := utils.HexToFelt(t, "0xCAFEBABE") + // nil signature, empty signature and signature with some non-empty value + for _, sign := range []signature{nil, make(signature, 0), {new(felt.Felt).SetUint64(uint64(3))}} { + invoke := &InvokeTransaction{ + TransactionHash: txHash, + TransactionSignature: sign, + } + deployAccount := &DeployAccountTransaction{ + DeployTransaction: DeployTransaction{ + TransactionHash: txHash, + }, + TransactionSignature: sign, + } + declare := &DeclareTransaction{ + TransactionHash: txHash, + TransactionSignature: sign, + } + txs = append(txs, invoke, deployAccount, declare) + } + + c, err := transactionCommitmentPoseidon0132(txs) require.NoError(t, err) expected := utils.HexToFelt(t, "0x68303856fce63d62acb85da0766b370c03754aa316b0b5bce05982f9561b73d") assert.Equal(t, expected, c, "expected: %s, got: %s", expected, c) @@ -55,7 +108,7 @@ func TestTransactionCommitmentPoseidon(t *testing.T) { }, } - c, err := transactionCommitmentPoseidon(txs) + c, err := transactionCommitmentPoseidon0132(txs) require.NoError(t, err) expected := utils.HexToFelt(t, "0x6e067f82eefc8efa75b4ad389253757f4992eee0f81f0b43815fa56135ca801") assert.Equal(t, expected, c, "expected: %s, got: %s", expected, c) diff --git a/core/block_test.go b/core/block_test.go index 068bd50666..5a144b8cfc 100644 --- a/core/block_test.go +++ b/core/block_test.go @@ -267,3 +267,28 @@ func Test0132BlockHash(t *testing.T) { }) } } + +func Test0134BlockHash(t *testing.T) { + t.Parallel() + client := feeder.NewTestClient(t, &utils.SepoliaIntegration) + gw := adaptfeeder.New(client) + + for _, test := range []struct { + blockNum uint64 + }{ + {blockNum: 64164}, + } { + t.Run(fmt.Sprintf("blockNum=%v", test.blockNum), func(t *testing.T) { + t.Parallel() + b, err := gw.BlockByNumber(context.Background(), test.blockNum) + require.NoError(t, err) + + su, err := gw.StateUpdate(context.Background(), test.blockNum) + require.NoError(t, err) + + c, err := core.VerifyBlockHash(b, &utils.SepoliaIntegration, su.StateDiff) + require.NoError(t, err) + assert.NotNil(t, c) + }) + } +} diff --git a/core/transaction.go b/core/transaction.go index 6d8819c4da..1b05b1f936 100644 --- a/core/transaction.go +++ b/core/transaction.go @@ -668,7 +668,7 @@ func transactionCommitmentPedersen(transactions []Transaction, protocolVersion s return calculateCommitment(transactions, trie.RunOnTempTriePedersen, hashFunc) } -// transactionCommitmentPoseidon0134 handles empty signatures compared to transactionCommitmentPoseidon: +// transactionCommitmentPoseidon0134 handles empty signatures compared to transactionCommitmentPoseidon0132: // empty signatures are interpreted as [] instead of [0] func transactionCommitmentPoseidon0134(transactions []Transaction) (*felt.Felt, error) { return calculateCommitment(transactions, trie.RunOnTempTriePoseidon, func(transaction Transaction) *felt.Felt { @@ -683,7 +683,8 @@ func transactionCommitmentPoseidon0134(transactions []Transaction) (*felt.Felt, }) } -func transactionCommitmentPoseidon(transactions []Transaction) (*felt.Felt, error) { +// transactionCommitmentPoseidon0132 is used to calculate tx commitment for 0.13.2 <= block.version < 0.13.4 +func transactionCommitmentPoseidon0132(transactions []Transaction) (*felt.Felt, error) { return calculateCommitment(transactions, trie.RunOnTempTriePoseidon, func(transaction Transaction) *felt.Felt { var digest crypto.PoseidonDigest digest.Update(transaction.Hash())