Skip to content

Commit 7549019

Browse files
committed
Merge branch 'develop' into feat/add-clarity-versions-to-contract-consensus-tests
2 parents c51f407 + cda6a5e commit 7549019

File tree

17 files changed

+2077
-2
lines changed

17 files changed

+2077
-2
lines changed

docs/rpc/openapi.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ components:
4343
name: authorization
4444
description: |
4545
Plain-text secret value that must exactly equal the node's
46-
configured password.
46+
configured password, which is set as `connection_options.auth_token`
47+
in the node's configuration file.
4748
responses:
4849
Unauthorized:
4950
description: Unauthorized. Invalid or missing authentication token.
@@ -449,6 +450,8 @@ paths:
449450
externalValue: "./components/examples/read-only-function-failure.example.json"
450451
"400":
451452
$ref: "#/components/responses/BadRequest"
453+
"401":
454+
$ref: "#/components/responses/Unauthorized"
452455
"404":
453456
$ref: "#/components/responses/NotFound"
454457
"408":
@@ -2205,7 +2208,8 @@ paths:
22052208
summary: Replay mining of a block and returns its content
22062209
tags:
22072210
- Blocks
2208-
security: []
2211+
security:
2212+
- rpcAuth: []
22092213
operationId: blockReplay
22102214
description: |
22112215
Replay the mining of a block (no data is written in the MARF) and returns its content.
@@ -2228,6 +2232,8 @@ paths:
22282232
$ref: "./components/examples/block-replay.example.json"
22292233
"400":
22302234
$ref: "#/components/responses/BadRequest"
2235+
"401":
2236+
$ref: "#/components/responses/Unauthorized"
22312237
"404":
22322238
$ref: "#/components/responses/NotFound"
22332239
"500":
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
---
2+
source: stackslib/src/chainstate/tests/static_analysis_tests.rs
3+
expression: result
4+
---
5+
[
6+
Success(ExpectedBlockOutput(
7+
marf_hash: "3390089ac0826e8e5677d5093fa3d0db6081e88e6a1763017efc763d3cb96b16",
8+
evaluated_epoch: Epoch33,
9+
transactions: [
10+
ExpectedTransactionOutput(
11+
tx: "SmartContract(name: bad-token-name-Epoch3_3-Clarity1, code_body: [..], clarity_version: Some(Clarity1))",
12+
vm_error: "Some(:0:0: expecting an token name as an argument) [NON-CONSENSUS BREAKING]",
13+
return_type: Response(ResponseData(
14+
committed: false,
15+
data: Optional(OptionalData(
16+
data: None,
17+
)),
18+
)),
19+
cost: ExecutionCost(
20+
write_length: 5,
21+
write_count: 1,
22+
read_length: 1,
23+
read_count: 1,
24+
runtime: 1120,
25+
),
26+
),
27+
],
28+
total_block_cost: ExecutionCost(
29+
write_length: 5,
30+
write_count: 1,
31+
read_length: 1,
32+
read_count: 1,
33+
runtime: 1120,
34+
),
35+
)),
36+
Success(ExpectedBlockOutput(
37+
marf_hash: "e5cab45ec9a8034bc8deefb862099bc775bad5bfca6bbe8896c5d4b69bd58773",
38+
evaluated_epoch: Epoch33,
39+
transactions: [
40+
ExpectedTransactionOutput(
41+
tx: "SmartContract(name: bad-token-name-Epoch3_3-Clarity2, code_body: [..], clarity_version: Some(Clarity2))",
42+
vm_error: "Some(:0:0: expecting an token name as an argument) [NON-CONSENSUS BREAKING]",
43+
return_type: Response(ResponseData(
44+
committed: false,
45+
data: Optional(OptionalData(
46+
data: None,
47+
)),
48+
)),
49+
cost: ExecutionCost(
50+
write_length: 5,
51+
write_count: 1,
52+
read_length: 1,
53+
read_count: 1,
54+
runtime: 1120,
55+
),
56+
),
57+
],
58+
total_block_cost: ExecutionCost(
59+
write_length: 5,
60+
write_count: 1,
61+
read_length: 1,
62+
read_count: 1,
63+
runtime: 1120,
64+
),
65+
)),
66+
Success(ExpectedBlockOutput(
67+
marf_hash: "dd195890bfe644b746de8f2d27e986a2cc8407929d3e7ca32ce18f1460a40348",
68+
evaluated_epoch: Epoch33,
69+
transactions: [
70+
ExpectedTransactionOutput(
71+
tx: "SmartContract(name: bad-token-name-Epoch3_3-Clarity3, code_body: [..], clarity_version: Some(Clarity3))",
72+
vm_error: "Some(:0:0: expecting an token name as an argument) [NON-CONSENSUS BREAKING]",
73+
return_type: Response(ResponseData(
74+
committed: false,
75+
data: Optional(OptionalData(
76+
data: None,
77+
)),
78+
)),
79+
cost: ExecutionCost(
80+
write_length: 5,
81+
write_count: 1,
82+
read_length: 1,
83+
read_count: 1,
84+
runtime: 1120,
85+
),
86+
),
87+
],
88+
total_block_cost: ExecutionCost(
89+
write_length: 5,
90+
write_count: 1,
91+
read_length: 1,
92+
read_count: 1,
93+
runtime: 1120,
94+
),
95+
)),
96+
Success(ExpectedBlockOutput(
97+
marf_hash: "bcc6deb5971a412ffbbf92f64405124ca3e0e0c1408e1da9d3da08d239e003a6",
98+
evaluated_epoch: Epoch33,
99+
transactions: [
100+
ExpectedTransactionOutput(
101+
tx: "SmartContract(name: bad-token-name-Epoch3_3-Clarity4, code_body: [..], clarity_version: Some(Clarity4))",
102+
vm_error: "Some(:0:0: expecting an token name as an argument) [NON-CONSENSUS BREAKING]",
103+
return_type: Response(ResponseData(
104+
committed: false,
105+
data: Optional(OptionalData(
106+
data: None,
107+
)),
108+
)),
109+
cost: ExecutionCost(
110+
write_length: 5,
111+
write_count: 1,
112+
read_length: 1,
113+
read_count: 1,
114+
runtime: 1120,
115+
),
116+
),
117+
],
118+
total_block_cost: ExecutionCost(
119+
write_length: 5,
120+
write_count: 1,
121+
read_length: 1,
122+
read_count: 1,
123+
runtime: 1120,
124+
),
125+
)),
126+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
---
2+
source: stackslib/src/chainstate/tests/static_analysis_tests.rs
3+
expression: result
4+
---
5+
[
6+
Success(ExpectedBlockOutput(
7+
marf_hash: "0baa8536816ea19016addf5641e710546c1337086d00ae90446b95d3cc4fab61",
8+
evaluated_epoch: Epoch33,
9+
transactions: [
10+
ExpectedTransactionOutput(
11+
tx: "SmartContract(name: ccall-expect-name-Epoch3_3-Clarity1, code_body: [..], clarity_version: Some(Clarity1))",
12+
vm_error: "Some(:0:0: missing contract name for call) [NON-CONSENSUS BREAKING]",
13+
return_type: Response(ResponseData(
14+
committed: false,
15+
data: Optional(OptionalData(
16+
data: None,
17+
)),
18+
)),
19+
cost: ExecutionCost(
20+
write_length: 0,
21+
write_count: 0,
22+
read_length: 0,
23+
read_count: 0,
24+
runtime: 2151,
25+
),
26+
),
27+
],
28+
total_block_cost: ExecutionCost(
29+
write_length: 0,
30+
write_count: 0,
31+
read_length: 0,
32+
read_count: 0,
33+
runtime: 2151,
34+
),
35+
)),
36+
Success(ExpectedBlockOutput(
37+
marf_hash: "2ed7c0c0aabed9df7b3fb279db73498156a063af779e047537f15f7d1a4fca97",
38+
evaluated_epoch: Epoch33,
39+
transactions: [
40+
ExpectedTransactionOutput(
41+
tx: "SmartContract(name: ccall-expect-name-Epoch3_3-Clarity2, code_body: [..], clarity_version: Some(Clarity2))",
42+
vm_error: "Some(:0:0: missing contract name for call) [NON-CONSENSUS BREAKING]",
43+
return_type: Response(ResponseData(
44+
committed: false,
45+
data: Optional(OptionalData(
46+
data: None,
47+
)),
48+
)),
49+
cost: ExecutionCost(
50+
write_length: 0,
51+
write_count: 0,
52+
read_length: 0,
53+
read_count: 0,
54+
runtime: 2151,
55+
),
56+
),
57+
],
58+
total_block_cost: ExecutionCost(
59+
write_length: 0,
60+
write_count: 0,
61+
read_length: 0,
62+
read_count: 0,
63+
runtime: 2151,
64+
),
65+
)),
66+
Success(ExpectedBlockOutput(
67+
marf_hash: "8f4226f89fa28f6cac5946c87e70301055d7bd8daf6e32545b99b6437a377940",
68+
evaluated_epoch: Epoch33,
69+
transactions: [
70+
ExpectedTransactionOutput(
71+
tx: "SmartContract(name: ccall-expect-name-Epoch3_3-Clarity3, code_body: [..], clarity_version: Some(Clarity3))",
72+
vm_error: "Some(:0:0: missing contract name for call) [NON-CONSENSUS BREAKING]",
73+
return_type: Response(ResponseData(
74+
committed: false,
75+
data: Optional(OptionalData(
76+
data: None,
77+
)),
78+
)),
79+
cost: ExecutionCost(
80+
write_length: 0,
81+
write_count: 0,
82+
read_length: 0,
83+
read_count: 0,
84+
runtime: 2151,
85+
),
86+
),
87+
],
88+
total_block_cost: ExecutionCost(
89+
write_length: 0,
90+
write_count: 0,
91+
read_length: 0,
92+
read_count: 0,
93+
runtime: 2151,
94+
),
95+
)),
96+
Success(ExpectedBlockOutput(
97+
marf_hash: "e294d7a75b14cf11124d8f842923b3e332b40c3fead74a57e2a224853c7d013b",
98+
evaluated_epoch: Epoch33,
99+
transactions: [
100+
ExpectedTransactionOutput(
101+
tx: "SmartContract(name: ccall-expect-name-Epoch3_3-Clarity4, code_body: [..], clarity_version: Some(Clarity4))",
102+
vm_error: "Some(:0:0: missing contract name for call) [NON-CONSENSUS BREAKING]",
103+
return_type: Response(ResponseData(
104+
committed: false,
105+
data: Optional(OptionalData(
106+
data: None,
107+
)),
108+
)),
109+
cost: ExecutionCost(
110+
write_length: 0,
111+
write_count: 0,
112+
read_length: 0,
113+
read_count: 0,
114+
runtime: 2151,
115+
),
116+
),
117+
],
118+
total_block_cost: ExecutionCost(
119+
write_length: 0,
120+
write_count: 0,
121+
read_length: 0,
122+
read_count: 0,
123+
runtime: 2151,
124+
),
125+
)),
126+
]

0 commit comments

Comments
 (0)