Skip to content

Commit 1644a3c

Browse files
committed
Merge branch 'develop' of https://github.com/stacks-network/stacks-core into feat/signer-state-conflict-resolution-strategies
2 parents 2337411 + a58ac52 commit 1644a3c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+1176
-214
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -102,22 +102,6 @@ jobs:
102102
signer_docker_tag: ${{ needs.check-release.outputs.signer_docker_tag }}
103103
is_node_release: ${{ needs.check-release.outputs.is_node_release }}
104104
is_signer_release: ${{ needs.check-release.outputs.is_signer_release }}
105-
secrets: inherit
106-
107-
## Build and push Debian image built from source
108-
##
109-
## Runs when:
110-
## - it is not a node or signer-only release run
111-
docker-image:
112-
if: |
113-
needs.check-release.outputs.is_node_release != 'true' ||
114-
needs.check-release.outputs.is_signer_release != 'true'
115-
name: Docker Image (Source)
116-
uses: ./.github/workflows/image-build-source.yml
117-
needs:
118-
- rustfmt
119-
- check-release
120-
secrets: inherit
121105

122106
## Create a reusable cache for tests
123107
##

.github/workflows/github-release.yml

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ on:
2929
description: "True if it is a signer release"
3030
required: true
3131
type: string
32-
secrets:
33-
GH_TOKEN:
34-
required: true
3532

3633
concurrency:
3734
group: github-release-${{ github.head_ref || github.ref }}
@@ -41,6 +38,21 @@ concurrency:
4138
run-name: ${{ inputs.node_tag || inputs.signer_tag }}
4239

4340
jobs:
41+
## This job's sole purpose is trigger a secondary approval outside of the matrix jobs below.
42+
## - If this job isn't approved to run, then the subsequent jobs will also not run - for this reason, we always exit 0
43+
## - `andon-cord` requires the repo environment "Build Release", which will trigger a secondary approval step before running this workflow.
44+
andon-cord:
45+
if: |
46+
inputs.node_tag != '' ||
47+
inputs.signer_tag != ''
48+
name: Andon Cord
49+
runs-on: ubuntu-latest
50+
environment: "Build Release"
51+
steps:
52+
- name: Check Approval
53+
id: check
54+
run: |
55+
exit 0
4456
## Build arch dependent binaries from source
4557
##
4658
## Runs when the following is true:
@@ -51,7 +63,8 @@ jobs:
5163
inputs.signer_tag != ''
5264
name: Build Binaries
5365
runs-on: ubuntu-latest
54-
environment: "Build Release"
66+
needs:
67+
- andon-cord
5568
strategy:
5669
## Run a maximum of 10 builds concurrently, using the matrix defined in inputs.arch
5770
max-parallel: 10
@@ -94,7 +107,10 @@ jobs:
94107
name: Create Release
95108
runs-on: ubuntu-latest
96109
needs:
110+
- andon-cord
97111
- build-binaries
112+
permissions:
113+
contents: write
98114
steps:
99115
## Creates releases
100116
- name: Create Release
@@ -106,8 +122,7 @@ jobs:
106122
signer_docker_tag: ${{ inputs.signer_docker_tag }}
107123
is_node_release: ${{ inputs.is_node_release }}
108124
is_signer_release: ${{ inputs.is_signer_release }}
109-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
110-
125+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111126

112127
## Builds arch dependent Docker images from binaries
113128
##
@@ -121,6 +136,7 @@ jobs:
121136
name: Docker Image (Binary)
122137
runs-on: ubuntu-latest
123138
needs:
139+
- andon-cord
124140
- build-binaries
125141
- create-release
126142
strategy:
@@ -153,12 +169,15 @@ jobs:
153169
name: Create Downstream PR (${{ github.ref_name }})
154170
runs-on: ubuntu-latest
155171
needs:
172+
- andon-cord
156173
- build-binaries
157174
- create-release
158175
- docker-image
176+
permissions:
177+
pull-requests: write
159178
steps:
160179
- name: Open Downstream PR
161180
id: create-pr
162181
uses: stacks-network/actions/stacks-core/release/downstream-pr@main
163182
with:
164-
token: ${{ secrets.GH_TOKEN }}
183+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/image-build-source.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
image:
2222
name: Build Image
2323
runs-on: ubuntu-latest
24+
## Requires the repo environment "Push to Docker", which will trigger a secondary approval step before running this workflow.
25+
environment: "Push to Docker"
2426
steps:
2527
## Setup Docker for the builds
2628
- name: Docker setup

.gitmodules

Whitespace-only changes.

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE
1313
- Add `max_execution_time_secs` to miner config for limiting duration of contract calls
1414
- When a miner's config file is updated (ie with a new fee rate), a new block commit is issued using
1515
the new values ([#5924](https://github.com/stacks-network/stacks-core/pull/5924))
16+
- Add `txindex` configuration option enabling the storage (and querying via api) of transactions. Note: the old STACKS_TRANSACTION_LOG environment var configuration is no longer available.
1617

1718
### Changed
1819

Cargo.lock

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

contrib/tools/block-replay.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ start_replay() {
195195
starting_block=0 # for the block counter, start at this block
196196
## use these values if `--testing` arg is provided (only replay 1_000 blocks) Note: 2.5 epoch is at 153106
197197
${TESTING} && total_blocks=153000
198-
${TESTING} && starting_block=15200
198+
${TESTING} && starting_block=152000
199199
;;
200200
esac
201201
local block_diff=$((total_blocks - starting_block)) ## how many blocks are being replayed

docs/rpc-endpoints.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,3 +578,20 @@ tenure, `tip_block_id` identifies the highest-known block in this tenure, and
578578
Get number of blocks signed by signer during a given reward cycle
579579

580580
Returns a non-negative integer
581+
582+
### GET /v3/transaction/[Transaction ID]
583+
584+
Returns the index_block_hash, the transaction body (as hex) and the result given the TXID.
585+
586+
```json
587+
{
588+
"index_block_hash": "e0b6c25b1dac0c0e1c75e41ab46bd6d70d9a2d02ffed8f2c0733b6e686289c38",
589+
"tx": "(ok true)",
590+
"result": "808000000004008bc5147525b8f477f0bc4522a88c8339b2494db5000000000000001a0000000000000000010123eab800bc9f639c5aa05d154148a981c89fd21064a6f8cafd8649800a56c9ea77e2e46bed8bd9ef0f173b19b20d6c43e2a9f37b078df5c74b9e6f9be75b650e01020000000007588687edeb02248d402c316ed33e22ea0e73af8703ce5011f3e25f5ce12f00f903ca504742117ee0588687edeb02248d402c316ed33e22ea0e73af87c54e0d94e4dd298cf19778352906a2fcf0af74582b07dfb57c710288874f71ca00000001006bc51b33e9f3626944eb879147e18111581f8f9b"
591+
}
592+
```
593+
594+
This feature requires enabling of transaction indexing by setting the `txindex` node option.
595+
596+
This will return 404 if the transaction does not exist and 501 (Not Implemented) if
597+
transaction indexing is not enabled.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"index_block_hash": "e0b6c25b1dac0c0e1c75e41ab46bd6d70d9a2d02ffed8f2c0733b6e686289c38",
3+
"result": "(ok true)",
4+
"tx": "808000000004008bc5147525b8f477f0bc4522a88c8339b2494db5000000000000001a0000000000000000010123eab800bc9f639c5aa05d154148a981c89fd21064a6f8cafd8649800a56c9ea77e2e46bed8bd9ef0f173b19b20d6c43e2a9f37b078df5c74b9e6f9be75b650e01020000000007588687edeb02248d402c316ed33e22ea0e73af8703ce5011f3e25f5ce12f00f903ca504742117ee0588687edeb02248d402c316ed33e22ea0e73af87c54e0d94e4dd298cf19778352906a2fcf0af74582b07dfb57c710288874f71ca00000001006bc51b33e9f3626944eb879147e18111581f8f9b"
5+
}

docs/rpc/entities/contracts/read-only-function-args.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
33
"title": "ReadOnlyFunctionArgs",
4-
"description": "Describes representation of a Type-0 Stacks 2.0 transaction. https://github.com/blockstack/stacks-blockchain/blob/master/sip/sip-005-blocks-and-transactions.md#type-0-transferring-an-asset",
4+
"description": "Describes representation of a Type-0 Stacks 2.0 transaction. https://github.com/stacksgov/sips/blob/main/sips/sip-005/sip-005-blocks-and-transactions.md#type-0-transferring-an-asset",
55
"type": "object",
66
"required": ["sender", "arguments"],
77
"properties": {

0 commit comments

Comments
 (0)