Skip to content

Commit 5c51572

Browse files
authored
Merge branch 'develop' into refactor/clean-op-signer
2 parents dd45a01 + d4980dd commit 5c51572

File tree

22 files changed

+1851
-215
lines changed

22 files changed

+1851
-215
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to the versioning scheme outlined in the [README.md](README.md).
77

8+
## Unreleased
9+
10+
### Changed
11+
12+
- When a previous block commit is unable to be RBFed, the miner will now just wait for it to be confirmed instead of submitting a new block commit which breaks the miner's UTXO chain.
13+
814
## [3.1.0.0.13]
915

1016
### Added

Cargo.lock

Lines changed: 2 additions & 160 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/rpc/openapi.yaml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -948,3 +948,72 @@ paths:
948948
$ref: ./api/core-node/get-health-error.schema.json
949949
example:
950950
$ref: ./api/core-node/get-health-error.example.json
951+
952+
/v3/contracts/fast-call-read/{contract_address}/{contract_name}/{function_name}:
953+
post:
954+
summary: Call read-only function in fast mode (no cost and memory tracking)
955+
tags:
956+
- Smart Contracts
957+
operationId: fast_call_read_only_function
958+
description: |
959+
Call a read-only public function on a given smart contract without cost tracking.
960+
961+
**This API endpoint requires a basic Authorization header.**
962+
963+
The smart contract and function are specified using the URL path. The arguments and the simulated tx-sender are supplied via the POST body in the following JSON format:
964+
responses:
965+
"200":
966+
description: Success
967+
content:
968+
application/json:
969+
schema:
970+
$ref: ./api/contract/post-call-read-only-fn.schema.json
971+
examples:
972+
success:
973+
$ref: ./api/contract/post-call-read-only-fn-success.example.json
974+
fail:
975+
$ref: ./api/contract/post-call-read-only-fn-fail.example.json
976+
"400":
977+
description: Endpoint not enabled.
978+
"401":
979+
description: Unauthorized.
980+
"408":
981+
description: ExecutionTime expired.
982+
parameters:
983+
- name: contract_address
984+
in: path
985+
required: true
986+
description: Stacks address
987+
schema:
988+
type: string
989+
- name: contract_name
990+
in: path
991+
required: true
992+
description: Contract name
993+
schema:
994+
type: string
995+
- name: function_name
996+
in: path
997+
required: true
998+
description: Function name
999+
schema:
1000+
type: string
1001+
- name: tip
1002+
in: query
1003+
schema:
1004+
type: string
1005+
description: The Stacks chain tip to query from. If tip == latest, the query will be run from the latest
1006+
known tip (includes unconfirmed state).
1007+
required: false
1008+
requestBody:
1009+
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.
1010+
required: true
1011+
content:
1012+
application/json:
1013+
schema:
1014+
$ref: './entities/contracts/read-only-function-args.schema.json'
1015+
example:
1016+
sender: 'SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0.get-info'
1017+
arguments:
1018+
- '0x0011...'
1019+
- '0x00231...'

stacks-common/src/util/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@ pub fn get_epoch_time_ms() -> u128 {
7777
since_the_epoch.as_millis()
7878
}
7979

80+
#[cfg(any(test, feature = "testing"))]
81+
pub fn get_epoch_time_nanos() -> u128 {
82+
let start = SystemTime::now();
83+
let since_the_epoch = start
84+
.duration_since(UNIX_EPOCH)
85+
.expect("Time went backwards");
86+
since_the_epoch.as_nanos()
87+
}
88+
8089
pub fn sleep_ms(millis: u64) {
8190
let t = time::Duration::from_millis(millis);
8291
thread::sleep(t);

stacks-signer/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to the versioning scheme outlined in the [README.md](README.md).
77

8+
## [Unreleased]
9+
10+
### Added
11+
12+
- Added `info` logs to the signer to provide more visibility into the block approval/rejection status
13+
814
## [3.1.0.0.13.0]
915

1016
### Changed

0 commit comments

Comments
 (0)