diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4f5810d141..6cb7c483a5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,7 @@ name: Publish Lava Release on: push: tags: - - 'v[0-9]+.[0-9]+.[0-9]+' + - 'v[0-9]+.[0-9]+.[0-9]+(-[a-zA-Z0-9]+)?' workflow_dispatch: inputs: release_tag: diff --git a/cookbook/specs/solana.json b/cookbook/specs/solana.json index 74c727a894..e14203dd39 100644 --- a/cookbook/specs/solana.json +++ b/cookbook/specs/solana.json @@ -1196,6 +1196,27 @@ "expected_value": "*" } ] + }, + { + "name": "tokens-owner-indexed", + "parse_directive": { + "function_template": "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"getTokenAccountsByOwner\",\"params\":[\"4Qkev8aNZcqFNSRhQzwyLMFSsi94jHqE8WNVTJzTP99F\",{\"programId\":\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\"},{\"encoding\":\"jsonParsed\"}]}", + "function_tag": "VERIFICATION", + "result_parsing": { + "parser_arg": [ + "0", + "value" + ], + "parser_func": "PARSE_CANONICAL" + }, + "api_name": "getTokenAccountsByOwner" + }, + "values": [ + { + "expected_value": "*", + "severity": "Warning" + } + ] } ] } diff --git a/cookbook/specs/ton.json b/cookbook/specs/ton.json new file mode 100644 index 0000000000..33800d77f8 --- /dev/null +++ b/cookbook/specs/ton.json @@ -0,0 +1,538 @@ +{ + "proposal": { + "title": "Add Specs: Ton", + "description": "Adding new specification support for relaying Ton data on Lava", + "specs": [ + { + "index": "TON", + "name": "ton mainnet", + "enabled": true, + "reliability_threshold": 268435455, + "data_reliability_enabled": true, + "block_distance_for_finalized_data": 2, + "blocks_in_finalization_proof": 3, + "average_block_time": 4500, + "allowed_block_lag_for_qos_sync": 3, + "shares": 1, + "min_stake_provider": { + "denom": "ulava", + "amount": "47500000000" + }, + "api_collections": [ + { + "enabled": true, + "collection_data": { + "api_interface": "rest", + "internal_path": "", + "type": "GET", + "add_on": "" + }, + "apis": [ + { + "name": "/api/v3/masterchainInfo", + "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": "/api/v3/blocks", + "block_parsing": { + "parser_arg": [ + "0", + "seqno" + ], + "parser_func": "PARSE_CANONICAL" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0, + "parsers": [ + { + "parse_path": ".params.seqno", + "parse_type": "BLOCK_LATEST" + } + ] + }, + { + "name": "/api/v3/masterchainBlockShardState", + "block_parsing": { + "parser_arg": [ + "0", + "seqno" + ], + "parser_func": "PARSE_CANONICAL" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0, + "parsers": [ + { + "parse_path": ".params.seqno", + "parse_type": "BLOCK_LATEST" + } + ] + }, + { + "name": "/api/v3/addressBook", + "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": "/api/v3/masterchainBlockShards", + "block_parsing": { + "parser_arg": [ + "0", + "seqno" + ], + "parser_func": "PARSE_CANONICAL" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0, + "parsers": [ + { + "parse_path": ".params.seqno", + "parse_type": "BLOCK_LATEST" + } + ] + }, + { + "name": "/api/v3/transactions", + "block_parsing": { + "parser_arg": [ + "0", + "seqno" + ], + "parser_func": "PARSE_CANONICAL" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0, + "parsers": [ + { + "parse_path": ".params.seqno", + "parse_type": "BLOCK_LATEST" + } + ] + }, + { + "name": "/api/v3/transactionsByMasterchainBlock", + "block_parsing": { + "parser_arg": [ + "0", + "seqno" + ], + "parser_func": "PARSE_CANONICAL" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0, + "parsers": [ + { + "parse_path": ".params.seqno", + "parse_type": "BLOCK_LATEST" + } + ] + }, + { + "name": "/api/v3/transactionsByMessage", + "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": "/api/v3/adjacentTransactions", + "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": "/api/v3/messages", + "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": "/api/v3/nft/collections", + "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": "/api/v3/nft/items", + "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": "/api/v3/nft/transfers", + "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": "/api/v3/jetton/masters", + "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": "/api/v3/jetton/wallets", + "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": "/api/v3/jetton/transfers", + "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": "/api/v3/jetton/burns", + "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": "/api/v3/account", + "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": "/api/v3/wallet", + "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 + } + ], + "headers": [], + "inheritance_apis": [], + "parse_directives": [ + { + "function_template": "/api/v3/masterchainInfo", + "function_tag": "GET_BLOCKNUM", + "result_parsing": { + "parser_arg": [ + "0", + "last", + "seqno" + ], + "parser_func": "PARSE_CANONICAL" + }, + "api_name": "/api/v3/masterchainInfo" + }, + { + "function_template": "/api/v3/blocks?workchain=-1&shard=8000000000000000&seqno=%d", + "function_tag": "GET_BLOCK_BY_NUM", + "result_parsing": { + "parser_arg": [ + "0", + "blocks", + "0", + "seqno" + ], + "parser_func": "PARSE_CANONICAL" + }, + "api_name": "/api/v3/blocks" + } + ], + "verifications": [ + { + "name": "chain-id", + "parse_directive": { + "function_template": "/api/v3/masterchainInfo", + "function_tag": "VERIFICATION", + "result_parsing": { + "parser_arg": [ + "0" + ], + "parser_func": "PARSE_CANONICAL" + }, + "api_name": "/api/v3/masterchainInfo" + }, + "values": [ + { + "expected_value": "*" + } + ] + } + ], + "extensions": [] + }, + { + "enabled": true, + "collection_data": { + "api_interface": "rest", + "internal_path": "", + "type": "POST", + "add_on": "" + }, + "apis": [ + { + "name": "/api/v3/message", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 1 + }, + "extra_compute_units": 0 + }, + { + "name": "/api/v3/runGetMethod", + "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": "/api/v3/estimateFee", + "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 + } + ], + "headers": [], + "inheritance_apis": [], + "parse_directives": [], + "verifications": [], + "extensions": [] + } + ] + } + ] + }, + "deposit": "10000000ulava" +} \ No newline at end of file diff --git a/protocol/chainlib/grpcproxy/grpcproxy.go b/protocol/chainlib/grpcproxy/grpcproxy.go index 7ec2ec0d2c..3eee098cfb 100644 --- a/protocol/chainlib/grpcproxy/grpcproxy.go +++ b/protocol/chainlib/grpcproxy/grpcproxy.go @@ -112,7 +112,7 @@ func (RawBytesCodec) Marshal(v interface{}) ([]byte, error) { func (RawBytesCodec) Unmarshal(data []byte, v interface{}) error { bufferPtr, ok := v.(*[]byte) if !ok { - return utils.LavaFormatError("cannot decode into type", nil, utils.Attribute{Key: "v", Value: v}) + return utils.LavaFormatError("cannot decode into type", nil, utils.LogAttr("v", v), utils.LogAttr("data", data)) } *bufferPtr = data return nil