Skip to content

Commit bb23fbb

Browse files
authored
chore(release): release v0.5.0
Release v0.5.0 Merge pull request #440 from metaplex-foundation/release/v0.5.0
2 parents 95eefe5 + e12819f commit bb23fbb

File tree

173 files changed

+5739
-780
lines changed

Some content is hidden

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

173 files changed

+5739
-780
lines changed

.dockerignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,9 @@ node-modules
66
ledger
77
tmp
88
.anchor
9+
docker/
10+
doc/
11+
scripts/
12+
*.md
13+
*.sh
14+
*.yaml

.env.example

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ REDIS_CONNECTION_CONFIG='{"redis_connection_str":"redis://127.0.0.1:6379/0"}'
88

99
#RocksDB
1010
ROCKS_DB_PATH="/usr/src/rocksdb-data"
11-
ROCKS_DB_PATH_CONTAINER="/usr/src/rocksdb-data"
12-
ROCKS_DB_SECONDARY_PATH_CONTAINER="path/to/rocks/secondary/db"
11+
ROCKS_DB_SECONDARY_PATH="path/to/rocks/secondary/db"
1312
# path to the slots data, required for the backfiller to work
1413
ROCKS_SLOTS_DB_PATH=/path/to/slots-data
1514
ROCKS_SECONDARY_SLOTS_DB_PATH=/path/to/secondary/ingester-slots
1615
ROCKS_ARCHIVES_DIR="path/to/rocks/backup/archives"
1716
ROCKS_BACKUP_ARCHIVES_DIR="path/to/rocks/backup/archives"
17+
ROCKS_BACKUP_URL="127.0.0.1:3051/snapshot"
1818
ROCKS_MIGRATION_STORAGE_PATH=/path/to/migration_storage
1919

2020
#Backfiller
@@ -77,9 +77,9 @@ SKIP_CHECK_TREE_GAPS=false
7777

7878
# API_RPC_HOST INGESTER_RPC_HOST -> RPC_HOST
7979
#INGESTER_ROCKS_DB_PATH -> ROCKS_DB_PATH
80-
#INGESTER_ROCKS_DB_PATH_CONTAINER -> ROCKS_DB_PATH_CONTAINER
80+
#INGESTER_ROCKS_DB_PATH_CONTAINER -> ROCKS_DB_PATH
8181
#INGESTER_SYNCHRONIZER_DUMP_PATH -> ROCKS_DUMP_PATH
82-
#API_ROCKS_DB_PATH_CONTAINER -> ROCKS_DB_PATH_CONTAINER
82+
#API_ROCKS_DB_PATH_CONTAINER -> ROCKS_DB_PATH
8383
#INGESTER_FILE_STORAGE_PATH -> FILE_STORAGE_PATH
8484
#INGESTER_FILE_STORAGE_PATH_CONTAINER -> FILE_STORAGE_PATH_CONTAINER
8585
# INGESTER_PROFILING_FILE_PATH -> PROFILING_FILE_PATH
@@ -96,13 +96,13 @@ SKIP_CHECK_TREE_GAPS=false
9696
#API_DATABASE_CONFIG -> PG_MAX_DB_CONNECTIONS and PG_DATABASE_URL
9797

9898
#SYNCHRONIZER_DUMP_PATH -> ROCKS_DUMP_PATH
99-
#SYNCHRONIZER_ROCKS_DB_SECONDARY_PATH_CONTAINER -> ROCKS_DB_SECONDARY_PATH_CONTAINER
99+
#SYNCHRONIZER_ROCKS_DB_SECONDARY_PATH_CONTAINER -> ROCKS_DB_SECONDARY_PATH
100100
#SYNCHRONIZER_DUMP_SYNCHRONIZER_BATCH_SIZE -> DUMP_SYNCHRONIZER_BATCH_SIZE
101101
#SYNCHRONIZER_DUMP_SYNC_THRESHOLD -> DUMP_SYNC_THRESHOLD
102102

103103
#API_ARCHIVES_DIR -> rocks_archives_dir
104-
#API_ROCKS_DB_PATH_CONTAINER -> ROCKS_DB_PATH_CONTAINER
105-
#API_ROCKS_DB_SECONDARY_PATH_CONTAINER -> ROCKS_DB_SECONDARY_PATH_CONTAINER
104+
#API_ROCKS_DB_PATH_CONTAINER -> ROCKS_DB_PATH
105+
#API_ROCKS_DB_SECONDARY_PATH_CONTAINER -> ROCKS_DB_SECONDARY_PATH
106106
#API_FILE_STORAGE_PATH_CONTAINER -> FILE_STORAGE_PATH_CONTAINER
107107
#API_JSON_MIDDLEWARE_CONFIG -> JSON_MIDDLEWARE_CONFIG
108108
#API_CONSISTENCE_SYNCHRONIZATION_API_THRESHOLD - > CONSISTENCE_SYNCHRONIZATION_API_THRESHOLD

.github/workflows/docker.yml

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
name: Build docker images
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches: [develop]
7+
push:
8+
branches: [develop]
9+
tags: ["v*"]
10+
11+
# Add permissions block for GitHub Container Registry access
12+
permissions:
13+
contents: read
14+
packages: write
15+
16+
env:
17+
PUSH_CONDITION: ${{ github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && contains(fromJSON('["refs/head/main", "refs/head/develop"]'), github.event.workflow_dispatch.ref)) }}
18+
19+
jobs:
20+
build-base-image:
21+
runs-on: ubuntu-latest
22+
outputs:
23+
version: ${{ steps.version.outputs.version }}
24+
25+
steps:
26+
- uses: actions/checkout@v4
27+
- name: Login to GitHub Container Registry
28+
uses: docker/login-action@v3
29+
with:
30+
registry: ghcr.io
31+
username: ${{ github.repository_owner }}
32+
password: ${{ secrets.GITHUB_TOKEN }}
33+
34+
- name: Set up Docker Buildx
35+
uses: docker/setup-buildx-action@v3
36+
37+
- name: Generate version info
38+
id: version
39+
run: |
40+
echo "VERSION_INFO<<EOF" >> "$GITHUB_ENV"
41+
./docker/version.sh | sed -e '$a\' >> "$GITHUB_ENV"
42+
echo "EOF" >> "$GITHUB_ENV"
43+
ver=$( [[ "$GITHUB_REF" == refs/tags/* ]] \
44+
&& echo "${GITHUB_REF#refs/tags/}" \
45+
|| (branch="${GITHUB_REF#refs/heads/}"; sha=$(git rev-parse --short HEAD); echo "${branch}-${sha}") )
46+
echo "Version: $ver"
47+
echo "version=${ver}" >> "$GITHUB_OUTPUT"
48+
49+
# Build base image for local use only (no push)
50+
- name: Build and export base image
51+
uses: docker/build-push-action@v6
52+
with:
53+
context: .
54+
file: docker/base.Dockerfile
55+
push: false
56+
tags: ghcr.io/${{ github.repository_owner }}/aura-base:latest
57+
outputs: type=docker,dest=${{ runner.temp }}/base.tar
58+
cache-from: type=gha
59+
cache-to: type=gha,mode=max
60+
build-args: |
61+
"VERSION_INFO=${{ env.VERSION_INFO }}"
62+
63+
- name: Upload artifact
64+
uses: actions/upload-artifact@v4
65+
with:
66+
name: base
67+
path: ${{ runner.temp }}/base.tar
68+
69+
build-binary-images:
70+
runs-on: ubuntu-latest
71+
needs: [build-base-image]
72+
strategy:
73+
fail-fast: true
74+
matrix:
75+
binary-name:
76+
[
77+
ingester,
78+
slot_persister,
79+
backfill,
80+
api,
81+
synchronizer,
82+
rocksdb_backup,
83+
]
84+
steps:
85+
- uses: actions/checkout@v4 # Need to checkout code for Dockerfile
86+
- name: Login to GitHub Container Registry
87+
uses: docker/login-action@v3
88+
with:
89+
registry: ghcr.io
90+
username: ${{ github.repository_owner }}
91+
password: ${{ secrets.GITHUB_TOKEN }}
92+
93+
- name: Set up Docker Buildx
94+
uses: docker/setup-buildx-action@v3
95+
with:
96+
driver: docker
97+
98+
- name: Download base image artifact
99+
uses: actions/download-artifact@v4
100+
with:
101+
name: base
102+
path: ${{ runner.temp }}
103+
104+
- name: Load base image
105+
run: |
106+
docker load --input ${{ runner.temp }}/base.tar
107+
108+
- name: Docker metadata for tag
109+
if: startsWith(github.ref, 'refs/tags/')
110+
id: meta_tag
111+
uses: docker/metadata-action@v5
112+
with:
113+
images: |
114+
ghcr.io/${{ github.repository_owner }}/aura-${{ matrix.binary-name }}
115+
tags: |
116+
type=semver,pattern=v{{version}}
117+
type=raw,value=latest,enable={{is_default_branch}}
118+
119+
- name: Docker metadata for branch
120+
if: startsWith(github.ref, 'refs/heads/')
121+
id: meta_branch
122+
uses: docker/metadata-action@v5
123+
with:
124+
images: |
125+
ghcr.io/${{ github.repository_owner }}/aura-${{ matrix.binary-name }}
126+
tags: |
127+
type=sha,event=branch,prefix={{branch}}-
128+
type=raw,event=branch,value={{branch}}-latest
129+
130+
- name: Build and push
131+
uses: docker/build-push-action@v6
132+
with:
133+
context: .
134+
file: docker/app.Dockerfile
135+
push: ${{ env.PUSH_CONDITION }}
136+
tags: ${{ startsWith(github.ref, 'refs/tags/') && steps.meta_tag.outputs.tags || steps.meta_branch.outputs.tags }}
137+
labels: ${{ steps.meta.outputs.labels }}
138+
build-args: |
139+
BINARY=${{ matrix.binary-name }}
140+
141+
dispatch:
142+
runs-on: ubuntu-latest
143+
needs: [build-base-image, build-binary-images]
144+
steps:
145+
- name: Repository dispatch
146+
run: |
147+
curl -X POST \
148+
-H "Authorization: token ${{ secrets.DISPATCH_TOKEN_DEV }}" \
149+
-H "Accept: application/vnd.github+json" \
150+
https://api.github.com/repos/adm-metaex/aura-config-dev/dispatches \
151+
-d '{
152+
"event_type": "deploy",
153+
"client_payload": {
154+
"services": "${{ env.PUSH_CONDITION && 'ingester,slot_persister,backfill,api,synchronizer,rocksdb_backup' || '' }}",
155+
"version": "${{ needs.build-base-image.outputs.version }}"
156+
}
157+
}'

.github/workflows/rust.yml

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Rust CI
22

33
on:
44
pull_request:
5-
branches: [ main ]
5+
branches: [main, develop]
66

77
env:
88
CARGO_INCREMENTAL: 0
@@ -13,55 +13,55 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- name: Check out
17-
uses: actions/checkout@v3
18-
19-
- name: Install dependencies
20-
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
21-
22-
- name: Install Rust specific version
23-
uses: actions-rs/toolchain@v1
24-
with:
25-
toolchain: 1.84
26-
profile: minimal
27-
components: clippy, rustfmt
28-
override: true
29-
30-
- name: Restore cargo cache
31-
id: cache-cargo
32-
uses: actions/cache/restore@v4
33-
with:
34-
path: |
35-
~/.cargo/bin/
36-
~/.cargo/registry/index/
37-
~/.cargo/registry/cache/
38-
~/.cargo/git/db/
39-
target/
40-
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
41-
restore-keys: ${{ runner.os }}-cargo-
42-
43-
- name: Append to Cargo.toml
44-
run: |
45-
echo "[profile.dev]" >> Cargo.toml
46-
echo "debug = 0" >> Cargo.toml
47-
48-
- name: Check formatting
49-
run: cargo fmt -- --check
50-
51-
- name: Lint with Clippy
52-
run: cargo clippy --all -- -D warnings --allow=deprecated
53-
54-
- name: Save cargo cache
55-
id: cache-cargo-save
56-
uses: actions/cache/save@v4
57-
with:
58-
path: |
59-
~/.cargo/bin/
60-
~/.cargo/registry/index/
61-
~/.cargo/registry/cache/
62-
~/.cargo/git/db/
63-
target/
64-
key: ${{ steps.cache-cargo.outputs.cache-primary-key }}
16+
- name: Check out
17+
uses: actions/checkout@v3
18+
19+
- name: Install dependencies
20+
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
21+
22+
- name: Install Rust specific version
23+
uses: actions-rs/toolchain@v1
24+
with:
25+
toolchain: 1.85
26+
profile: minimal
27+
components: clippy, rustfmt
28+
override: true
29+
30+
- name: Restore cargo cache
31+
id: cache-cargo
32+
uses: actions/cache/restore@v4
33+
with:
34+
path: |
35+
~/.cargo/bin/
36+
~/.cargo/registry/index/
37+
~/.cargo/registry/cache/
38+
~/.cargo/git/db/
39+
target/
40+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
41+
restore-keys: ${{ runner.os }}-cargo-
42+
43+
- name: Append to Cargo.toml
44+
run: |
45+
echo "[profile.dev]" >> Cargo.toml
46+
echo "debug = 0" >> Cargo.toml
47+
48+
- name: Check formatting
49+
run: cargo fmt -- --check
50+
51+
- name: Lint with Clippy
52+
run: cargo clippy --all -- -D warnings --allow=deprecated
53+
54+
- name: Save cargo cache
55+
id: cache-cargo-save
56+
uses: actions/cache/save@v4
57+
with:
58+
path: |
59+
~/.cargo/bin/
60+
~/.cargo/registry/index/
61+
~/.cargo/registry/cache/
62+
~/.cargo/git/db/
63+
target/
64+
key: ${{ steps.cache-cargo.outputs.cache-primary-key }}
6565

6666
test:
6767
runs-on: ubuntu-latest
@@ -90,7 +90,7 @@ jobs:
9090
- name: Install Rust specific version
9191
uses: actions-rs/toolchain@v1
9292
with:
93-
toolchain: 1.84
93+
toolchain: 1.85
9494
profile: minimal
9595
components: clippy, rustfmt
9696
override: true
@@ -138,4 +138,4 @@ jobs:
138138
MAINNET_RPC_URL: ${{ secrets.SOLANA_MAINNET_RPC_URL }}
139139
ECLIPSE_DEVNET_RPC_URL: ${{ secrets.SOLANA_ECLIPSE_DEVNET_RPC_URL }}
140140
ECLIPSE_MAINNET_RPC_URL: ${{ secrets.SOLANA_ECLIPSE_MAINNET_RPC_URL }}
141-
run: cargo test --features integration_tests -- --nocapture
141+
run: cargo test --features integration_tests -- --nocapture

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ _rocksdb_backup_archives/
3838
/.project
3939
# Used by integration tests
4040
rocks_dump
41+
**/tmp

0 commit comments

Comments
 (0)