Skip to content

Commit

Permalink
Add 0.13.2 Block tests
Browse files Browse the repository at this point in the history
  • Loading branch information
IronGauntlets committed Jul 30, 2024
1 parent d6e8dbb commit 89df932
Show file tree
Hide file tree
Showing 9 changed files with 15,285 additions and 8 deletions.
526 changes: 526 additions & 0 deletions clients/feeder/testdata/sepolia-integration/block/35749.json

Large diffs are not rendered by default.

418 changes: 418 additions & 0 deletions clients/feeder/testdata/sepolia-integration/block/37500.json

Large diffs are not rendered by default.

14,284 changes: 14,284 additions & 0 deletions clients/feeder/testdata/sepolia-integration/block/38748.json

Large diffs are not rendered by default.

12 changes: 4 additions & 8 deletions clients/feeder/testdata/sepolia-integration/signature/16350.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
{
"block_number": 16350,
"block_hash": "0x660be3d095f36ffebf314c8bdea6823ba5e1f02fec2db61c84eb6faa859195",
"signature": [
"0x10fe667903a11a659d5cf95ab3ca441ef6888833b4e2036d0c6761e6498faf4",
"0x334061004caf8145136479b44112611fe9c90b3251189094c6e453d29bd6973"
],
"signature_input": {
"block_hash": "0x660be3d095f36ffebf314c8bdea6823ba5e1f02fec2db61c84eb6faa859195",
"state_diff_commitment": "0x62c1b2056ff46e764b1103523ac104c0b9377593a4458e574b73133d00221e5"
}
"0x7ee8a86cd921053e037181b4b57b813db63b88ad5a5975ecada151d079322ae",
"0x6f97aefb8f14351f8a60f66c936ab8175744217522d7b335deadae8a4f15c68"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"block_hash": "0x1ea2a9cfa3df5297d58c0a04d09d276bc68d40fe64701305bbe2ed8f417e869",
"signature": [
"0x45161746eecbeae297f45a1f407ab702310f4e52c5e9350ed6f542fa8e98413",
"0x3e67cfbc5b179ba55a3b687228d8fe40626233f6691b4aabe308fcd6d71dcdb"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"block_hash": "0x23b37df7360bc6c434d32a6a4f46f1705efb4fdf7142bfd66929f5b40035a6",
"signature": [
"0x12c78ec06dd5736e8c4db89f45a6be9fb38b61821b0c2fe5ec960dd29a6c734",
"0x498086fd30062224ce7bfab9a6b4a875ccc129982ae6f909be8478e4a429dbd"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"block_hash": "0xf7471e29d9f546fce49b82c15eb3f2d62d27526884e7787277c9002b9cac83",
"signature": [
"0x61aa44c52ed27ba5e95339b1a77aa75e849f18cbaacf868398bef20dc5ac395",
"0x74a81536d17b0c3d8949346d54842d15974f82313a17cb3806c7f737b9889fe"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"block_hash": "0x40b9de4d20b6537151895df0fa2520be3639a2a2a65915b5d27855efd1d78fe",
"signature": [
"0x41e1c125c6b41eb8df6cfb116930cf7db423834e38090015bf6630757682a71",
"0x1580850614ee0401dce1c950c87cf900ebc3b50ad58bd9b38599565d0cfd313"
]
}
25 changes: 25 additions & 0 deletions core/block_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,31 @@ func TestBlockHash(t *testing.T) {
})
}

func Test0132BlocHash(t *testing.T) {
t.Parallel()
client := feeder.NewTestClient(t, &utils.SepoliaIntegration)
gw := adaptfeeder.New(client)

for _, test := range []struct {
blockNum uint64
}{
{blockNum: 35748}, {blockNum: 35749}, {blockNum: 37500}, {blockNum: 38748},
} {
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)
})
}
}

func TestBlockHashP2P(t *testing.T) {
mainnetGW := adaptfeeder.New(feeder.NewTestClient(t, &utils.Mainnet))

Expand Down

0 comments on commit 89df932

Please sign in to comment.