diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1fbf6f8..37f4e34 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -11,7 +11,7 @@ env: jobs: build-and-test: name: Build and test programs - runs-on: ubuntu-20.04-32c-128g + runs-on: big-runner-1 steps: # Setup @@ -75,7 +75,7 @@ jobs: verified-build: name: Build Verifiable Artifact - runs-on: ubuntu-20.04-32c-128g + runs-on: big-runner-1 steps: - uses: actions/checkout@v3 with: @@ -98,26 +98,26 @@ jobs: path: | target/deploy/merkle_distributor.so - docker: - name: Build and push docker container - runs-on: ubuntu-20.04-32c-128g - steps: - # Required for docker cache export - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Login to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USER }} - password: ${{ secrets.DOCKERHUB_PWD }} - - - name: Build and push jito-airdrop-api - uses: docker/build-push-action@v4 - with: - push: true - target: jito-airdrop-api - tags: jitolabs/jito-airdrop-api:${{ github.sha }} - cache-from: type=gha - cache-to: type=gha,mode=max - platforms: linux/arm64,linux/x86_64 +# docker: +# name: Build and push docker container +# runs-on: big-runner-1 +# steps: +# # Required for docker cache export +# - name: Set up Docker Buildx +# uses: docker/setup-buildx-action@v2 +# +# - name: Login to Docker Hub +# uses: docker/login-action@v2 +# with: +# username: ${{ secrets.DOCKERHUB_USER }} +# password: ${{ secrets.DOCKERHUB_PWD }} +# +# - name: Build and push jito-airdrop-api +# uses: docker/build-push-action@v4 +# with: +# push: true +# target: jito-airdrop-api +# tags: jitolabs/jito-airdrop-api:${{ github.sha }} +# cache-from: type=gha +# cache-to: type=gha,mode=max +# platforms: linux/arm64,linux/x86_64 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index dd7ae69..7c66a0b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,7 +9,7 @@ env: jobs: release: name: Create the jito programs release - runs-on: ubuntu-20.04-32c-128g + runs-on: big-runner-1 steps: # Setup diff --git a/api/src/router.rs b/api/src/router.rs index 197d6ab..b54f071 100644 --- a/api/src/router.rs +++ b/api/src/router.rs @@ -56,9 +56,9 @@ impl Debug for RouterState { #[instrument] pub fn get_routes(state: Arc, enable_proof_endpoint: bool) -> Router { let middleware = ServiceBuilder::new() - .layer(HandleErrorLayer::new(error::handle_error)) // handle middleware errors explicitly! - .layer(BufferLayer::new(100)) // buffer up to 100 requests in queue - .layer(RateLimitLayer::new(1000, Duration::from_secs(10))) + .layer(HandleErrorLayer::new(error::handle_error)) + .layer(BufferLayer::new(1000)) + .layer(RateLimitLayer::new(10000, Duration::from_secs(1))) .layer(TimeoutLayer::new(Duration::from_secs(20))) .layer(LoadShedLayer::new()) .layer( diff --git a/audit/ottersec_report.pdf b/audit/ottersec_audit.pdf similarity index 59% rename from audit/ottersec_report.pdf rename to audit/ottersec_audit.pdf index 5957e8e..b30ed5c 100644 Binary files a/audit/ottersec_report.pdf and b/audit/ottersec_audit.pdf differ diff --git a/b b/b new file mode 100755 index 0000000..a245e1e --- /dev/null +++ b/b @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# Pushes docker images to container registry +set -eux -o pipefail + +export BUILD_TAG="$(git describe --always --dirty)" + +COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose build --progress=plain diff --git a/docker-compose.yaml b/docker-compose.yaml index 92a3f0f..40dd666 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -3,7 +3,7 @@ version: "3.9" services: # API service to serve points requests jito-airdrop-api: - image: jito-airdrop-api + image: jitolabs/jito-airdrop-api:${BUILD_TAG} build: context: . dockerfile: Dockerfile diff --git a/p b/p new file mode 100755 index 0000000..f453018 --- /dev/null +++ b/p @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +# Pushes docker images to container registry +set -eux -o pipefail + +export BUILD_TAG="$(git describe --always --dirty)" + +COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose push + +echo "pushed build_tag: ${BUILD_TAG}"