Skip to content

Commit

Permalink
Merge pull request #4 from jito-foundation/lb/increase_rate_limits
Browse files Browse the repository at this point in the history
Increase rate limits, update CI, and add updated osec report with new commit
  • Loading branch information
buffalu authored Dec 8, 2023
2 parents a48d51c + af232fe commit 97e134a
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 30 deletions.
50 changes: 25 additions & 25 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions api/src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ impl Debug for RouterState {
#[instrument]
pub fn get_routes(state: Arc<RouterState>, 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(
Expand Down
Binary file not shown.
7 changes: 7 additions & 0 deletions b
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions p
Original file line number Diff line number Diff line change
@@ -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}"

0 comments on commit 97e134a

Please sign in to comment.