Skip to content

Commit d4bf8e9

Browse files
committed
Merge branch 'main' of github.com:pyth-network/pyth-crosschain into devin/1746706324-solana-jito-multiple-endpoints
2 parents 7939a9d + 44b0b50 commit d4bf8e9

39 files changed

+8370
-377
lines changed

.github/workflows/ci-quorum.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Check Quorum
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- .github/workflows/ci-quorum.yml
7+
- apps/quorum/**
8+
push:
9+
branches: [main]
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
defaults:
14+
run:
15+
working-directory: apps/quorum
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: Swatinem/rust-cache@v2
19+
with:
20+
workspaces: "apps/quorum -> target"
21+
- uses: actions-rs/toolchain@v1
22+
with:
23+
toolchain: 1.87.0
24+
components: rustfmt, clippy
25+
override: true
26+
- name: Format check
27+
run: cargo fmt --all -- --check
28+
if: success() || failure()
29+
- name: Clippy check
30+
run: cargo clippy --tests -- --deny warnings
31+
if: success() || failure()
32+
- name: Run executor tests
33+
run: cargo test
34+
if: success() || failure()

.github/workflows/ci-starknet-contract.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@ jobs:
2525
tool-versions: target_chains/starknet/contracts/.tool-versions
2626
- name: Install Starkli
2727
run: curl https://get.starkli.sh | sh && . ~/.config/.starkli/env && starkliup -v $(awk '/starkli/{print $2}' .tool-versions)
28+
- name: Install Rust
29+
uses: actions-rs/toolchain@v1
30+
with:
31+
toolchain: 1.85.0
2832
- name: Install Devnet
29-
run: cargo install starknet-devnet --version $(awk '/starknet-devnet/{print $2}' .tool-versions)
33+
run: cargo +1.85.0 install starknet-devnet --version $(awk '/starknet-devnet/{print $2}' .tool-versions)
3034
- name: Check formatting
3135
run: scarb fmt --check
3236
- name: Run tests

.github/workflows/ci-stylus-check-wasm.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ jobs:
2424
working-directory: target_chains/ethereum/sdk/stylus
2525
steps:
2626
- uses: actions/checkout@v4
27+
- name: Install Rust stable
28+
uses: actions-rs/toolchain@v1
29+
with:
30+
toolchain: stable
2731
- name: Install rust
2832
uses: actions-rust-lang/setup-rust-toolchain@v1
2933
with:
@@ -33,6 +37,6 @@ jobs:
3337
with:
3438
version: nightly
3539
- name: Install cargo-stylus
36-
run: cargo install [email protected]
40+
run: cargo +stable install [email protected]
3741
- name: Run wasm check
3842
run: ./scripts/check-wasm.sh
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Build and Push Entropy Tester Image
2+
on:
3+
push:
4+
tags:
5+
- entropy-tester-v*
6+
pull_request:
7+
paths:
8+
- "apps/entropy-tester/**"
9+
- ".github/workflows/docker-entropy-tester.yml"
10+
- "Dockerfile.node"
11+
workflow_dispatch:
12+
inputs:
13+
dispatch_description:
14+
description: "Dispatch description"
15+
required: true
16+
type: string
17+
permissions:
18+
contents: read
19+
id-token: write
20+
packages: write
21+
env:
22+
REGISTRY: ghcr.io
23+
IMAGE_NAME: pyth-network/entropy-tester
24+
jobs:
25+
entropy-tester-image:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v2
29+
- name: Set image tag to version of the git tag
30+
if: ${{ startsWith(github.ref, 'refs/tags/entropy-tester-v') }}
31+
run: |
32+
PREFIX="refs/tags/entropy-tester-"
33+
VERSION="${GITHUB_REF:${#PREFIX}}"
34+
echo "IMAGE_TAG=${VERSION}" >> "${GITHUB_ENV}"
35+
- name: Set image tag to the git commit hash
36+
if: ${{ !startsWith(github.ref, 'refs/tags/entropy-tester-v') }}
37+
run: |
38+
echo "IMAGE_TAG=${{ github.sha }}" >> "${GITHUB_ENV}"
39+
- name: Log in to the Container registry
40+
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
41+
with:
42+
registry: ${{ env.REGISTRY }}
43+
username: ${{ github.actor }}
44+
password: ${{ secrets.GITHUB_TOKEN }}
45+
- name: Build docker image
46+
run: |
47+
DOCKER_BUILDKIT=1 docker build --build-arg package="@pythnetwork/entropy-tester" -t ${{ env.REGISTRY }}/pyth-network/entropy-tester:${{ env.IMAGE_TAG }} -f Dockerfile.node .
48+
- name: Push docker image
49+
run: |
50+
docker push ${{ env.REGISTRY }}/pyth-network/entropy-tester:${{ env.IMAGE_TAG }}

.github/workflows/docker-quorum.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Build and Push Quorum Image
2+
on:
3+
push:
4+
tags:
5+
- quorum-v*
6+
pull_request:
7+
paths:
8+
- "apps/quorum/**"
9+
workflow_dispatch:
10+
inputs:
11+
dispatch_description:
12+
description: "Dispatch description"
13+
required: true
14+
type: string
15+
permissions:
16+
contents: read
17+
id-token: write
18+
packages: write
19+
env:
20+
REGISTRY: ghcr.io
21+
IMAGE_NAME: pyth-network/quorum
22+
jobs:
23+
quorum-image:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v2
27+
- name: Set image tag to version of the git tag
28+
if: ${{ startsWith(github.ref, 'refs/tags/quorum-v') }}
29+
run: |
30+
PREFIX="refs/tags/quorum-"
31+
VERSION="${GITHUB_REF:${#PREFIX}}"
32+
echo "IMAGE_TAG=${VERSION}" >> "${GITHUB_ENV}"
33+
- name: Set image tag to the git commit hash
34+
if: ${{ !startsWith(github.ref, 'refs/tags/quorum-v') }}
35+
run: |
36+
SHORT_SHA=$(echo "${GITHUB_SHA}" | cut -c1-7)
37+
echo "IMAGE_TAG=sha-${SHORT_SHA}" >> "${GITHUB_ENV}"
38+
- name: Log in to the Container registry
39+
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
40+
with:
41+
registry: ${{ env.REGISTRY }}
42+
username: ${{ github.actor }}
43+
password: ${{ secrets.GITHUB_TOKEN }}
44+
- name: Extract metadata (tags, labels) for Docker
45+
id: metadata_quorum
46+
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
47+
with:
48+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
49+
tags: |
50+
type=raw,value=${{ env.IMAGE_TAG }}
51+
- name: Build and push server docker image
52+
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
53+
with:
54+
context: .
55+
file: "./apps/quorum/Dockerfile"
56+
push: ${{ github.event_name != 'pull_request' }}
57+
tags: ${{ steps.metadata_quorum.outputs.tags }}
58+
labels: ${{ steps.metadata_quorum.outputs.labels }}

.pre-commit-config.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,19 @@ repos:
6969
entry: cargo +1.82.0 clippy --manifest-path ./apps/hermes/server/Cargo.toml --tests -- --deny warnings
7070
pass_filenames: false
7171
files: apps/hermes
72+
# Hooks for Quorum
73+
- id: cargo-fmt-quorum
74+
name: Cargo format for Quorum
75+
language: "rust"
76+
entry: cargo +1.87.0 fmt --manifest-path ./apps/quorum/Cargo.toml --all
77+
pass_filenames: false
78+
files: apps/quorum
79+
- id: cargo-clippy-quorum
80+
name: Cargo clippy for Quorum
81+
language: "rust"
82+
entry: cargo +1.87.0 clippy --manifest-path ./apps/quorum/Cargo.toml --tests -- --deny warnings
83+
pass_filenames: false
84+
files: apps/quorum
7285
# Hooks for Fortuna
7386
- id: cargo-fmt-fortuna
7487
name: Cargo format for Fortuna

apps/entropy-tester/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist

apps/entropy-tester/cli/run.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env node
2+
import { main } from "../dist/index.js";
3+
main().argv;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[
2+
{
3+
"chain-id": "berachain_mainnet",
4+
"interval": "3h"
5+
},
6+
{
7+
"chain-id": "apechain_mainnet",
8+
"interval": "6h"
9+
},
10+
{
11+
"chain-id": "blast",
12+
"interval": "10m"
13+
}
14+
]

apps/entropy-tester/eslint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { nextjs as default } from "@cprussin/eslint-config";

0 commit comments

Comments
 (0)