cargo update

This commit is contained in:
Bryan Stitt 2023-10-06 22:54:18 -07:00
parent 97f7e1673e
commit d38a35903e
4 changed files with 10 additions and 14 deletions

2
Cargo.lock generated
View File

@ -5230,7 +5230,7 @@ checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d"
[[package]]
name = "siwe"
version = "0.5.2"
source = "git+https://github.com/llamanodes/siwe-rs?rev=266f494143a4ea627e1d4090d725a5ef77535f67#266f494143a4ea627e1d4090d725a5ef77535f67"
source = "git+https://github.com/llamanodes/siwe-rs?branch=for_web3_proxy#5866c7a5ce3a7e2a14d247d00f0a5915bc0bbd08"
dependencies = [
"ethers",
"hex",

View File

@ -90,12 +90,13 @@ COPY . .
# TODO: clean needed because of rust upgrade and jenkins caches :'(
RUN --mount=type=cache,target=/root/.cargo/git \
--mount=type=cache,target=/root/.cargo/registry \
--mount=type=cache,target=/app/target \
--mount=type=cache,target=/app/target_test \
set -eux -o pipefail; \
\
[ -e "$(pwd)/payment-contracts/src/contracts/mod.rs" ] || touch "$(pwd)/payment-contracts/build.rs"; \
cargo \
--locked \
fetch
cargo --locked fetch; \
CARGO_TARGET_DIR=target_test cargo --locked fetch
# build tests (done its in own FROM so that it can run in parallel)
FROM rust_with_env as build_tests
@ -106,9 +107,10 @@ COPY --from=rust_nextest /root/.cargo/bin/cargo-nextest* /root/.cargo/bin/
# test the application with cargo-nextest
RUN --mount=type=cache,target=/root/.cargo/git \
--mount=type=cache,target=/root/.cargo/registry \
--mount=type=cache,target=/app/target \
--mount=type=cache,target=/app/target_test \
set -eux -o pipefail; \
\
export CARGO_TARGET_DIR=target_test \
[ -e "$(pwd)/payment-contracts/src/contracts/mod.rs" ] || touch "$(pwd)/payment-contracts/build.rs"; \
RUST_LOG=web3_proxy=trace,info \
cargo \

View File

@ -29,7 +29,7 @@ influxdb2-structmap = { git = "https://github.com/llamanodes/influxdb2/", rev =
# TODO: we can't actually use 0.6 because they want a Provider and we have an Arc<Provider>
# TODO: this has features ethers which probably brings in things. make sure it has the minimal features
siwe = { git = "https://github.com/llamanodes/siwe-rs", rev = "266f494143a4ea627e1d4090d725a5ef77535f67", features = ["ethers", "serde"] }
siwe = { git = "https://github.com/llamanodes/siwe-rs", branch = "for_web3_proxy", features = ["ethers", "serde"] }
# TODO: regex has several "perf" features that we might want to use
# TODO: make sure this uuid version matches sea-orm. PR to put this in their prelude

View File

@ -847,17 +847,11 @@ impl Web3Rpc {
if let Some(ws_provider) = self.ws_provider.load().as_ref() {
// todo: move subscribe_blocks onto the request handle
let error_handler = Some(Level::ERROR.into());
// we don't actually care about params here. we aren't going to use this handle for
let active_request_handle = self
.internal_request::<_, H256>("eth_subscribe", &(), error_handler, None)
.await;
self.wait_for_throttle(Instant::now() + Duration::from_secs(5))
.await?;
let mut pending_txs_sub = ws_provider.subscribe_pending_txs().await?;
drop(active_request_handle);
while let Some(x) = pending_txs_sub.next().await {
if *subscribe_stop_rx.borrow_and_update() {
// TODO: this is checking way too often. have this on a timer instead