Skip to content

Commit

Permalink
Merge branch 'CNS-polygon-spec-update' of github.com:lavanet/lava int…
Browse files Browse the repository at this point in the history
…o CNS-polygon-spec-update
  • Loading branch information
Yarom Swisa authored and Yarom Swisa committed Dec 1, 2024
2 parents e044f64 + 7815900 commit 5ca78eb
Show file tree
Hide file tree
Showing 52 changed files with 1,554 additions and 317 deletions.
10 changes: 9 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ linters:
- whitespace

issues:
exclude-files:
- "protocol/chainlib/chainproxy/rpcInterfaceMessages/grpcMessage.go"
- "protocol/chainlib/grpc.go"
- "protocol/chainlib/grpcproxy/dyncodec/remote_grpc_reflection.go"
- "protocol/chainlib/grpcproxy/dyncodec/remote_relayer.go"
- "protocol/chainlib/grpcproxy/dyncodec/remotes_test.go"
- "ecosystem/lavajs/*"
- "ecosystem/lava-sdk/*"
exclude-rules:
- text: "singleCaseSwitch"
linters:
Expand All @@ -56,7 +64,7 @@ issues:
- text: "ST1016:"
linters:
- stylecheck
- text: "SA1019:.*\"github.com/golang/protobuf/proto\" is deprecated.*" # proto is deprecated, but some places couldn't be removed
- text: 'SA1019:.*"github.com/golang/protobuf/proto" is deprecated.*' # proto is deprecated, but some places couldn't be removed
linters:
- staticcheck
- path: "migrations"
Expand Down
3 changes: 2 additions & 1 deletion config/provider_examples/avalanch_internal_paths_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
endpoints:
- api-interface: jsonrpc
chain-id: AVAX
network-address: 127.0.0.1:2221
network-address:
address: 127.0.0.1:2221
node-urls:
- url: ws://127.0.0.1:3333/C/rpc/ws
internal-path: "/C/rpc" # c chain like specified in the spec
Expand Down
8 changes: 6 additions & 2 deletions config/provider_examples/strk_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@ endpoints:
address: "127.0.0.1:2220"
node-urls:
- url: <wss url here>/ws
internal-path: ""
internal-path: "/ws"
- url: <wss url here>/ws/rpc/v0_6
internal-path: "/rpc/v0_6"
internal-path: "/ws/rpc/v0_6"
- url: <wss url here>/ws/rpc/v0_7
internal-path: "/ws/rpc/v0_7"

- url: <https url here>
internal-path: ""
- url: <https url here>/rpc/v0_5
internal-path: "/rpc/v0_5"
- url: <https url here>/rpc/v0_6
internal-path: "/rpc/v0_6"
- url: <https url here>/rpc/v0_7
internal-path: "/rpc/v0_7"
12 changes: 6 additions & 6 deletions cookbook/specs/avalanche.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
"data_reliability_enabled": true,
"block_distance_for_finalized_data": 4,
"blocks_in_finalization_proof": 3,
"average_block_time": 2500,
"allowed_block_lag_for_qos_sync": 4,
"average_block_time": 2000,
"allowed_block_lag_for_qos_sync": 5,
"imports": [
"ETH1"
],
"shares": 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "47500000000"
"amount": "50000000"
},
"api_collections": [
{
Expand Down Expand Up @@ -735,12 +735,12 @@
"data_reliability_enabled": true,
"block_distance_for_finalized_data": 4,
"blocks_in_finalization_proof": 3,
"average_block_time": 2500,
"allowed_block_lag_for_qos_sync": 4,
"average_block_time": 2000,
"allowed_block_lag_for_qos_sync": 5,
"shares": 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "47500000000"
"amount": "50000000"
},
"api_collections": [
{
Expand Down
54 changes: 54 additions & 0 deletions cookbook/specs/celestia.json
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,15 @@
"inheritance_apis": [],
"parse_directives": [],
"verifications": [
{
"name": "minimum-gas-price",
"values": [
{
"expected_value": "0.002000000000000000utia",
"severity": "Warning"
}
]
},
{
"name": "chain-id",
"values": [
Expand Down Expand Up @@ -711,6 +720,15 @@
"inheritance_apis": [],
"parse_directives": [],
"verifications": [
{
"name": "minimum-gas-price",
"values": [
{
"expected_value": "0.002000000000000000utia",
"severity": "Warning"
}
]
},
{
"name": "chain-id",
"values": [
Expand Down Expand Up @@ -1479,6 +1497,15 @@
"inheritance_apis": [],
"parse_directives": [],
"verifications": [
{
"name": "minimum-gas-price",
"values": [
{
"expected_value": "0.002000000000000000utia",
"severity": "Warning"
}
]
},
{
"name": "chain-id",
"values": [
Expand All @@ -1502,6 +1529,15 @@
"inheritance_apis": [],
"parse_directives": [],
"verifications": [
{
"name": "minimum-gas-price",
"values": [
{
"expected_value": "0.002000000000000000utia",
"severity": "Warning"
}
]
},
{
"name": "chain-id",
"values": [
Expand Down Expand Up @@ -1593,6 +1629,15 @@
"inheritance_apis": [],
"parse_directives": [],
"verifications": [
{
"name": "minimum-gas-price",
"values": [
{
"expected_value": "0.002000000000000000utia",
"severity": "Warning"
}
]
},
{
"name": "chain-id",
"values": [
Expand All @@ -1616,6 +1661,15 @@
"inheritance_apis": [],
"parse_directives": [],
"verifications": [
{
"name": "minimum-gas-price",
"values": [
{
"expected_value": "0.002000000000000000utia",
"severity": "Warning"
}
]
},
{
"name": "chain-id",
"values": [
Expand Down
20 changes: 16 additions & 4 deletions cookbook/specs/celo.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"shares": 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "47500000000"
"amount": "5000000000"
},
"api_collections": [
{
Expand Down Expand Up @@ -79,12 +79,12 @@
"data_reliability_enabled": true,
"block_distance_for_finalized_data": 1,
"blocks_in_finalization_proof": 3,
"average_block_time": 5000,
"allowed_block_lag_for_qos_sync": 2,
"average_block_time": 1000,
"allowed_block_lag_for_qos_sync": 10,
"shares": 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "47500000000"
"amount": "5000000000"
},
"api_collections": [
{
Expand All @@ -107,6 +107,18 @@
"expected_value": "0xaef3"
}
]
},
{
"name": "pruning",
"values": [
{
"latest_distance": 86400
},
{
"extension": "archive",
"expected_value": "0x0"
}
]
}
]
}
Expand Down
50 changes: 48 additions & 2 deletions cookbook/specs/near.json
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,17 @@
"hanging_api": true
},
"extra_compute_units": 0,
"timeout_ms": 10000
"timeout_ms": 10000,
"parsers": [
{
"parse_path": ".params.tx_hash",
"parse_type": "BLOCK_HASH"
},
{
"parse_path": ".params.[0]",
"parse_type": "BLOCK_HASH"
}
]
},
{
"name": "EXPERIMENTAL_tx_status",
Expand All @@ -357,7 +367,17 @@
"subscription": false,
"stateful": 0
},
"extra_compute_units": 0
"extra_compute_units": 0,
"parsers": [
{
"parse_path": ".params.tx_hash",
"parse_type": "BLOCK_HASH"
},
{
"parse_path": ".params.[0]",
"parse_type": "BLOCK_HASH"
}
]
},
{
"name": "EXPERIMENTAL_receipt",
Expand Down Expand Up @@ -430,6 +450,32 @@
}
],
"verifications": [
{
"name": "tracking-shards",
"parse_directive": {
"function_template": "{\"jsonrpc\":\"2.0\",\"id\":\"dontcare\",\"method\":\"query\",\"params\":{\"request_type\":\"view_account\",\"finality\":\"final\",\"account_id\":\"floor.is.lava\"}}",
"function_tag": "VERIFICATION",
"parsers": [
{
"parse_path": ".error.cause.name",
"value": "UNKNOWN_ACCOUNT",
"parse_type": "RESULT"
},
{
"parse_path": ".result.amount",
"value": "*",
"parse_type": "RESULT"
}
],
"api_name": "query"
},
"values": [
{
"expected_value": "*",
"severity": "Warning"
}
]
},
{
"name": "chain-id",
"parse_directive": {
Expand Down
27 changes: 19 additions & 8 deletions cookbook/specs/starknet.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
"data_reliability_enabled": true,
"block_distance_for_finalized_data": 6,
"blocks_in_finalization_proof": 3,
"average_block_time": 12000,
"average_block_time": 30000,
"allowed_block_lag_for_qos_sync": 2,
"shares": 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "47500000000"
"amount": "5000000000"
},
"api_collections": [
{
Expand All @@ -36,7 +36,7 @@
],
"parser_func": "DEFAULT"
},
"compute_units": 10,
"compute_units": 20,
"enabled": true,
"category": {
"deterministic": true,
Expand Down Expand Up @@ -93,7 +93,7 @@
],
"parser_func": "DEFAULT"
},
"compute_units": 10,
"compute_units": 20,
"enabled": true,
"category": {
"deterministic": true,
Expand Down Expand Up @@ -156,7 +156,7 @@
"parser_func": "PARSE_DICTIONARY_OR_ORDERED",
"default_value": "latest"
},
"compute_units": 10,
"compute_units": 20,
"enabled": true,
"category": {
"deterministic": true,
Expand Down Expand Up @@ -445,7 +445,7 @@
],
"parser_func": "DEFAULT"
},
"compute_units": 10,
"compute_units": 20,
"enabled": true,
"category": {
"deterministic": false,
Expand Down Expand Up @@ -598,6 +598,17 @@
"expected_value": "*"
}
]
},
{
"name": "pruning",
"parse_directive": {
"function_tag": "GET_BLOCK_BY_NUM"
},
"values": [
{
"expected_value": "1"
}
]
}
]
},
Expand Down Expand Up @@ -969,11 +980,11 @@
"data_reliability_enabled": true,
"block_distance_for_finalized_data": 1,
"blocks_in_finalization_proof": 3,
"average_block_time": 1800000,
"average_block_time": 32000,
"allowed_block_lag_for_qos_sync": 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "47500000000"
"amount": "5000000000"
},
"api_collections": [
{
Expand Down
2 changes: 1 addition & 1 deletion ecosystem/lavajs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lavanet/lavajs",
"version": "2.1.3",
"version": "3.2.0",
"description": "lavajs",
"author": "Lava Network",
"homepage": "https://github.com/lavanet/lava/tree/main/ecosystem/lavajs#readme",
Expand Down
Loading

0 comments on commit 5ca78eb

Please sign in to comment.