Skip to content

Commit

Permalink
PRT-532 adjusting specs to QOS allowed 10 seconds delay for good scor…
Browse files Browse the repository at this point in the history
…e. (#375)

* adjusting specs to QOS allowed 10 seconds delay for good score.

* fixing specs and removing data reliability from tendermint until we have a fix in rpcprovider

* returning block to parsing

* adding a temporary parser function for tendermint.

* updating gomod

* fixing spec
  • Loading branch information
ranlavanet authored Mar 26, 2023
1 parent 910bfdf commit 7c7c0c8
Show file tree
Hide file tree
Showing 21 changed files with 231 additions and 245 deletions.
2 changes: 1 addition & 1 deletion cookbook/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Lava has many specs and participants can add and modify specs using governance p
| 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. |
| 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. As a rule of thumb, this should be `(1/average blocks time) * reasonable time`, beyond this distance the data is considered stale and irrelevant. |
| 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. |
| min_stake_provider | The minimum stake required by a provider to service the APIs specified in the spec. |
| min_stake_client | The minimum stake required by a consumer to get service for the APIs specified in the spec. |
Expand Down
2 changes: 1 addition & 1 deletion cookbook/spec_add_aptos.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"block_distance_for_finalized_data": 0,
"blocks_in_finalization_proof": 1,
"average_block_time": "100",
"allowed_block_lag_for_qos_sync": "2",
"allowed_block_lag_for_qos_sync": "100",
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
2 changes: 1 addition & 1 deletion cookbook/spec_add_canto.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"block_distance_for_finalized_data": 0,
"blocks_in_finalization_proof": 1,
"average_block_time": "6500",
"allowed_block_lag_for_qos_sync": "3",
"allowed_block_lag_for_qos_sync": "2",
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
4 changes: 2 additions & 2 deletions cookbook/spec_add_celo.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"block_distance_for_finalized_data": 1,
"blocks_in_finalization_proof": 3,
"average_block_time": "5000",
"allowed_block_lag_for_qos_sync": "5",
"allowed_block_lag_for_qos_sync": "2",
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand All @@ -33,7 +33,7 @@
"block_distance_for_finalized_data": 1,
"blocks_in_finalization_proof": 3,
"average_block_time": "5000",
"allowed_block_lag_for_qos_sync": "5",
"allowed_block_lag_for_qos_sync": "2",
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
4 changes: 2 additions & 2 deletions cookbook/spec_add_cosmoshub.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"block_distance_for_finalized_data": 0,
"blocks_in_finalization_proof": 1,
"average_block_time": "6500",
"allowed_block_lag_for_qos_sync": "10",
"allowed_block_lag_for_qos_sync": "2",
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand All @@ -38,7 +38,7 @@
"block_distance_for_finalized_data": 0,
"blocks_in_finalization_proof": 1,
"average_block_time": "6500",
"allowed_block_lag_for_qos_sync": "10",
"allowed_block_lag_for_qos_sync": "2",
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
70 changes: 41 additions & 29 deletions cookbook/spec_add_cosmossdk.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"block_distance_for_finalized_data": 0,
"blocks_in_finalization_proof": 1,
"average_block_time": "6500",
"allowed_block_lag_for_qos_sync": "10",
"allowed_block_lag_for_qos_sync": "2",
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down Expand Up @@ -2825,9 +2825,9 @@
"name": "abci_info",
"block_parsing": {
"parser_arg": [
"latest"
""
],
"parser_func": "DEFAULT"
"parser_func": "EMPTY"
},
"compute_units": "10",
"enabled": true,
Expand All @@ -2849,11 +2849,9 @@
"name": "abci_query",
"block_parsing": {
"parser_arg": [
"height",
"=",
"2"
""
],
"parser_func": "PARSE_DICTIONARY_OR_ORDERED"
"parser_func": "EMPTY"
},
"compute_units": "10",
"enabled": true,
Expand All @@ -2873,6 +2871,30 @@
},
{
"name": "block",
"block_parsing": {
"parser_arg": [
""
],
"parser_func": "EMPTY"
},
"compute_units": "10",
"enabled": true,
"api_interfaces": [
{
"category": {
"deterministic": true,
"local": false,
"subscription": false,
"stateful": 0
},
"interface": "tendermintrpc",
"type": "GET",
"extra_compute_units": "0"
}
]
},
{
"name": "blockParserMethod",
"block_parsing": {
"parser_arg": [
"height",
Expand Down Expand Up @@ -2913,9 +2935,9 @@
"name": "block_by_hash",
"block_parsing": {
"parser_arg": [
"latest"
""
],
"parser_func": "DEFAULT"
"parser_func": "EMPTY"
},
"compute_units": "10",
"enabled": true,
Expand All @@ -2937,11 +2959,9 @@
"name": "block_results",
"block_parsing": {
"parser_arg": [
"height",
"=",
"0"
""
],
"parser_func": "PARSE_DICTIONARY_OR_ORDERED"
"parser_func": "EMPTY"
},
"compute_units": "10",
"enabled": true,
Expand Down Expand Up @@ -2987,11 +3007,9 @@
"name": "blockchain",
"block_parsing": {
"parser_arg": [
"maxHeight",
"=",
"1"
""
],
"parser_func": "PARSE_DICTIONARY_OR_ORDERED"
"parser_func": "EMPTY"
},
"compute_units": "10",
"enabled": true,
Expand Down Expand Up @@ -3135,11 +3153,9 @@
"name": "commit",
"block_parsing": {
"parser_arg": [
"height",
"=",
"0"
""
],
"parser_func": "PARSE_DICTIONARY_OR_ORDERED"
"parser_func": "EMPTY"
},
"compute_units": "10",
"enabled": true,
Expand All @@ -3161,11 +3177,9 @@
"name": "consensus_params",
"block_parsing": {
"parser_arg": [
"height",
"=",
"0"
""
],
"parser_func": "PARSE_DICTIONARY_OR_ORDERED"
"parser_func": "EMPTY"
},
"compute_units": "10",
"enabled": true,
Expand Down Expand Up @@ -5446,11 +5460,9 @@
"name": "validators",
"block_parsing": {
"parser_arg": [
"height",
"=",
"0"
""
],
"parser_func": "PARSE_DICTIONARY_OR_ORDERED"
"parser_func": "EMPTY"
},
"compute_units": "10",
"enabled": true,
Expand Down
2 changes: 1 addition & 1 deletion cookbook/spec_add_cosmossdk_full.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"block_distance_for_finalized_data": 0,
"blocks_in_finalization_proof": 1,
"average_block_time": "6500",
"allowed_block_lag_for_qos_sync": "10",
"allowed_block_lag_for_qos_sync": "2",
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
2 changes: 1 addition & 1 deletion cookbook/spec_add_cosmoswasm.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"block_distance_for_finalized_data": 0,
"blocks_in_finalization_proof": 1,
"average_block_time": "6500",
"allowed_block_lag_for_qos_sync": "10",
"allowed_block_lag_for_qos_sync": "2",
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
4 changes: 2 additions & 2 deletions cookbook/spec_add_ethereum.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"block_distance_for_finalized_data": 64,
"blocks_in_finalization_proof": 3,
"average_block_time": "13000",
"allowed_block_lag_for_qos_sync": "5",
"allowed_block_lag_for_qos_sync": "2",
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down Expand Up @@ -1331,7 +1331,7 @@
"block_distance_for_finalized_data": 7,
"blocks_in_finalization_proof": 3,
"average_block_time": "13000",
"allowed_block_lag_for_qos_sync": "5",
"allowed_block_lag_for_qos_sync": "2",
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
4 changes: 2 additions & 2 deletions cookbook/spec_add_evmos.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"block_distance_for_finalized_data": 0,
"blocks_in_finalization_proof": 1,
"average_block_time": "6500",
"allowed_block_lag_for_qos_sync": "3",
"allowed_block_lag_for_qos_sync": "2",
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down Expand Up @@ -976,7 +976,7 @@
"block_distance_for_finalized_data": 0,
"blocks_in_finalization_proof": 1,
"average_block_time": "6500",
"allowed_block_lag_for_qos_sync": "3",
"allowed_block_lag_for_qos_sync": "2",
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
4 changes: 2 additions & 2 deletions cookbook/spec_add_fantom.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"block_distance_for_finalized_data": 0,
"blocks_in_finalization_proof": 1,
"average_block_time": "1500",
"allowed_block_lag_for_qos_sync": "5",
"allowed_block_lag_for_qos_sync": "7",
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down Expand Up @@ -1174,7 +1174,7 @@
"block_distance_for_finalized_data": 0,
"blocks_in_finalization_proof": 1,
"average_block_time": "1500",
"allowed_block_lag_for_qos_sync": "5",
"allowed_block_lag_for_qos_sync": "7",
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
2 changes: 1 addition & 1 deletion cookbook/spec_add_ibc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"block_distance_for_finalized_data": 0,
"blocks_in_finalization_proof": 1,
"average_block_time": "6500",
"allowed_block_lag_for_qos_sync": "10",
"allowed_block_lag_for_qos_sync": "2",
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
4 changes: 2 additions & 2 deletions cookbook/spec_add_optimism_fast_lookup.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"block_distance_for_finalized_data": 1,
"blocks_in_finalization_proof": 1,
"average_block_time": "250",
"allowed_block_lag_for_qos_sync": "10",
"allowed_block_lag_for_qos_sync": "40",
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down Expand Up @@ -159,7 +159,7 @@
"block_distance_for_finalized_data": 1,
"blocks_in_finalization_proof": 1,
"average_block_time": "250",
"allowed_block_lag_for_qos_sync": "10",
"allowed_block_lag_for_qos_sync": "40",
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
4 changes: 2 additions & 2 deletions cookbook/spec_add_osmosis.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"block_distance_for_finalized_data": 0,
"blocks_in_finalization_proof": 1,
"average_block_time": "6500",
"allowed_block_lag_for_qos_sync": "3",
"allowed_block_lag_for_qos_sync": "2",
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down Expand Up @@ -3423,7 +3423,7 @@
"block_distance_for_finalized_data": 0,
"blocks_in_finalization_proof": 1,
"average_block_time": "6500",
"allowed_block_lag_for_qos_sync": "3",
"allowed_block_lag_for_qos_sync": "2",
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
4 changes: 2 additions & 2 deletions cookbook/spec_add_polygon.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"block_distance_for_finalized_data": 1,
"blocks_in_finalization_proof": 3,
"average_block_time": "2000",
"allowed_block_lag_for_qos_sync": "30",
"allowed_block_lag_for_qos_sync": "5",
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down Expand Up @@ -279,7 +279,7 @@
"block_distance_for_finalized_data": 1,
"blocks_in_finalization_proof": 3,
"average_block_time": "2000",
"allowed_block_lag_for_qos_sync": "30",
"allowed_block_lag_for_qos_sync": "5",
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
4 changes: 2 additions & 2 deletions cookbook/spec_add_solana.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"block_distance_for_finalized_data": 31,
"blocks_in_finalization_proof": 10,
"average_block_time": "600",
"allowed_block_lag_for_qos_sync": "20",
"allowed_block_lag_for_qos_sync": "17",
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down Expand Up @@ -1543,7 +1543,7 @@
"block_distance_for_finalized_data": 31,
"blocks_in_finalization_proof": 10,
"average_block_time": "600",
"allowed_block_lag_for_qos_sync": "20",
"allowed_block_lag_for_qos_sync": "17",
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
4 changes: 2 additions & 2 deletions cookbook/spec_add_starknet.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"data_reliability_enabled": true,
"block_distance_for_finalized_data": 1,
"blocks_in_finalization_proof": 3,
"average_block_time": "1800000",
"allowed_block_lag_for_qos_sync": "1",
"average_block_time": "180000",
"allowed_block_lag_for_qos_sync": "2",
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
2 changes: 1 addition & 1 deletion cookbook/spec_add_sui.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"block_distance_for_finalized_data": 0,
"blocks_in_finalization_proof": 1,
"average_block_time": "1000",
"allowed_block_lag_for_qos_sync": "5",
"allowed_block_lag_for_qos_sync": "10",
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
Loading

0 comments on commit 7c7c0c8

Please sign in to comment.