Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: added use_latest_tip query parameter to the relevant v2 endpoints #2778

Merged
merged 24 commits into from
Dec 21, 2021
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
dfc216d
Feat: added use_latest_tip query parameter to the relevant v2 endpoints
pavitthrap Jul 23, 2021
e06fa73
Fix openapi formatting
pavitthrap Jul 27, 2021
7b62bac
Addressed greg's comments: added test comments, fixed style issues in…
pavitthrap Jul 28, 2021
46fbbbd
docs: changed type of query parameter to boolean in the openapi doc
pavitthrap Jul 29, 2021
11d741b
docs: updated wording in openapi.yaml, added comments to tests in rpc.rs
pavitthrap Aug 5, 2021
f9c9b48
fix: update name of function
pavitthrap Aug 5, 2021
d4c5856
Merge branch 'develop' into fix/rpc-tip
pavitthrap Aug 5, 2021
468c7aa
docs: updated comments
pavitthrap Aug 11, 2021
a643c26
Merge branch 'fix/rpc-tip' of https://github.com/blockstack/stacks-bl…
pavitthrap Aug 11, 2021
b083049
Merge branch 'develop' into fix/rpc-tip
pavitthrap Aug 11, 2021
c1c2138
docs: minor wording fix to function comment
pavitthrap Aug 17, 2021
4c55bd7
fix: updated test names and ports in rpc.rs
pavitthrap Aug 18, 2021
0c5f6aa
Addressed comments from Jude; added new test; now checking for underl…
pavitthrap Sep 24, 2021
0678527
Merge branch 'develop' into fix/rpc-tip
pavitthrap Sep 24, 2021
39f5592
Fixed merge error
pavitthrap Sep 27, 2021
4943f66
Fixed integration test and openapi syntax
pavitthrap Sep 27, 2021
9d9888c
Refactor: remove use_latest_tip
pavitthrap Nov 3, 2021
946c8da
Merge branch 'develop' into fix/rpc-tip
pavitthrap Nov 17, 2021
713968e
Merge branch 'develop' into fix/rpc-tip
pavitthrap Dec 1, 2021
7661d03
Removed mentions of use_latest_tip parameter, returning a NotFound ht…
pavitthrap Dec 1, 2021
c1ea350
added test to test matrix
pavitthrap Dec 2, 2021
cfd0e68
Merge branch 'develop' into fix/rpc-tip
pavitthrap Dec 16, 2021
b105913
Fixed merge errors, added warn statement about race condition to hand…
pavitthrap Dec 17, 2021
dc34f9e
Integration test passing - updated request parameters
pavitthrap Dec 21, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 99 additions & 38 deletions docs/rpc/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,14 @@ paths:
schema:
type: string
description: The Stacks chain tip to query from

- name: use_latest_tip
pavitthrap marked this conversation as resolved.
Show resolved Hide resolved
in: query
schema:
type: boolean
description: |
If use_latest_tip == true, the query will be run from the latest known tip (includes unconfirmed state).
If use_latest_tip == false or is unspecified, the tip is selected as usual (first checking value of the
tip parameter, otherwise taking the stacks chain tip).
/v2/map_entry/{contract_address}/{contract_name}/{map_name}:
post:
summary: Get specific data-map inside a contract
Expand Down Expand Up @@ -127,7 +134,15 @@ paths:
schema:
type: string
description: The Stacks chain tip to query from
x-codegen-request-body-name: key
- name: use_latest_tip
in: query
schema:
type: boolean
description: |
If use_latest_tip == true, the query will be run from the latest known tip (includes unconfirmed state).
If use_latest_tip == false or is unspecified, the tip is selected as usual (first checking value of the
tip parameter, otherwise taking the stacks chain tip).
x-codegen-request-body-name: key
requestBody:
description: Hex string serialization of the lookup key (which should be a Clarity value)
required: true
Expand Down Expand Up @@ -176,6 +191,14 @@ paths:
type: string
description: The Stacks chain tip to query from
required: false
- name: use_latest_tip
in: query
schema:
type: boolean
description: |
If use_latest_tip == true, the query will be run from the latest known tip (includes unconfirmed state).
If use_latest_tip == false or is unspecified, the tip is selected as usual (first checking value of the
tip parameter, otherwise taking the stacks chain tip).

/v2/contracts/call-read/{contract_address}/{contract_name}/{function_name}:
post:
Expand Down Expand Up @@ -224,6 +247,14 @@ paths:
type: string
description: The Stacks chain tip to query from
required: false
- name: use_latest_tip
in: query
schema:
type: boolean
description: |
If use_latest_tip == true, the query will be run from the latest known tip (includes unconfirmed state).
If use_latest_tip == false or is unspecified, the tip is selected as usual (first checking value of the
tip parameter, otherwise taking the stacks chain tip).
requestBody:
description: map of arguments and the simulated tx-sender where sender is either a Contract identifier or a normal Stacks address, and arguments is an array of hex serialized Clarity values.
required: true
Expand Down Expand Up @@ -266,6 +297,14 @@ paths:
schema:
type: string
description: The Stacks chain tip to query from
- name: use_latest_tip
in: query
schema:
type: boolean
description: |
If use_latest_tip == true, the query will be run from the latest known tip (includes unconfirmed state).
If use_latest_tip == false or is unspecified, the tip is selected as usual (first checking value of the
tip parameter, otherwise taking the stacks chain tip).
responses:
200:
description: Success
Expand Down Expand Up @@ -326,6 +365,20 @@ paths:
$ref: ./api/core-node/get-pox.schema.json
example:
$ref: ./api/core-node/get-pox.example.json
parameters:
- name: tip
in: query
schema:
type: string
description: The Stacks chain tip to query from
- name: use_latest_tip
in: query
schema:
type: boolean
description: |
If use_latest_tip == true, the query will be run from the latest known tip (includes unconfirmed state).
If use_latest_tip == false or is unspecified, the tip is selected as usual (first checking value of the
tip parameter, otherwise taking the stacks chain tip).

/v2/traits/{contract_address}/{contract_name}/{trait_contract_address}/{trait_ contract_name}/{trait_name}:
get:
Expand All @@ -343,39 +396,47 @@ paths:
$ref: ./api/trait/get-is-trait-implemented.schema.json
example:
$ref: ./api/trait/get-is-trait-implemented.example.json
parameters:
- name: contract_address
in: path
required: true
description: Stacks address
schema:
type: string
- name: contract_name
in: path
required: true
description: Contract name
schema:
type: string
- name: trait_contract_address
in: path
required: true
description: Trait Stacks address
schema:
type: string
- name: trait_contract_name
in: path
required: true
description: Trait contract name
schema:
type: string
- name: trait_name
in: path
required: true
description: Trait name
schema:
type: string
- name: tip
in: query
schema:
type: string
description: The Stacks chain tip to query from
parameters:
- name: contract_address
in: path
required: true
description: Stacks address
schema:
type: string
- name: contract_name
in: path
required: true
description: Contract name
schema:
type: string
- name: trait_contract_address
in: path
required: true
description: Trait Stacks address
schema:
type: string
- name: trait_contract_name
in: path
required: true
description: Trait contract name
schema:
type: string
- name: trait_name
in: path
required: true
description: Trait name
schema:
type: string
- name: tip
in: query
schema:
type: string
description: The Stacks chain tip to query from
- name: use_latest_tip
in: query
schema:
type: boolean
description: |
If use_latest_tip == true, the query will be run from the latest known tip (includes unconfirmed state).
If use_latest_tip == false or is unspecified, the tip is selected as usual (first checking value of the
tip parameter, otherwise taking the stacks chain tip).
Loading