From c84cfd3c31ff58384714e7e5c3b253e979bc5169 Mon Sep 17 00:00:00 2001 From: Yarom Swisa Date: Sun, 1 Dec 2024 15:48:11 +0200 Subject: [PATCH 1/7] add polygon spec --- mainnet-1/specs/polygon.json | 407 +++++++++++++++++++++++++++++++++++ 1 file changed, 407 insertions(+) create mode 100644 mainnet-1/specs/polygon.json diff --git a/mainnet-1/specs/polygon.json b/mainnet-1/specs/polygon.json new file mode 100644 index 0000000000..d168bb09b5 --- /dev/null +++ b/mainnet-1/specs/polygon.json @@ -0,0 +1,407 @@ +{ + "proposal": { + "title": "Add Specs: Polygon", + "description": "Adding new specification support for relaying Polygon data on Lava", + "specs": [ + { + "index": "POLYGON", + "name": "polygon mainnet", + "enabled": true, + "imports": [ + "ETH1" + ], + "reliability_threshold": 268435455, + "data_reliability_enabled": true, + "block_distance_for_finalized_data": 1, + "blocks_in_finalization_proof": 3, + "average_block_time": 2000, + "allowed_block_lag_for_qos_sync": 5, + "shares": 1, + "min_stake_provider": { + "denom": "ulava", + "amount": "5000000000" + }, + "api_collections": [ + { + "enabled": true, + "collection_data": { + "api_interface": "jsonrpc", + "internal_path": "", + "type": "POST", + "add_on": "" + }, + "apis": [ + { + "name": "bor_getAuthor", + "block_parsing": { + "parser_arg": [ + "0" + ], + "parser_func": "PARSE_BY_ARG" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "bor_getCurrentProposer", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "bor_getCurrentValidators", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "bor_getRootHash", + "block_parsing": { + "parser_arg": [ + "1" + ], + "parser_func": "PARSE_BY_ARG" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "bor_getSignersAtHash", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "qn_getBlockWithReceipts", + "block_parsing": { + "parser_arg": [ + "0" + ], + "parser_func": "PARSE_BY_ARG" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "qn_getReceipts", + "block_parsing": { + "parser_arg": [ + "0" + ], + "parser_func": "PARSE_BY_ARG" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "txpool_content", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 5000, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "txpool_inspect", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "txpool_status", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "erigon_blockNumber", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "erigon_forks", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "erigon_getBlockByTimestamp", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "erigon_getBlockReceiptsByBlockHash", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "erigon_getHeaderByHash", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "erigon_getHeaderByNumber", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + } + ], + "headers": [], + "inheritance_apis": [], + "parse_directives": [], + "verifications": [ + { + "name": "chain-id", + "values": [ + { + "expected_value": "0x89" + } + ] + }, + { + "name": "pruning", + "values": [ + { + "latest_distance": 43200 + }, + { + "extension": "archive", + "expected_value": "0x0" + } + ] + } + ], + "extensions": [ + { + "name": "archive", + "cu_multiplier": 5, + "rule": { + "block": 42600 + } + } + ] + } + ] + }, + { + "index": "POLYGONA", + "name": "polygon amoy testnet", + "enabled": true, + "imports": [ + "POLYGON" + ], + "reliability_threshold": 268435455, + "data_reliability_enabled": true, + "block_distance_for_finalized_data": 1, + "blocks_in_finalization_proof": 3, + "average_block_time": 2000, + "allowed_block_lag_for_qos_sync": 5, + "shares": 1, + "min_stake_provider": { + "denom": "ulava", + "amount": "5000000000" + }, + "api_collections": [ + { + "enabled": true, + "collection_data": { + "api_interface": "jsonrpc", + "internal_path": "", + "type": "POST", + "add_on": "" + }, + "apis": [], + "headers": [], + "inheritance_apis": [], + "parse_directives": [], + "verifications": [ + { + "name": "chain-id", + "values": [ + { + "expected_value": "0x13882" + } + ] + } + ] + } + ] + } + ] + }, + "deposit": "10000000ulava" +} \ No newline at end of file From c91c7856bac7f30c71b4d9f43e6c35d234dfc39f Mon Sep 17 00:00:00 2001 From: Yarom Swisa Date: Sun, 1 Dec 2024 15:49:37 +0200 Subject: [PATCH 2/7] add base spec --- mainnet-1/specs/base.json | 118 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 mainnet-1/specs/base.json diff --git a/mainnet-1/specs/base.json b/mainnet-1/specs/base.json new file mode 100644 index 0000000000..75afc60acd --- /dev/null +++ b/mainnet-1/specs/base.json @@ -0,0 +1,118 @@ +{ + "proposal": { + "title": "Add Specs: Base", + "description": "Adding new specification support for relaying Base data on Lava", + "specs": [ + { + "index": "BASE", + "name": "base mainnet", + "enabled": true, + "imports": [ + "ETH1" + ], + "reliability_threshold": 268435455, + "data_reliability_enabled": true, + "block_distance_for_finalized_data": 1, + "blocks_in_finalization_proof": 1, + "average_block_time": 2000, + "allowed_block_lag_for_qos_sync": 5, + "shares": 1, + "min_stake_provider": { + "denom": "ulava", + "amount": "5000000000" + }, + "api_collections": [ + { + "enabled": true, + "collection_data": { + "api_interface": "jsonrpc", + "internal_path": "", + "type": "POST", + "add_on": "" + }, + "apis": [], + "headers": [], + "inheritance_apis": [], + "parse_directives": [], + "verifications": [ + { + "name": "chain-id", + "values": [ + { + "expected_value": "0x2105" + } + ] + }, + { + "name": "pruning", + "values": [ + { + "latest_distance": 43200 + }, + { + "extension": "archive", + "expected_value": "0x0" + } + ] + } + ], + "extensions": [ + { + "name": "archive", + "cu_multiplier": 5, + "rule": { + "block": 42600 + } + } + ] + } + ] + }, + { + "index": "BASES", + "name": "base sepolia testnet", + "enabled": true, + "imports": [ + "BASE" + ], + "reliability_threshold": 268435455, + "data_reliability_enabled": true, + "block_distance_for_finalized_data": 1, + "blocks_in_finalization_proof": 1, + "average_block_time": 2000, + "allowed_block_lag_for_qos_sync": 5, + "shares": 1, + "min_stake_provider": { + "denom": "ulava", + "amount": "5000000000" + }, + "api_collections": [ + { + "enabled": true, + "collection_data": { + "api_interface": "jsonrpc", + "internal_path": "", + "type": "POST", + "add_on": "" + }, + "apis": [], + "headers": [], + "inheritance_apis": [], + "parse_directives": [], + "verifications": [ + { + "name": "chain-id", + "values": [ + { + "expected_value": "0x14a34" + } + ] + } + ] + } + ] + } + ] + }, + "deposit": "10000000ulava" +} \ No newline at end of file From 889122de312baea73571cb55f6b1201d3ba4f1c7 Mon Sep 17 00:00:00 2001 From: Yarom Swisa Date: Sun, 1 Dec 2024 15:51:00 +0200 Subject: [PATCH 3/7] add optimism spec --- mainnet-1/specs/optimism.json | 208 ++++++++++++++++++++++++++++++++++ 1 file changed, 208 insertions(+) create mode 100644 mainnet-1/specs/optimism.json diff --git a/mainnet-1/specs/optimism.json b/mainnet-1/specs/optimism.json new file mode 100644 index 0000000000..02b90c9f3e --- /dev/null +++ b/mainnet-1/specs/optimism.json @@ -0,0 +1,208 @@ +{ + "proposal": { + "title": "Add Specs: Optimism", + "description": "Adding new specification support for relaying Optimism data on Lava, slow lookup for latest block to reduce provider load", + "specs": [ + { + "index": "OPTM", + "name": "optimism mainnet", + "enabled": true, + "imports": [ + "ETH1" + ], + "reliability_threshold": 268435455, + "data_reliability_enabled": true, + "block_distance_for_finalized_data": 1, + "blocks_in_finalization_proof": 1, + "average_block_time": 2000, + "allowed_block_lag_for_qos_sync": 8, + "shares": 1, + "min_stake_provider": { + "denom": "ulava", + "amount": "5000000000" + }, + "api_collections": [ + { + "enabled": true, + "collection_data": { + "api_interface": "jsonrpc", + "internal_path": "", + "type": "POST", + "add_on": "" + }, + "apis": [ + { + "name": "eth_getAccounts", + "block_parsing": { + "parser_arg": [ + "" + ], + "parser_func": "EMPTY" + }, + "compute_units": 10, + "enabled": false, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "eth_getBlockRange", + "block_parsing": { + "parser_arg": [ + "1" + ], + "parser_func": "PARSE_BY_ARG" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "eth_sendTransaction", + "block_parsing": { + "parser_arg": [ + "" + ], + "parser_func": "EMPTY" + }, + "compute_units": 10, + "enabled": false, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "rollup_gasPrices", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "rollup_getInfo", + "block_parsing": { + "parser_arg": [ + "" + ], + "parser_func": "EMPTY" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + } + ], + "headers": [], + "inheritance_apis": [], + "parse_directives": [], + "verifications": [ + { + "name": "chain-id", + "values": [ + { + "expected_value": "0xa" + } + ] + }, + { + "name": "pruning", + "values": [ + { + "latest_distance": 43200 + }, + { + "extension": "archive", + "expected_value": "0x0" + } + ] + } + ], + "extensions": [ + { + "name": "archive", + "cu_multiplier": 5, + "rule": { + "block": 42600 + } + } + ] + } + ] + }, + { + "index": "OPTMS", + "name": "optimism sepolia testnet", + "enabled": true, + "imports": [ + "OPTM" + ], + "reliability_threshold": 268435455, + "data_reliability_enabled": true, + "block_distance_for_finalized_data": 1, + "blocks_in_finalization_proof": 1, + "average_block_time": 2000, + "allowed_block_lag_for_qos_sync": 8, + "min_stake_provider": { + "denom": "ulava", + "amount": "5000000000" + }, + "api_collections": [ + { + "enabled": true, + "collection_data": { + "api_interface": "jsonrpc", + "internal_path": "", + "type": "POST", + "add_on": "" + }, + "apis": [], + "headers": [], + "inheritance_apis": [], + "parse_directives": [], + "verifications": [ + { + "name": "chain-id", + "values": [ + { + "expected_value": "0xaa37dc" + } + ] + } + ] + } + ] + } + ] + }, + "deposit": "10000000ulava" +} \ No newline at end of file From 83a3843ac412db674ec29dd2a0d4f7c32a659ee4 Mon Sep 17 00:00:00 2001 From: Yaroms Date: Sun, 1 Dec 2024 17:45:37 +0200 Subject: [PATCH 4/7] add blast spec --- mainnet-1/specs/blast.json | 114 +++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 mainnet-1/specs/blast.json diff --git a/mainnet-1/specs/blast.json b/mainnet-1/specs/blast.json new file mode 100644 index 0000000000..721ad04d06 --- /dev/null +++ b/mainnet-1/specs/blast.json @@ -0,0 +1,114 @@ +{ + "proposal": { + "title": "Add Specs: Blast", + "description": "Adding new specification support for relaying data on Blast ", + "specs": [ + { + "index": "BLAST", + "name": "blast mainnet", + "enabled": true, + "imports": ["ETH1"], + "reliability_threshold": 268435455, + "data_reliability_enabled": true, + "block_distance_for_finalized_data": 6, + "blocks_in_finalization_proof": 2, + "average_block_time": 2000, + "allowed_block_lag_for_qos_sync": 15, + "shares": 1, + "min_stake_provider": { + "denom": "ulava", + "amount": "47500000000" + }, + "api_collections": [ + { + "enabled": true, + "collection_data": { + "api_interface": "jsonrpc", + "internal_path": "", + "type": "POST", + "add_on": "" + }, + "apis": [], + "headers": [], + "inheritance_apis": [], + "parse_directives": [], + "verifications": [ + { + "name": "chain-id", + "values": [ + { + "expected_value": "0x13e31" + } + ] + }, + { + "name": "pruning", + "values": [ + { + "latest_distance": 43200 + }, + { + "extension": "archive", + "expected_value": "0x0" + } + ] + } + ], + "extensions": [ + { + "name": "archive", + "cu_multiplier": 5, + "rule": { + "block": 43000 + } + } + ] + } + ] + }, + { + "index": "BLASTSP", + "name": "blast sepolia testnet", + "enabled": true, + "imports": ["BLAST"], + "reliability_threshold": 268435455, + "data_reliability_enabled": true, + "block_distance_for_finalized_data": 6, + "blocks_in_finalization_proof": 2, + "average_block_time": 2000, + "allowed_block_lag_for_qos_sync": 15, + "shares": 1, + "min_stake_provider": { + "denom": "ulava", + "amount": "47500000000" + }, + "api_collections": [ + { + "enabled": true, + "collection_data": { + "api_interface": "jsonrpc", + "internal_path": "", + "type": "POST", + "add_on": "" + }, + "apis": [], + "headers": [], + "inheritance_apis": [], + "parse_directives": [], + "verifications": [ + { + "name": "chain-id", + "values": [ + { + "expected_value": "0xa0c71fd" + } + ] + } + ] + } + ] + } + ] + }, + "deposit": "10000000ulava" +} From fdbe6dd9829816528ca76e433079d70d3fbddea7 Mon Sep 17 00:00:00 2001 From: Yaroms Date: Sun, 1 Dec 2024 17:46:11 +0200 Subject: [PATCH 5/7] change min_stake --- mainnet-1/specs/blast.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mainnet-1/specs/blast.json b/mainnet-1/specs/blast.json index 721ad04d06..1abef254a6 100644 --- a/mainnet-1/specs/blast.json +++ b/mainnet-1/specs/blast.json @@ -17,7 +17,7 @@ "shares": 1, "min_stake_provider": { "denom": "ulava", - "amount": "47500000000" + "amount": "5000000000" }, "api_collections": [ { From db6fe851ae1fc9ce061e673d5735e6d056dcc892 Mon Sep 17 00:00:00 2001 From: Yarom Swisa Date: Tue, 3 Dec 2024 11:06:02 +0200 Subject: [PATCH 6/7] fix pr --- mainnet-1/specs/blast.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mainnet-1/specs/blast.json b/mainnet-1/specs/blast.json index 1abef254a6..ae7e40b3a3 100644 --- a/mainnet-1/specs/blast.json +++ b/mainnet-1/specs/blast.json @@ -80,7 +80,7 @@ "shares": 1, "min_stake_provider": { "denom": "ulava", - "amount": "47500000000" + "amount": "5000000000" }, "api_collections": [ { From 954198e9d9dead03b62b928f00ade8ec494ddd2b Mon Sep 17 00:00:00 2001 From: Elad Gildnur Date: Tue, 3 Dec 2024 12:56:18 +0200 Subject: [PATCH 7/7] Add generic parser for tx hash --- mainnet-1/specs/tendermint.json | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/mainnet-1/specs/tendermint.json b/mainnet-1/specs/tendermint.json index e818b27c4b..2ebbfd0b1b 100644 --- a/mainnet-1/specs/tendermint.json +++ b/mainnet-1/specs/tendermint.json @@ -275,7 +275,13 @@ "subscription": false, "stateful": 0 }, - "extra_compute_units": 0 + "extra_compute_units": 0, + "parsers": [ + { + "parse_path": ".params.[0]", + "parse_type": "BLOCK_HASH" + } + ] }, { "name": "commit", @@ -479,7 +485,13 @@ "subscription": false, "stateful": 0 }, - "extra_compute_units": 0 + "extra_compute_units": 0, + "parsers": [ + { + "parse_path": ".params.[0]", + "parse_type": "BLOCK_HASH" + } + ] }, { "name": "tx_search",