Skip to content

Commit

Permalink
Enable only a subset of caches
Browse files Browse the repository at this point in the history
  • Loading branch information
Ancient123 committed Oct 8, 2024
1 parent 74f9d64 commit 3736b09
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 42 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Build
on:
push:
branches:
- main
pull_request:
workflow_dispatch:

Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ name: Docker
on:
push:
branches:
- "main"
pull_request:
workflow_dispatch:

Expand Down Expand Up @@ -40,12 +39,9 @@ jobs:

# Install the cosign tool except on PR
# https://github.com/sigstore/cosign-installer
#- name: Install cosign
# if: github.event_name != 'pull_request'
# uses: sigstore/cosign-installer@v3
# with:
# cosign-release: 'v1.13.1'

- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@v3

# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
Expand All @@ -67,8 +63,6 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
tags: |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# Build and push Docker image with Buildx (don't push on PR)
Expand Down
64 changes: 32 additions & 32 deletions src/rpc_cache_handler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@ use anyhow::Result;
use serde_json::Value;

mod common;
mod debug_trace_block_by_hash;
mod debug_trace_block_by_number;
mod debug_trace_call;
mod debug_trace_transaction;
mod eth_call;
mod eth_chainid;
mod eth_estimate_gas;
mod eth_get_balance;
// mod debug_trace_block_by_hash;
// mod debug_trace_block_by_number;
// mod debug_trace_call;
// mod debug_trace_transaction;
// mod eth_call;
// mod eth_chainid;
// mod eth_estimate_gas;
// mod eth_get_balance;
mod eth_get_block_by_hash;
mod eth_get_block_by_number;
mod eth_get_block_receipts;
mod eth_get_code;
//mod eth_get_block_receipts;
//mod eth_get_code;
mod eth_get_logs;
mod eth_get_storage_at;
mod eth_get_transaction_by_block_hash_and_index;
mod eth_get_transaction_by_block_number_and_index;
mod eth_get_transaction_by_hash;
mod eth_get_transaction_count;
mod eth_get_transaction_receipt;
//mod eth_get_storage_at;
//mod eth_get_transaction_by_block_hash_and_index;
//mod eth_get_transaction_by_block_number_and_index;
//mod eth_get_transaction_by_hash;
//mod eth_get_transaction_count;
//mod eth_get_transaction_receipt;

pub trait RpcCacheHandler: Send + Sync {
fn method_name(&self) -> &'static str;
Expand All @@ -43,24 +43,24 @@ where

pub fn factories() -> Vec<RpcCacheHandlerFactory> {
vec![
get_factory::<debug_trace_block_by_hash::Handler>(),
get_factory::<debug_trace_block_by_number::Handler>(),
get_factory::<debug_trace_call::Handler>(),
get_factory::<debug_trace_transaction::Handler>(),
get_factory::<eth_call::Handler>(),
get_factory::<eth_chainid::Handler>(),
get_factory::<eth_estimate_gas::Handler>(),
get_factory::<eth_get_balance::Handler>(),
//get_factory::<debug_trace_block_by_hash::Handler>(),
//get_factory::<debug_trace_block_by_number::Handler>(),
//get_factory::<debug_trace_call::Handler>(),
//get_factory::<debug_trace_transaction::Handler>(),
//get_factory::<eth_call::Handler>(),
//get_factory::<eth_chainid::Handler>(),
//get_factory::<eth_estimate_gas::Handler>(),
//get_factory::<eth_get_balance::Handler>(),
get_factory::<eth_get_block_by_hash::Handler>(),
get_factory::<eth_get_block_by_number::Handler>(),
get_factory::<eth_get_block_receipts::Handler>(),
get_factory::<eth_get_code::Handler>(),
//get_factory::<eth_get_block_receipts::Handler>(),
//get_factory::<eth_get_code::Handler>(),
get_factory::<eth_get_logs::Handler>(),
get_factory::<eth_get_storage_at::Handler>(),
get_factory::<eth_get_transaction_by_block_hash_and_index::Handler>(),
get_factory::<eth_get_transaction_by_block_number_and_index::Handler>(),
get_factory::<eth_get_transaction_by_hash::Handler>(),
get_factory::<eth_get_transaction_count::Handler>(),
get_factory::<eth_get_transaction_receipt::Handler>(),
//get_factory::<eth_get_storage_at::Handler>(),
//get_factory::<eth_get_transaction_by_block_hash_and_index::Handler>(),
//get_factory::<eth_get_transaction_by_block_number_and_index::Handler>(),
//get_factory::<eth_get_transaction_by_hash::Handler>(),
//get_factory::<eth_get_transaction_count::Handler>(),
//get_factory::<eth_get_transaction_receipt::Handler>(),
]
}

0 comments on commit 3736b09

Please sign in to comment.