Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPC456 refactoring the code to add new calculation algo #5

Merged
merged 8 commits into from
Aug 27, 2024
7 changes: 7 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Overview

- Summary of changes

## Testing

- Testing performed to validate the changes
54 changes: 54 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: CI

on:
pull_request:
branches: [main]

jobs:

changes:
runs-on: ubuntu-latest
outputs:
fee-estimator: ${{ steps.filter.outputs.fee-estimator}}
steps:
- uses: actions/checkout@v3
- uses: dorny/[email protected]
id: filter
with:
filters: |
fee-estimator:
- '*/**'

fee-estimator-tests:
needs: changes
if: ${{ needs.changes.outputs.fee-estimator == 'true' }}
runs-on: ubuntu-latest
env:
RUST_TOOLCHAIN: stable
CARGO_INCREMENTAL: 0
SCCACHE_GHA_ENABLED: 'true'
RUSTC_WRAPPER: 'sccache'
ENV: 'test'
steps:
- uses: actions/checkout@v4
- name: Cleanup Apt
run: sudo find /var/lib/apt/lists/ -type 'f' -name 'archive*' -delete && sudo apt-get update
- uses: rui314/setup-mold@v1
with:
mold-version: 1.1.1
make-default: true
- name: Ensure we use Mold
run: sudo ln -s /usr/local/bin/ld.mold /usr/bin/ld.lld
- name: Install rust + caching
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: '-C link-arg=-fuse-ld=lld'
components: rustfmt, clippy
- name: Set up sccache
uses: mozilla-actions/[email protected]
- name: Clear sccache stats
run: sccache --zero-stats
- name: Run Tests
run: |
cargo test -- --nocapture

74 changes: 72 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,72 @@
.vscode/
target/
# Javascript/Typescript
node_modules/
dist/
build/
coverage/
vendor/

# Node Logs
logs
*.log
npm-debug.log*
AWSCLIV2.pkg

# Mac
**/.DS_Store

# IDEs
**/.vscode
**/.idea/

# Services
ts-services/parser-lambda/parser/test/data/local/*
ts-services/parser-lambda/parser/test/output/*
ts-services/parser-lambda/parser/playground.ts

# Secrets
ts-services/dev-api-lambda/crypto-billing/*_secrets.ts
infra/ansible/vars/**/*-secrets.yaml
infra/ansible/vars/**/*-secrets.yml
infra/ansible/photon/vars/*-secrets.yaml
infra/ansible/photon/vars/*-secrets.yml
infra/ansible/rpc/templates/bt-creds*.json

# Rust
**/target/

# CPU profiles
*.cpuprofile

# Built helm charts
infra/**/*.tgz

.gradle
.m2
bin

# Build output directies
/target
*/target
/build
*/build

# Local Redis
dump.rdb

infra/ansible/roles/Datadog.datadog
infra/ansible/photon/roles/datadog.datadog


scripts/data

# Jupyter notebooks
*.ipynb

# Personal Playground
personal_playground


# Used for local deployments of RPC operator
/rpc-operator/
**/systest/*.json
**/router-benchmarks/*.json
4 changes: 1 addition & 3 deletions src/grpc_geyser.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use std::sync::atomic::Ordering;
use std::sync::Arc;
use std::time::Instant;
use std::{collections::HashMap, time::Duration};

use cadence_macros::statsd_count;
use futures::{future::TryFutureExt, sink::SinkExt, stream::StreamExt};
use futures::{sink::SinkExt, stream::StreamExt};
use rand::distributions::Alphanumeric;
use rand::Rng;
use tokio::time::sleep;
Expand Down
Loading
Loading