Skip to content

Commit

Permalink
Add signatures to core.Header (#1246)
Browse files Browse the repository at this point in the history
Fixes #1225
  • Loading branch information
omerfirmak authored Sep 25, 2023
1 parent d289239 commit 807ca34
Show file tree
Hide file tree
Showing 42 changed files with 98 additions and 14 deletions.
7 changes: 6 additions & 1 deletion adapters/feeder2core/feeder2core.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/ethereum/go-ethereum/common"
)

func AdaptBlock(response *feeder.Block) (*core.Block, error) {
func AdaptBlock(response *feeder.Block, sig *feeder.Signature) (*core.Block, error) {
if response == nil {
return nil, errors.New("nil client block")
}
Expand All @@ -31,6 +31,10 @@ func AdaptBlock(response *feeder.Block) (*core.Block, error) {
eventCount += uint64(len(response.Receipts[i].Events))
}

sigs := [][]*felt.Felt{}
if sig != nil {
sigs = append(sigs, sig.Signature)
}
return &core.Block{
Header: &core.Header{
Hash: response.Hash,
Expand All @@ -45,6 +49,7 @@ func AdaptBlock(response *feeder.Block) (*core.Block, error) {
EventCount: eventCount,
EventsBloom: core.EventsBloom(receipts),
GasPrice: response.GasPrice,
Signatures: sigs,
},
Transactions: txns,
Receipts: receipts,
Expand Down
14 changes: 13 additions & 1 deletion adapters/feeder2core/feeder2core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/NethermindEth/juno/adapters/feeder2core"
"github.com/NethermindEth/juno/clients/feeder"
"github.com/NethermindEth/juno/core"
"github.com/NethermindEth/juno/core/felt"
"github.com/NethermindEth/juno/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand All @@ -18,6 +19,7 @@ func TestAdaptBlock(t *testing.T) {
number uint64
protocolVersion string
network utils.Network
sig *feeder.Signature
}{
{
number: 147,
Expand All @@ -32,6 +34,9 @@ func TestAdaptBlock(t *testing.T) {
number: 304740,
protocolVersion: "0.12.1",
network: utils.INTEGRATION,
sig: &feeder.Signature{
Signature: []*felt.Felt{utils.HexToFelt(t, "0x44"), utils.HexToFelt(t, "0x37")},
},
},
}

Expand All @@ -43,7 +48,7 @@ func TestAdaptBlock(t *testing.T) {

response, err := client.Block(ctx, strconv.FormatUint(test.number, 10))
require.NoError(t, err)
block, err := feeder2core.AdaptBlock(response)
block, err := feeder2core.AdaptBlock(response, test.sig)
require.NoError(t, err)

expectedEventCount := uint64(0)
Expand All @@ -68,6 +73,13 @@ func TestAdaptBlock(t *testing.T) {
assert.Equal(t, expectedEventCount, block.EventCount)
assert.Equal(t, test.protocolVersion, block.ProtocolVersion)
assert.Nil(t, block.ExtraData)

if test.sig != nil {
require.Len(t, block.Signatures, 1)
assert.Equal(t, test.sig.Signature, block.Signatures[0])
} else {
assert.Empty(t, block.Signatures)
}
})
}
}
Expand Down
1 change: 1 addition & 0 deletions clients/feeder/testdata/goerli/signature/1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 1, "signature": ["0x4f76bab71a66a2f62d9944719e8c28df54ae8ddfbfd5a0d4845b9f76dc643d5", "0x2239058cc984c0fb13fce6d45b0709b50054f4ad397d674eaf099be0f2a9202"], "signature_input": {"block_hash": "0x75e00250d4343326f322e370df4c9c73c7be105ad9f532eeb97891a34d9e4a5", "state_diff_commitment": "0x503a2ee3fc8754b92c4f6a6fe6aec18d90661f1b6ab76ec0234213cda0857f1"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/goerli/signature/119802.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 119802, "signature": ["0x4351eb839a548f3906a93cb5a0cef1b71eeff029b32f8f758b4b8a43a3af2ef", "0xa6e407d15dc52b54b59f7314adeb418d36d607366cddfe629043ae523b1113"], "signature_input": {"block_hash": "0x62483d7a29a2aae440c4418e5ddf5acdbacc391af959d681e2dc9441b2895b6", "state_diff_commitment": "0x3d01e49b9966a62ea4ad1ea3286025c719ecc26a6156d06f34fcec1964e7f6a"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/goerli/signature/156000.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 156000, "signature": ["0x71fef1b202f5c25df64ae720d0fda22d70c8d3669ccf6878e78ec2915a6ff20", "0x66d482726992814f6bd6057d925a026cef835d5d00577dec33e82724e2a5048"], "signature_input": {"block_hash": "0x1288267b119adefd52795c3421f8fabba78f49e911f39c1fb2f4e5eb8fb771", "state_diff_commitment": "0x6122d962032b670f38d81f6f6b812b399c8ff46b856b367abc9849d918734ed"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/goerli/signature/231579.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 231579, "signature": ["0x73e9bebd835bbab3db32c8b7db3fe7073eedd7faa08874c8441dbd0fede2ae5", "0x1bd2ab2d5c5fb736f1765fc77f497be0b37a47b7b7c573f2eb1435f9f110675"], "signature_input": {"block_hash": "0x40ffdbd9abbc4fc64652c50db94a29bce65c183316f304a95df624de708e746", "state_diff_commitment": "0x5ebf52d066afc7118a69ef78debdaa860c76f5dcd721a5af1f316be71931568"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/goerli/signature/485004.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 485004, "signature": ["0x1c62e12643fef46059052bf88003a94f7c2a815d1b3d55687218c0f0208e595", "0x1ff9308a9e1c56cce7e006991dfbb0e330b48d86e4e1190bff7e6e1e806dfce"], "signature_input": {"block_hash": "0x7f9413a02d787cb52046925414b4f4f4cfde93b4a96f92fa7c57eb0ac302f3", "state_diff_commitment": "0x3af5ef927e108424066aa0bb3dbda65df8f93a3cb15561e375f49b3de680c32"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/goerli2/signature/0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 0, "signature": ["0x43fed195d6bd5fcb674df93edae3907fdcad1bcefa5fb1529c3555b3bddee1", "0x1c8983a5f72b4ac34453ff8d798cf1a475a28dc0eec0c9ad10ae50755eb208e"], "signature_input": {"block_hash": "0x4163f64ea0258f21fd05b478e2306ab2daeb541bdbd3bf29a9874dc5cd4b64e", "state_diff_commitment": "0x77ca47cff95178cd1893185a220bd47e88aef2f4f09dbfde0afeb32875708fd"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/goerli2/signature/1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 1, "signature": ["0x3c306d3cfbe60eac71d515a949db3da673ba65b486071a163b4bf186d2c2ef6", "0x6dfd9f978c65cb69f368008e135d3b249bc2c7d1c6aed0015fcfed1f80ba98b"], "signature_input": {"block_hash": "0x734df0487fd829b780691dcacacf31481ca88231c504bca3ab030049f7af6d9", "state_diff_commitment": "0x7132c5a956fc14e16a96a61b6a95198f6e215ec71d5dbc459c565c6c7c45044"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/goerli2/signature/10.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 10, "signature": ["0x2e9cac4a73e7e922838dc47d847f7bb2527bbc2eb523e5d301cc2cfe5f8a1ea", "0x62349ae6ffd6a0fc61a129fda97b345aa27667512465b4c7f1c5b80a0200f4f"], "signature_input": {"block_hash": "0x6902dad2e7ad976c59e032825b43474097396ad4a323d3782ede467540085f5", "state_diff_commitment": "0x304092240777a84f83e18abc6e83df1da4945fe1001ca06171753670fbf503d"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/goerli2/signature/110238.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 110238, "signature": ["0xc7a99f33b39f220b37257d18877155dc4c2f68ba79e6c5b19a7a16a70f18ba", "0x483c4456960585adb31ed991591c560cc0b5795275dc95e5792911e41978e04"], "signature_input": {"block_hash": "0x763c13362d2dbed297e6fd43992f818c650f239b6762deb754da61605ddb5bb", "state_diff_commitment": "0x3c7a6b49a8eb4cfcc5dd627d5558ed03e00f7fef87a975673112dd8eb35e2b1"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/goerli2/signature/2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 2, "signature": ["0xa5b6394b61ccb1da3e816f825c752ccdc772ffcdbf23eed788bcd1baee5b24", "0x5f77996d674b0184c7d1615e318958a1e499da3899769d476505d34a2f0b8ba"], "signature_input": {"block_hash": "0x693982aed75e6a4bb902130eb8b0aa3b799ce5fdab8f5a3a0c3d9a265aa219e", "state_diff_commitment": "0x4edd5f532fd693b6d8fb2a75ef60edaaeb07f0a23d4391fee82e545b3c11f22"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/goerli2/signature/3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 3, "signature": ["0x37303b1c77ae348ceaee555c998b2790bb35c179249d3b0e73c4e9253683567", "0x64f2e80853546dd168198be3af209df29deffa41eb4530fdfd000b09d5d0c2b"], "signature_input": {"block_hash": "0x61d1f84a603eb863a74b3a2e68ffa31d0c811a80dee0f4021ad3e7c4557d6a9", "state_diff_commitment": "0x2a22856ec4c29384c5441115b0b69793c420785ba1bac6e00f1b5f660a74742"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/goerli2/signature/4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 4, "signature": ["0x3cf7887c0daebd362fccecf724c6bd89f43d6c4ed682a2bf135eb7a4edf3200", "0x9d8b8ba7fcfedb1d196d66294a79fc45ef6b6992588f4ba2e57e67818c0eb7"], "signature_input": {"block_hash": "0x791fb65b9780f90f7f64d4ec49509da1071af166de61573d06fde906626a09b", "state_diff_commitment": "0x607fb89853462ee15c6e84d1389f49e87ce9d05e18ecaa367de9afe0bf4343b"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/goerli2/signature/49.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 49, "signature": ["0x7cf3ef69918530c32dd19bd1a1f2f37c8c68a1fc9e4666ba5c055899c570042", "0x48a622bbb1e5ed05f0429170dff21ee88d513ce8a49a3fce205c3ba58e12b19"], "signature_input": {"block_hash": "0x5d561b8a6b0d1f4b30dcea8391929b9c5a9a96c40881941b254aa82f67191b6", "state_diff_commitment": "0x3d1997f93d88c453ac194d69621e583284deaaa589f12657988590b30edda93"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/goerli2/signature/5.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 5, "signature": ["0x2cfb4beb32bd0346011c89e63efe3556a05ca90a108bc65724ee0727db1fa22", "0x3adf87c3e9bce66511e7ceac207102607fbe02a9d50effe30e600cf4f6224ee"], "signature_input": {"block_hash": "0x3b43b334f46b921938854ba85ffc890c1b1321f8fd69e7b2961b18b4260de14", "state_diff_commitment": "0x39e4ec4c7d67af55903c1b92d057c2570f1a0f456376171c3e24c806cda992"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/goerli2/signature/6.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 6, "signature": ["0x768fae89ebc4a7c7a5bbda0ea6af50d79be274414302dcb62cb25cb4e3af3b2", "0xb7a42edc20605f34c223571869651dd3b9ae25c00ed2a2d675a8e617c7fde6"], "signature_input": {"block_hash": "0xdc4f7b00430daf9a6985145de533323be2a034252014eb39a958457f690b3b", "state_diff_commitment": "0x613611e7059594aa1e8c7df1f89f9304b1338d824cd071167d49d3de186ea52"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/integration/signature/1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 1, "signature": ["0x7fe660044180e7d436e77ab017faff0686c0b02a425ade81de8fd5aa95663bb", "0xc475f270d1e6d735829ac7db0c7580f86b8f788e44106220312125496d1931"], "signature_input": {"block_hash": "0x34e815552e42c5eb5233b99de2d3d7fd396e575df2719bf98e7ed2794494f86", "state_diff_commitment": "0x6785083b32b863270b67ee300230b9054ef4556c3677662f995e9e16f90a237"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/integration/signature/283364.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 283364, "signature": ["0x405a7a6641a0c5990db264b67676e6bde816716be5665790bb314c80ca9f5f0", "0x2665b141b14b80a3f96d7487665b49dba53d2a873a8d45561bfefd9499ca10a"], "signature_input": {"block_hash": "0x67d24961077de7a1f49b6b1da78903ee80217662d026c155e14d7abedc04034", "state_diff_commitment": "0x85894cd1d031ed87d7cba9b5eebd44beb7e9ec5b578d19e052844f4a2561ee"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/integration/signature/286310.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 286310, "signature": ["0x432f6dc603d32d6b8006cabfb958c6b9c46c4a1b6b0a1f5a745cd634c1c06ae", "0x5cc5b3b157423889b7585a1e81175f9cce3eca0b1a2b18cdc176e0a67c751a5"], "signature_input": {"block_hash": "0x759cf41ef2c1b0bdf349860435782e54527db82c9af567069c0751d58cfa9a3", "state_diff_commitment": "0x6dff3b00dc3259fd0c60c2c403440c4fb5f5174bd02673dea568a27256e9f1d"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/integration/signature/304740.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 304740, "signature": ["0x3cec41f7ef839991e23532c54d7bc4743df5fd8745e46072f4547a4829fe7e4", "0x7edc19de4ff3f88f1bffb7427bacb354d3844c87f4b55b56c62bd326ce92652"], "signature_input": {"block_hash": "0x76e0229fd0c36dda2ee7905f7e4c9b3ebb78d98c4bfab550bcb3a03bf859a6", "state_diff_commitment": "0x3e6886a602eabd209a8f342b0694e3317d7fa0f80e4c4fba1b3ea1b5ced4bae"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/integration/signature/78541.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 78541, "signature": ["0xe59046f297679492dec6987bf580707fc7a438bd3da98b9c73a6e495d915d", "0x23e7e5fddc5e6be25f264e8571f98948600be4768a9f6ab7406ef1ef3da43c3"], "signature_input": {"block_hash": "0x5d59ee907519ce982f76223f3e3a24b485386c2eb5f69b20c146cb68d46a0fa", "state_diff_commitment": "0x115c0175ad67f6176efe9a9da0ee2744ba2d5bdc12f6bfa949af89d4282518f"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/mainnet/signature/0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 0, "signature": ["0x484a36b518e33198bfe7a29d82842ae092f9181120e1d49b926c651adf315ed", "0x7e21090ab0c6c70fa2b73e17e6288db298dbe191b04bfd1721436530e84861e"], "signature_input": {"block_hash": "0x47c3637b57c2b079b93c61539950c17e868a28f46cdef28f88521067f21e943", "state_diff_commitment": "0x6c4a7559b57caded12ad2275f78c4ac310ff54b2e233d25c9cf4891c251b450"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/mainnet/signature/1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 1, "signature": ["0x5c328d673c07e530a45d6f12e569df0d059d97bf920d978e44daa54fb3db655", "0x37feba468c96099a9a610c34bab6230af8c7e9d78c1ddb7436488961fc5161d"], "signature_input": {"block_hash": "0x2a70fb03fe363a2d6be843343a1d81ce6abeda1e9bd5cc6ad8fa9f45e30fdeb", "state_diff_commitment": "0x13beed68d79c0ff1d6b465660bcf245a7f0ec11af5e9c6564fba30543705fe3"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/mainnet/signature/1059.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 1059, "signature": ["0x3e44240ef5b149fb8e3b3f58463e3c0202b12d01a25bd48de61be2283d6f3f5", "0x2636d7bbd023374a5e817aeee7929af74e7b477f1a11d256c73900074ccf83b"], "signature_input": {"block_hash": "0x4f9f582d9cc210d7139b6cb7461f1f1a82a633e0e2e910d48f4e9f518f080ac", "state_diff_commitment": "0xaba7242d879750aa925bd919d4ae9cb11f3b690a99e2311c5b7d5a0cceb4d3"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/mainnet/signature/11817.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 11817, "signature": ["0x5fdd06e6af3c04dccacac0de515576d20d1b211cb97388b6c5bb0dcfcbc0c0a", "0x4353c35204b90c629b2e583c1bd70b724095d27660d7bb9ac11fb975093a89c"], "signature_input": {"block_hash": "0x24c692acaed3b486990bd9d2b2fbbee802b37b3bd79c59f295bad3277200a83", "state_diff_commitment": "0x7f0ebcf7ac9c506f0899b71ad1411506f75e985b262407ec43df0ecd86ef413"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/mainnet/signature/147.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 147, "signature": ["0x38689be8c500a6f8a6671239e25d284e38253c6c130aaf1d4a6256bb26d4a33", "0x79041498b948eb9685c634cfe8c06818a29c137e1dead1806a01f50453b0f03"], "signature_input": {"block_hash": "0x77ca928108515f7a7770d27f37a5c1b86b84a7f74cc15bc47c2a2a320c712d4", "state_diff_commitment": "0x66cdac339a79f26faee32c28e7b74288af4b03694e76ccb7a80ad45f8d47d4c"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/mainnet/signature/16259.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 16259, "signature": ["0x24212d89a549c8b1b50bb789d144354ddcabf5c642d92a023dba11ed38263c9", "0x39bd1d7a660eeb001809a5b84750bdd23e4285a1d277cbcd60ab7d5d9aff20"], "signature_input": {"block_hash": "0x73679379c70f5780b819c6fde4e04f03ca1444ee1bf640130c9fe083dfa5a89", "state_diff_commitment": "0x17372410f80039157375e783601269630f74dc6d87685d249e5d5676726b2a8"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/mainnet/signature/16697.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 16697, "signature": ["0x2fb6fa73bf46ede7240e5034d8ce28ef63e90b3475f476d1ebb89bf3da04725", "0x46e54ef8121fb3a69989329cbe993602534ff27c7330a4d92bcfc697cac5678"], "signature_input": {"block_hash": "0x11fddaab08f9298937f850ec7c95d67a957824d1e5e5e7027eb0a40c0cff945", "state_diff_commitment": "0x5e153345ae9498cce79d3f3e7ef5be0675f3462a81689459e55bedc8bd74d28"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/mainnet/signature/16730.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 16730, "signature": ["0xd4a348476baa4535102ea28e15aac2c3659e953da6518d855b851b5ca56c6e", "0x15a3ca91c0ed4e63a325d723e9e652be213718fd59d36772c6c888c4164c292"], "signature_input": {"block_hash": "0x7ff6d26e7cf4726c50f21ea6d96fe27e2f5b02be0addc2e98e64c70823ba24", "state_diff_commitment": "0x2492f7ad8805795bfb3e70e7b903a96ea95163a8f2650efa84270fd8e583a0c"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/mainnet/signature/16789.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 16789, "signature": ["0x249a7681de534a50f6bd880a2539310c31d587710a38d80ab8dec691c3355a4", "0x38d96b041608e71d8f9e0d6b220a2d17b3949020807cd2cf29b06455bc55ee4"], "signature_input": {"block_hash": "0x157b9e756f15e002e63580dddb8c8e342b9336c6d69a8cd6dc8eb8a75644040", "state_diff_commitment": "0x40c833582b437c707cd8590627c1d11f3c3ce258bfe5969cf48ef3244e21f64"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/mainnet/signature/19199.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 19199, "signature": ["0xba322e5df3fbebb28f61395a8e8103d224a8dc60a17668d90a806fc12ce04b", "0x521f3894198aa13e668682279e58cb525ed4c0d80a58ec1ad1c11b8ea2701b8"], "signature_input": {"block_hash": "0x41811b69473f26503e0375806ee97d05951ccc7840e3d2bbe14ffb2522e5be1", "state_diff_commitment": "0x5b063f2921d0a3eb38e77d71d9dba14972f27f787df8056e06dca2242b6de1d"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/mainnet/signature/192.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 192, "signature": ["0x1374b515d5d20761621ad2aedf332c4770e4aa5a3127c10c047be4ef52b9850", "0x6cbb0db5bd61b7e6f71eb70a5b46cb475a462170c64dc0e6f65f23432e7ddce"], "signature_input": {"block_hash": "0x27d1e625a4293d2ed162eb2a1ad031cf71eaa2bab3a3d10fe9bddc51b877ccd", "state_diff_commitment": "0x2e9b3a7ee48814f4ec422938d2fe3a353053f18f24ca733c0be961ea9ce6825"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/mainnet/signature/2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 2, "signature": ["0x4009f6bce4d9c392b031dd335777dd4b425b3c1da9d82b9b2a4aec3b7b77fd4", "0x654baea62f7d9f90cdcb1623428b7f437eb45aa880c5c628c6ba77aa9370ee"], "signature_input": {"block_hash": "0x4e1f77f39545afe866ac151ac908bd1a347a2a8a7d58bef1276db4f06fdf2f6", "state_diff_commitment": "0x68e08eb5ae2790c1aeaeeef3c6fddebc27290d6415ef6b8e1e815f87afba5a7"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/mainnet/signature/2889.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 2889, "signature": ["0x187be32f0eea2c70d5f8662f45a42ae810f7af6a61677fb0af7d5f1728bff96", "0x2c8c943f016f512e8d9381492b91825b6b140bd8f0da213b61e281d3f3214a0"], "signature_input": {"block_hash": "0x3033991dfe0ccc508ef8096d63468252cc43d46eb5e1c35e22ae3cd35af95b9", "state_diff_commitment": "0x6cb6881bb8971191aa759a96db1b7e4633b1f5273fcce10ad731291823da832"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/mainnet/signature/7320.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 7320, "signature": ["0x1ced8776e5e2b93cfb654ca2f55d2a9adab042fef4fde7d0c9950489697f771", "0x3a5f26f2364657e4b884c98859b8a9d37f0970bccd27bc7fa5cc64f9f775e5"], "signature_input": {"block_hash": "0x63f909587f20f6c450fdbb3ae671572444e6b82e791f404fde563f16ec1b2a8", "state_diff_commitment": "0x1186626d19bd27471ea0856d49e265372a805c59fb1252fb1324a8480991171"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/mainnet/signature/8.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 8, "signature": ["0x298e55d51e83bd5bacfc52acbe9bdc2141b1a16ed7de6815a783b4ef321a924", "0x7d2b18ea0f9a10efe15b138a3ffe233022b31be80221b6283a31b36697f5403"], "signature_input": {"block_hash": "0x7644422a0e4974388bade973906fb2e87b5ff573f7198a788a6f9cbe68421ee", "state_diff_commitment": "0x22a28397b8ae53c368c5b1126fc28d2c89ec47ba9c6bd1953ea8d6d5f6ea71a"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/mainnet/signature/833.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 833, "signature": ["0x691baeb7520288db0c5a7acb5bf266e8155a6f7674cdd64d681945b6261f157", "0x348281df5a362403513b67e8ddf4d69c9f30a72cf9c475fc2e5603e7acd7493"], "signature_input": {"block_hash": "0x197cd4f24d30274f0674aec74b86e0405c13de06771cfa1ee472b0d2437db7c", "state_diff_commitment": "0x51979fc17bb5d0c59a0bcc38241fe537ca9337aab34940e9fdcd3c43dda2302"}}
1 change: 1 addition & 0 deletions clients/feeder/testdata/mainnet/signature/latest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"block_number": 237827, "signature": ["0x28fa75e535dad3aab8d562a8aad6cb9af969aadb4764e32e220ef19ef5ae259", "0x147ff919b0263ba9499b01a2cf229c2ee10e5b669af8f794da7379a577cdcbe"], "signature_input": {"block_hash": "0x58ca8f38428130f9c4a021c87a87e049ac4bbdaf5d61d5df132a895c6eed532", "state_diff_commitment": "0x4acd02a507e875d604b324f42b98e042b493074be5552ec08dbf81fd540338e"}}
2 changes: 2 additions & 0 deletions core/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ type Header struct {
EventsBloom *bloom.BloomFilter
// Amount of ETH charged per Gas spent
GasPrice *felt.Felt
// Sequencer signatures
Signatures [][]*felt.Felt
}

type Block struct {
Expand Down
Loading

0 comments on commit 807ca34

Please sign in to comment.