Skip to content

Commit

Permalink
Merge branch 'main' into CNS-1008-score-store-refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
oren-lava committed Dec 3, 2024
2 parents c1f5098 + e9cfc7d commit 8cf3da7
Show file tree
Hide file tree
Showing 59 changed files with 1,925 additions and 763 deletions.
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ endpoints:
- api-interface: tendermintrpc
chain-id: LAV1
network-address:
address: "127.0.0.1:2220"
address: "127.0.0.1:2224"
node-urls:
- url: ws://127.0.0.1:26657/websocket
- url: http://127.0.0.1:26657
- url: http://127.0.0.1:26657
addons:
- archive
- url: https://trustless-api.com
- url: http://127.0.0.1:4444
methods:
- block
- block_by_hash
Expand All @@ -18,7 +18,7 @@ endpoints:
- api-interface: grpc
chain-id: LAV1
network-address:
address: "127.0.0.1:2220"
address: "127.0.0.1:2224"
node-urls:
- url: 127.0.0.1:9090
- url: 127.0.0.1:9090
Expand All @@ -27,7 +27,7 @@ endpoints:
- api-interface: rest
chain-id: LAV1
network-address:
address: "127.0.0.1:2220"
address: "127.0.0.1:2224"
node-urls:
- url: http://127.0.0.1:1317
- url: http://127.0.0.1:1317
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"
4 changes: 2 additions & 2 deletions cookbook/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Lava has many specs and participants can add and modify specs using governance p
| reliability_threshold | Threshold for VRF to decide when to do a data reliability check (i.e. re-execute query with another provider). Currently set to `268435455` on all specs resulting in a `1/16` ratio.|
| data_reliability_enabled | True/False for data reliability on/off for this spec. |
| block_distance_for_finalized_data | Blockchains like Ethereum have probabilistic finality, this threshold sets what we expect to be a safe distance from the latest block (In eth it’s 7: i.e. any block bigger in distance than 7 from the latest block we consider final).|
| blocks_in_finalization_proof | Number of finalized blocks the provider keeps (from the chain he provides service for, not always Lava) for data reliability. |
| blocks_in_finalization_proof | Number of finalized blocks the provider keeps (from the chain he provides service for, not always Lava) for data reliability. Normally, this value should be: 1sec / average_block_time |
| average_block_time | Average block time on this blockchain, used for estimating time of future blocks. |
| allowed_block_lag_for_qos_sync | Lag used to calculate QoS for providers. this should be `(10000 (10 seconds) / average_block_time) AND bigger than 1`, beyond this distance the data is considered stale and irrelevant. |
| block_last_updated | The latest block in which the spec was updated. |
Expand Down Expand Up @@ -65,7 +65,7 @@ Lava has many specs and participants can add and modify specs using governance p
| deterministic| True/False. If an API is deterministic (executing the API twice in the same block will have the same result, which means different providers are supposed to get the same result), we can run data reliability checks on it. |
| local | True/False. Marks an API that is local to the node (like subscription APIs, which are not relevant to other nodes) |
| subscription | True/False. Marks a subscription API. Requires an active connection to a node to get data pushed from a provider. |
| stateful | Requires local storage on the provider’s node. |
| stateful | True for transaction APIs. |
| hanging_api | True/False. Marks an API that is dependent on a creation of a new block (so the API hangs until this happens). |

### How to propose a new spec?
Expand Down
20 changes: 20 additions & 0 deletions cookbook/projects/policy_all_chains_with_extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,26 @@ Policy:
extensions:
- "archive"
mixed: true
- chain_id: OSMOSIS
requirements:
- collection:
api_interface: "rest"
type: "GET"
extensions:
- "archive"
mixed: true
- collection:
api_interface: "grpc"
type: ""
extensions:
- "archive"
mixed: true
- collection:
api_interface: "tendermintrpc"
type: ""
extensions:
- "archive"
mixed: true
- chain_id: COSMOSHUB
requirements:
- collection:
Expand Down
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
Loading

0 comments on commit 8cf3da7

Please sign in to comment.