Skip to content

Commit

Permalink
PRT-Adding-gas-verifications-to-cosmos
Browse files Browse the repository at this point in the history
  • Loading branch information
ranlavanet committed Mar 11, 2024
1 parent e5de1ed commit c3551b4
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 2 deletions.
63 changes: 63 additions & 0 deletions cookbook/specs/spec_add_cosmossdk.json
Original file line number Diff line number Diff line change
Expand Up @@ -2035,6 +2035,21 @@
}
],
"verifications": [
{
"name": "minimum-gas-price",
"parse_directive": {
"function_template": "",
"function_tag": "VERIFICATION",
"result_parsing": {
"parser_arg": [
"minimumGasPrice",
"="
],
"parser_func": "PARSE_DICTIONARY"
},
"api_name": "/cosmos/base/node/v1beta1/config"
}
},
{
"name": "chain-id",
"parse_directive": {
Expand Down Expand Up @@ -3606,6 +3621,24 @@
},
"extra_compute_units": 0
},
{
"name": "cosmos.base.node.v1beta1.Service/Config",
"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": "cosmos.upgrade.v1beta1.Query/UpgradedConsensusState",
"block_parsing": {
Expand Down Expand Up @@ -3691,6 +3724,21 @@
}
],
"verifications": [
{
"name": "minimum-gas-price",
"parse_directive": {
"function_template": "",
"function_tag": "VERIFICATION",
"result_parsing": {
"parser_arg": [
"minimumGasPrice",
"="
],
"parser_func": "PARSE_DICTIONARY"
},
"api_name": "cosmos.base.node.v1beta1.Service.Config"
}
},
{
"name": "chain-id",
"parse_directive": {
Expand Down Expand Up @@ -4338,6 +4386,21 @@
}
],
"verifications": [
{
"name": "minimum-gas-price",
"parse_directive": {
"function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"abci_query\",\"params\":{\"path\":\"/cosmos.base.node.v1beta1.Service/Config\", \"height\":\"0\", \"data\":\"\",\"proof\":\"true\"},\"id\":1}",
"function_tag": "VERIFICATION",
"result_parsing": {
"parser_arg": [
"0",
"response",
"value"
],
"parser_func": "PARSE_CANONICAL"
}
}
},
{
"name": "chain-id",
"parse_directive": {
Expand Down
27 changes: 27 additions & 0 deletions cookbook/specs/spec_add_evmos.json
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,15 @@
"inheritance_apis": [],
"parse_directives": [],
"verifications": [
{
"name": "minimum-gas-price",
"values": [
{
"expected_value": "50000000000.000000000000000000aevmos",
"severity": "Warning"
}
]
},
{
"name": "chain-id",
"values": [
Expand Down Expand Up @@ -1698,6 +1707,15 @@
"inheritance_apis": [],
"parse_directives": [],
"verifications": [
{
"name": "minimum-gas-price",
"values": [
{
"expected_value": "50000000000.000000000000000000aevmos",
"severity": "Warning"
}
]
},
{
"name": "chain-id",
"values": [
Expand Down Expand Up @@ -1738,6 +1756,15 @@
"inheritance_apis": [],
"parse_directives": [],
"verifications": [
{
"name": "minimum-gas-price",
"values": [
{
"expected_value": "CiQ1MDAwMDAwMDAwMC4wMDAwMDAwMDAwMDAwMDAwMDBhZXZtb3M",
"severity": "Warning"
}
]
},
{
"name": "chain-id",
"values": [
Expand Down
3 changes: 1 addition & 2 deletions scripts/pre_setups/init_evmos_only_with_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ PROVIDER1_LISTENER="127.0.0.1:2220"

lavad tx subscription buy DefaultPlan $(lavad keys show user1 -a) -y --from user1 --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE
wait_next_block
lavad tx pairing stake-provider "EVMOS" $PROVIDERSTAKE "$PROVIDER1_LISTENER,1" 1 $(operator_address) -y --from servicer1 --provider-moniker "dummyMoniker" --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE

lavad tx pairing stake-provider "EVMOS" $PROVIDERSTAKE "$PROVIDER1_LISTENER,1" 1 $(operator_address) -y --from servicer1 --delegate-limit $PROVIDERSTAKE --provider-moniker "dummyMoniker" --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE
# lavad tx project set-policy $(lavad keys show user1 -a)-admin ./cookbook/projects/policy_all_chains_with_addon.yml -y --from user1 --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE
sleep_until_next_epoch

Expand Down

0 comments on commit c3551b4

Please sign in to comment.