Skip to content

Commit

Permalink
Merge branch 'main' into rianhughes/sequencer
Browse files Browse the repository at this point in the history
  • Loading branch information
rianhughes authored May 13, 2024
2 parents 5fe15df + 576d342 commit 38a80b4
Show file tree
Hide file tree
Showing 36 changed files with 39,455 additions and 213 deletions.
10 changes: 5 additions & 5 deletions adapters/sn2core/sn2core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,13 @@ func TestStateUpdate(t *testing.T) {

func TestClassV0(t *testing.T) {
classHashes := []string{
"0x79e2d211e70594e687f9f788f71302e6eecb61d98efce48fbe8514948c8118",
"0x1924aa4b0bedfd884ea749c7231bafd91650725d44c91664467ffce9bf478d0",
"0x10455c752b86932ce552f2b0fe81a880746649b9aee7e0d842bf3f52378f9f8",
"0x56b96c1d1bbfa01af44b465763d1b71150fa00c6c9d54c3947f57e979ff68c3",
"0x7db5c2c2676c2a5bfc892ee4f596b49514e3056a0eee8ad125870b4fb1dd909",
"0x772164c9d6179a89e7f1167f099219f47d752304b16ed01f081b6e0b45c93c3",
"0x78401746828463e2c3f92ebb261fc82f7d4d4c8d9a80a356c44580dab124cb0",
"0x28d1671fb74ecb54d848d463cefccffaef6df3ae40db52130e19fe8299a7b43",
}

client := feeder.NewTestClient(t, &utils.Goerli)
client := feeder.NewTestClient(t, &utils.Sepolia)
ctx := context.Background()

for _, hashString := range classHashes {
Expand Down
4 changes: 2 additions & 2 deletions blockchain/blockchain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func TestHeight(t *testing.T) {
client := feeder.NewTestClient(t, &utils.Mainnet)
gw := adaptfeeder.New(client)
t.Run("return nil if blockchain is empty", func(t *testing.T) {
chain := blockchain.New(pebble.NewMemTest(t), &utils.Goerli)
chain := blockchain.New(pebble.NewMemTest(t), &utils.Sepolia)
_, err := chain.Height()
assert.Error(t, err)
})
Expand All @@ -77,7 +77,7 @@ func TestHeight(t *testing.T) {
}

func TestBlockByNumberAndHash(t *testing.T) {
chain := blockchain.New(pebble.NewMemTest(t), &utils.Goerli)
chain := blockchain.New(pebble.NewMemTest(t), &utils.Sepolia)
t.Run("same block is returned for both GetBlockByNumber and GetBlockByHash", func(t *testing.T) {
client := feeder.NewTestClient(t, &utils.Mainnet)
gw := adaptfeeder.New(client)
Expand Down
10,060 changes: 10,060 additions & 0 deletions clients/feeder/testdata/sepolia-integration/block/16350.json

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions clients/feeder/testdata/sepolia-integration/signature/16350.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"block_number": 16350,
"signature": [
"0x10fe667903a11a659d5cf95ab3ca441ef6888833b4e2036d0c6761e6498faf4",
"0x334061004caf8145136479b44112611fe9c90b3251189094c6e453d29bd6973"
],
"signature_input": {
"block_hash": "0x660be3d095f36ffebf314c8bdea6823ba5e1f02fec2db61c84eb6faa859195",
"state_diff_commitment": "0x62c1b2056ff46e764b1103523ac104c0b9377593a4458e574b73133d00221e5"
}
}
309 changes: 309 additions & 0 deletions clients/feeder/testdata/sepolia/block/0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,309 @@
{
"block_hash": "0x5c627d4aeb51280058bed93c7889bce78114d63baad1be0f0aeb32496d5f19c",
"parent_block_hash": "0x0",
"block_number": 0,
"state_root": "0xe005205a1327f3dff98074e528f7b96f30e0624a1dfcf571bdc81948d150a0",
"transaction_commitment": "0x6bc49c465936fa8b19a6773975bef3c1f9793463103ce679d5a2c10b0c3846e",
"event_commitment": "0x63e31e9955086a982d5d1b008c0a1579521d526fcf38445a8daf4799bde362e",
"status": "ACCEPTED_ON_L1",
"l1_da_mode": "CALLDATA",
"l1_gas_price": {
"price_in_wei": "0x3e617dc5",
"price_in_fri": "0x0"
},
"l1_data_gas_price": {
"price_in_wei": "0x1",
"price_in_fri": "0x1"
},
"transactions": [
{
"transaction_hash": "0x656e113cb27707d2147c271a79c51d1069b0273ae447b965e15154a17b3ec01",
"version": "0x0",
"max_fee": "0x0",
"signature": [],
"nonce": "0x0",
"class_hash": "0x5c478ee27f2112411f86f207605b2e2c58cdb647bac0df27f660ef2252359c6",
"sender_address": "0x1",
"type": "DECLARE"
},
{
"transaction_hash": "0x32538718071ad83ccd09fca03fe3a17add776ec12002d1c4e16ad4b92ddf752",
"version": "0x0",
"max_fee": "0x0",
"signature": [],
"nonce": "0x0",
"class_hash": "0xd0e183745e9dae3e4e78a8ffedcce0903fc4900beace4e0abf192d4c202da3",
"sender_address": "0x1",
"type": "DECLARE"
},
{
"transaction_hash": "0x144f41e654d0916810a83df0fe8984043671200f28df1206f58566144e302dd",
"version": "0x1",
"max_fee": "0x0",
"signature": [
"0x13f82fd9238dfc8d01543f89be2b5d5589b3eb93d9c3b888f1f94b089768771",
"0x2c279ec310c4dd58a296fab66b2624640780e79a1c5c87388e6150fb5384a9d"
],
"nonce": "0x0",
"contract_address": "0x43abaa073c768ebf039c0c4f46db9acc39e9ec165690418060a652aab39e7d8",
"contract_address_salt": "0x0",
"class_hash": "0x5c478ee27f2112411f86f207605b2e2c58cdb647bac0df27f660ef2252359c6",
"constructor_calldata": [
"0x12c4df40394d06f157edec8d0e64db61fe0c271149ea860c8fe98def29ecf02"
],
"type": "DEPLOY_ACCOUNT"
},
{
"transaction_hash": "0x6a5a493cf33919e58aa4c75777bffdef97c0e39cac968896d7bee8cc67905a1",
"version": "0x1",
"max_fee": "0x0",
"signature": [
"0x357dbb6c509a7d4b58f8ee7151236278b7959b39f7d05b8f7e2ef20593bdf7e",
"0x64d5f748eef19ca7f1c8cc533e5c9c85f80ef4f040c75da67bda82f5c58328d"
],
"nonce": "0x1",
"sender_address": "0x43abaa073c768ebf039c0c4f46db9acc39e9ec165690418060a652aab39e7d8",
"calldata": [
"0x1",
"0x43abaa073c768ebf039c0c4f46db9acc39e9ec165690418060a652aab39e7d8",
"0x2730079d734ee55315f4f141eaed376bddd8c2133523d223a344c5604e0f7f8",
"0x0",
"0x5",
"0x5",
"0xd0e183745e9dae3e4e78a8ffedcce0903fc4900beace4e0abf192d4c202da3",
"0x322c2610264639f6b2cee681ac53fa65c37e187ea24292d1b21d859c55e1a78",
"0x1",
"0x0",
"0x1"
],
"type": "INVOKE_FUNCTION"
},
{
"transaction_hash": "0x4a5a3a951244f37c97b258465db17ba235dc68fd369c539d763bae99b2cae1",
"version": "0x1",
"max_fee": "0x0",
"signature": [
"0x6b5baf01bf27386f1544efcf2e91aa69a42a41a9781e24b3cd984a91e815de7",
"0x2de46894d2f386d25f2258e80f464e05f08daab78df764d87c4381a7eae6c97"
],
"nonce": "0x2",
"sender_address": "0x43abaa073c768ebf039c0c4f46db9acc39e9ec165690418060a652aab39e7d8",
"calldata": [
"0x1",
"0x43abaa073c768ebf039c0c4f46db9acc39e9ec165690418060a652aab39e7d8",
"0x2730079d734ee55315f4f141eaed376bddd8c2133523d223a344c5604e0f7f8",
"0x0",
"0x5",
"0x5",
"0xd0e183745e9dae3e4e78a8ffedcce0903fc4900beace4e0abf192d4c202da3",
"0x322c2610264639f6b2cee681ac53fa65c37e187ea24292d1b21d859c55e1a78",
"0x1",
"0x0",
"0x0"
],
"type": "INVOKE_FUNCTION"
},
{
"transaction_hash": "0x1bec64a9f5ff52154b560fd489ae2aabbfcb31062f7ea70c3c674ddf14b0add",
"version": "0x1",
"max_fee": "0x0",
"signature": [
"0x44580ba3cd68e5d9509d2fcb8bd09933ae4a7b7dfe6744eaa2329f9a79d7408",
"0x68404a4da22c31d8367f873c043318750a24c669702c72de8518a3d52284b94"
],
"nonce": "0x3",
"sender_address": "0x43abaa073c768ebf039c0c4f46db9acc39e9ec165690418060a652aab39e7d8",
"calldata": [
"0x1",
"0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
"0x195d4289b867c3d98c335ea31402667f3592e227faf3d2991308563ed102aab",
"0x0",
"0x0",
"0x0"
],
"type": "INVOKE_FUNCTION"
},
{
"transaction_hash": "0x72b2d3b79b3da51efe860da954a2f50d23da95f028a456c5356a08e61642754",
"version": "0x1",
"max_fee": "0x0",
"signature": [
"0x12ef79a31ed2ff357b290f40c8c1bbe53cbb253866f0dc52b25aabbfb443c2b",
"0x376b2ddfd1ba9c6a0d72e3e4dbc5bbb1f0d2601089999cbf477aed944ae5c03"
],
"nonce": "0x4",
"sender_address": "0x43abaa073c768ebf039c0c4f46db9acc39e9ec165690418060a652aab39e7d8",
"calldata": [
"0x1",
"0x4c5772d1914fe6ce891b64eb35bf3522aeae1315647314aac58b01137607f3f",
"0x195d4289b867c3d98c335ea31402667f3592e227faf3d2991308563ed102aab",
"0x0",
"0x0",
"0x0"
],
"type": "INVOKE_FUNCTION"
}
],
"timestamp": 1700406220,
"sequencer_address": "0x1176a1bd84444c89232ec27754698e5d2e7e1a7f1539f12027f28b23ec9f3d8",
"transaction_receipts": [
{
"execution_status": "SUCCEEDED",
"transaction_index": 0,
"transaction_hash": "0x656e113cb27707d2147c271a79c51d1069b0273ae447b965e15154a17b3ec01",
"l2_to_l1_messages": [],
"events": [],
"execution_resources": {
"n_steps": 2711,
"builtin_instance_counter": {
"pedersen_builtin": 15,
"range_check_builtin": 63
},
"n_memory_holes": 0
},
"actual_fee": "0x0"
},
{
"execution_status": "SUCCEEDED",
"transaction_index": 1,
"transaction_hash": "0x32538718071ad83ccd09fca03fe3a17add776ec12002d1c4e16ad4b92ddf752",
"l2_to_l1_messages": [],
"events": [],
"execution_resources": {
"n_steps": 2711,
"builtin_instance_counter": {
"pedersen_builtin": 15,
"range_check_builtin": 63
},
"n_memory_holes": 0
},
"actual_fee": "0x0"
},
{
"execution_status": "SUCCEEDED",
"transaction_index": 2,
"transaction_hash": "0x144f41e654d0916810a83df0fe8984043671200f28df1206f58566144e302dd",
"l2_to_l1_messages": [],
"events": [],
"execution_resources": {
"n_steps": 3863,
"builtin_instance_counter": {
"pedersen_builtin": 23,
"range_check_builtin": 83,
"ecdsa_builtin": 1
},
"n_memory_holes": 0
},
"actual_fee": "0x0"
},
{
"execution_status": "SUCCEEDED",
"transaction_index": 3,
"transaction_hash": "0x6a5a493cf33919e58aa4c75777bffdef97c0e39cac968896d7bee8cc67905a1",
"l2_to_l1_messages": [],
"events": [],
"execution_resources": {
"n_steps": 5617,
"builtin_instance_counter": {
"pedersen_builtin": 23,
"ecdsa_builtin": 1,
"range_check_builtin": 122
},
"n_memory_holes": 0
},
"actual_fee": "0x0"
},
{
"execution_status": "SUCCEEDED",
"transaction_index": 4,
"transaction_hash": "0x4a5a3a951244f37c97b258465db17ba235dc68fd369c539d763bae99b2cae1",
"l2_to_l1_messages": [],
"events": [],
"execution_resources": {
"n_steps": 5617,
"builtin_instance_counter": {
"pedersen_builtin": 23,
"range_check_builtin": 122,
"ecdsa_builtin": 1
},
"n_memory_holes": 0
},
"actual_fee": "0x0"
},
{
"execution_status": "SUCCEEDED",
"transaction_index": 5,
"transaction_hash": "0x1bec64a9f5ff52154b560fd489ae2aabbfcb31062f7ea70c3c674ddf14b0add",
"l2_to_l1_messages": [],
"events": [
{
"from_address": "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
"keys": [
"0x3774b0545aabb37c45c1eddc6a7dae57de498aae6d5e3589e362d4b4323a533"
],
"data": [
"0x43abaa073c768ebf039c0c4f46db9acc39e9ec165690418060a652aab39e7d8",
"0x43abaa073c768ebf039c0c4f46db9acc39e9ec165690418060a652aab39e7d8"
]
},
{
"from_address": "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
"keys": [
"0x4595132f9b33b7077ebf2e7f3eb746a8e0a6d5c337c71cd8f9bf46cac3cfd7"
],
"data": [
"0x43abaa073c768ebf039c0c4f46db9acc39e9ec165690418060a652aab39e7d8"
]
}
],
"execution_resources": {
"n_steps": 4854,
"builtin_instance_counter": {
"ecdsa_builtin": 1,
"range_check_builtin": 106,
"pedersen_builtin": 17
},
"n_memory_holes": 0
},
"actual_fee": "0x0"
},
{
"execution_status": "SUCCEEDED",
"transaction_index": 6,
"transaction_hash": "0x72b2d3b79b3da51efe860da954a2f50d23da95f028a456c5356a08e61642754",
"l2_to_l1_messages": [],
"events": [
{
"from_address": "0x4c5772d1914fe6ce891b64eb35bf3522aeae1315647314aac58b01137607f3f",
"keys": [
"0x3774b0545aabb37c45c1eddc6a7dae57de498aae6d5e3589e362d4b4323a533"
],
"data": [
"0x43abaa073c768ebf039c0c4f46db9acc39e9ec165690418060a652aab39e7d8",
"0x43abaa073c768ebf039c0c4f46db9acc39e9ec165690418060a652aab39e7d8"
]
},
{
"from_address": "0x4c5772d1914fe6ce891b64eb35bf3522aeae1315647314aac58b01137607f3f",
"keys": [
"0x4595132f9b33b7077ebf2e7f3eb746a8e0a6d5c337c71cd8f9bf46cac3cfd7"
],
"data": [
"0x43abaa073c768ebf039c0c4f46db9acc39e9ec165690418060a652aab39e7d8"
]
}
],
"execution_resources": {
"n_steps": 4854,
"builtin_instance_counter": {
"ecdsa_builtin": 1,
"pedersen_builtin": 17,
"range_check_builtin": 106
},
"n_memory_holes": 0
},
"actual_fee": "0x0"
}
],
"starknet_version": "0.12.3"
}
Loading

0 comments on commit 38a80b4

Please sign in to comment.