Skip to content

Commit 23c17f5

Browse files
committed
updated docs
1 parent 830707b commit 23c17f5

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE
1010
### Added
1111

1212
- Added a new RPC endpoint `/v3/health` to query the node's health status. The endpoint returns a 200 status code with relevant synchronization information (including the node's current Stacks tip height, the maximum Stacks tip height among its neighbors, and the difference between these two). A user can use the `difference_from_max_peer` value to decide what is a good threshold for them before considering the node out of sync. The endpoint returns a 500 status code if the query cannot retrieve viable data.
13+
- Added a new query string option for rpc readonly call (cost_tracker=) for allowing faster "free" cost tracking mode. When the "free" mode is enabled, max_execution_time is automatically activated (can be configured with the read_only_max_execution_time_secs connection option, default is 30 seconds)
1314

1415
### Changed
1516

docs/rpc/openapi.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,12 @@ paths:
229229
description: The Stacks chain tip to query from. If tip == latest, the query will be run from the latest
230230
known tip (includes unconfirmed state).
231231
required: false
232+
- name: cost_tracker
233+
in: query
234+
schema:
235+
type: string
236+
description: the cost tracker to apply ("limited" or "free").
237+
required: false
232238
requestBody:
233239
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.
234240
required: true

stackslib/src/config/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3709,6 +3709,13 @@ pub struct ConnectionOptionsFile {
37093709
/// @default: [`DEFAULT_BLOCK_PROPOSAL_MAX_AGE_SECS`]
37103710
/// @units: seconds
37113711
pub block_proposal_max_age_secs: Option<u64>,
3712+
3713+
/// Maximum time (in seconds) that a readonly call in free cost tracking mode
3714+
/// can run before being interrupted
3715+
/// ---
3716+
/// @default: 30
3717+
/// @units: seconds
3718+
pub read_only_max_execution_time_secs: Option<u64>,
37123719
}
37133720

37143721
impl ConnectionOptionsFile {
@@ -3860,6 +3867,9 @@ impl ConnectionOptionsFile {
38603867
block_proposal_max_age_secs: self
38613868
.block_proposal_max_age_secs
38623869
.unwrap_or(DEFAULT_BLOCK_PROPOSAL_MAX_AGE_SECS),
3870+
read_only_max_execution_time_secs: self
3871+
.read_only_max_execution_time_secs
3872+
.unwrap_or(default.read_only_max_execution_time_secs),
38633873
..default
38643874
})
38653875
}

0 commit comments

Comments
 (0)