Skip to content

Commit 25900a2

Browse files
committed
Merge branch 'develop' into beta
2 parents 8a2c863 + 1c6e35a commit 25900a2

File tree

27 files changed

+522
-236
lines changed

27 files changed

+522
-236
lines changed

.env

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ STACKS_CORE_RPC_PORT=20443
8787
## configure the chainID/networkID; testnet: 0x80000000, mainnet: 0x00000001
8888
STACKS_CHAIN_ID=0x00000001
8989

90+
# configure custom testnet and mainnet chainIDs for other networks such as subnets,
91+
# multiple values can be set using comma-separated key-value pairs.
92+
# TODO: currently configured with the default subnet testnet ID, the mainnet values
93+
# are placeholders that should be replaced with the actual subnet mainnet chainID
94+
CUSTOM_CHAIN_IDS=testnet=0x55005500,mainnet=12345678,mainnet=0xdeadbeaf
95+
9096
# Seconds to allow API components to shut down gracefully before force-killing them, defaults to 60
9197
# STACKS_SHUTDOWN_FORCE_KILL_TIMEOUT=60
9298

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ jobs:
955955
context: .
956956
build-args: |
957957
STACKS_API_VERSION=${{ github.head_ref || github.ref_name }}
958-
file: docker/stx-rosetta.Dockerfile
958+
file: docker/rosetta.Dockerfile
959959
tags: ${{ steps.meta_standalone.outputs.tags }}
960960
labels: ${{ steps.meta_standalone.outputs.labels }}
961961
# Only push if (there's a new release on main branch, or if building a non-main branch) and (Only run on non-PR events or only PRs that aren't from forks)

README-rosetta.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
# Testing the Rosetta APIs
22

3-
Build and run the `stx-rosetta.Dockerfile` image:
3+
Build and run the `rosetta.Dockerfile` image:
44

5-
docker build -t stx-rosetta:stable -f stx-rosetta.Dockerfile .
5+
docker build -t rosetta:stable -f rosetta.Dockerfile .
66
docker run -d -p 3999:3999 --mount source=rosetta-data,target=/data \
7-
--name stx-rosetta stx-rosetta:stable
7+
--name rosetta rosetta:stable
88

99
By default, this will connect to the testnet. To run a local node, run
1010

1111

1212
docker run -d -p 3999:3999 --mount source=rosetta-data,target=/data \
13-
--name stx-rosetta -e STACKS_NETWORK=mocknet stx-rosetta:stable
13+
--name rosetta -e STACKS_NETWORK=mocknet rosetta:stable
14+
15+
Optionally, you can seed the chainstate for testnet/mainnet using [Hiro archive data](https://docs.hiro.so/references/hiro-archive#what-is-the-hiro-archive):
16+
17+
18+
docker run -d -p 3999:3999 --mount source=rosetta-data,target=/data \
19+
--name rosetta -e SEED_CHAINSTATE=true rosetta:stable
1420

1521
Use a recent version of [rosetta-cli](https://github.com/coinbase/rosetta-cli) to test the endpoints:
1622

content/feature-guides/rosetta-support.md

Lines changed: 44 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,51 @@ The Stacks Blockchain API supports [v1.4.6 of the Rosetta specification](https:/
88

99
# Testing the Rosetta APIs
1010

11-
To build and run the `stx-rosetta.Dockerfile` image, run the following command:
12-
13-
```docker build -t stx-rosetta:stable -f stx-rosetta.Dockerfile .
14-
docker run -d -p 3999:3999 --mount source=rosetta-data,target=/data \
15-
--name stx-rosetta stx-rosetta:stable```
16-
By default, this will connect to the testnet. To run a local node, run the following command:
17-
```docker run -d -p 3999:3999 --mount source=rosetta-data,target=/data \
18-
--name stx-rosetta -e STACKS_NETWORK=mocknet stx-rosetta:stable```
11+
To build and run the `rosetta.Dockerfile` image, run the following command:
12+
13+
```
14+
docker build -t rosetta:stable -f rosetta.Dockerfile .
15+
docker run -d \
16+
-p 3999:3999 \
17+
--mount source=rosetta-data,target=/data \
18+
--name rosetta \
19+
rosetta:stable
20+
```
21+
22+
To build and run the `rosetta.Dockerfile` image using an [archived chainstate](https://docs.hiro.so/references/hiro-archive#what-is-the-hiro-archive), run the following command:
23+
24+
```
25+
docker build -t rosetta:stable -f rosetta.Dockerfile .
26+
docker run -d \
27+
-p 3999:3999 \
28+
-e SEED_CHAINSTATE=true \
29+
--mount source=rosetta-data,target=/data \
30+
--name rosetta \
31+
rosetta:stable
32+
```
33+
34+
35+
By default, this will connect to the mainnet. To run a local node, run the following command:
36+
37+
```
38+
docker run -d \
39+
-p 3999:3999 \
40+
-e STACKS_NETWORK=mocknet \
41+
--mount source=rosetta-data,target=/data \
42+
--name rosetta \
43+
rosetta:stable
44+
```
45+
1946
To use a recent version of [rosetta-cli](https://github.com/coinbase/rosetta-cli) to test the endpoints, use the following command:
20-
```rosetta-cli --configuration-file rosetta-cli-config/rosetta-config.json \
21-
view:block 1
22-
rosetta-cli --configuration-file rosetta-cli-config/rosetta-config.json \
23-
check:data```
47+
```
48+
rosetta-cli \
49+
--configuration-file rosetta-cli-config/rosetta-config.json \
50+
view:block 1
51+
rosetta-cli \
52+
--configuration-file rosetta-cli-config/rosetta-config.json \
53+
check:data
54+
```
55+
2456
`rosetta-cli` will then sync with the blockchain until it reaches the tip, and then exit, displaying the test results.
2557
Currently, account reconciliation is disabled; proper testing of that feature requires token transfer transactions while `rosetta-cli` is running.
2658
Documentation for the Rosetta APIs can be found [here](https://hirosystems.github.io/stacks-blockchain-api/)

0 commit comments

Comments
 (0)