Skip to content

Commit

Permalink
Merge pull request #298 from monadicus/chore-misc
Browse files Browse the repository at this point in the history
chore: misc cleanup
  • Loading branch information
Meshiest authored Oct 25, 2024
2 parents 10a90d2 + 7a5f2f6 commit dc30271
Show file tree
Hide file tree
Showing 12 changed files with 1,971 additions and 712 deletions.
362 changes: 94 additions & 268 deletions Cargo.lock

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ lazysort = "0.2"
lazy_static = "1.5"
lasso = { version = "0.7", features = ["multi-threaded"] }
local-ip-address = "0.6"
metrics-exporter-prometheus = "0.15"
metrics-exporter-prometheus = "0.13"
nix = { version = "0.29", features = ["process"] }
num_cpus = "1.16"
paste = "1.0"
Expand Down Expand Up @@ -117,25 +117,25 @@ url = "2.5"
uuid = { version = "1.10", default-features = false }
wildmatch = "2.4"

# snops-checkpoint = { path = "./crates/snops-checkpoint" }
# snops-common = { path = "./crates/snops-common" }
snops-checkpoint = { path = "./crates/snops-checkpoint" }
snops-common = { path = "./crates/snops-common" }

snops-checkpoint = { version = "0.1" }
snops-common = { version = "0.1" }
# snops-checkpoint = { version = "0.1" }
# snops-common = { version = "0.1" }

# snarkos-account = { path = "../snarkos/account" }
# snarkos-node = { path = "../snarkos/node" }
# snarkvm = { path = "../snarkvm", features = ["rocks"] }
# snarkos-node-metrics = { path = "../snarkos/node/metrics" }

snarkos-account = { version = "3.0" }
snarkos-node = { version = "3.0" }
snarkos-node-metrics = { version = "3.0" }
snarkvm = { version = "1.0", features = ["rocks"] }
# snarkos-account = { version = "3.0" }
# snarkos-node = { version = "3.0" }
# snarkos-node-metrics = { version = "3.0" }
# snarkvm = { version = "1.0", features = ["rocks"] }

# snarkos-account = { git = "https://github.com/AleoNet/snarkOS", rev = "805bade" }
# snarkos-node = { git = "https://github.com/AleoNet/snarkOS", rev = "805bade" }
# snarkos-node-metrics = { git = "https://github.com/AleoNet/snarkOS", rev = "805bade" }
# snarkvm = { git = "https://github.com/AleoNet/snarkVM", rev = "5bb50a8", features = [
# "rocks",
# ] }
snarkos-account = { git = "https://github.com/AleoNet/snarkOS", rev = "ba2ce9a" }
snarkos-node = { git = "https://github.com/AleoNet/snarkOS", rev = "ba2ce9a" }
snarkos-node-metrics = { git = "https://github.com/AleoNet/snarkOS", rev = "ba2ce9a" }
snarkvm = { git = "https://github.com/AleoNet/snarkVM", rev = "dea322b", features = [
"rocks",
] }
1 change: 1 addition & 0 deletions crates/aot/src/runner/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ impl<N: Network> Runner<N> {
genesis,
None,
storage_mode.clone(),
false,
shutdown,
)
.await?
Expand Down
1 change: 1 addition & 0 deletions crates/snops-agent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ tracing-appender.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true
url.workspace = true
rustls = { version = "0.23.15", features = ["ring"] }
4 changes: 4 additions & 0 deletions crates/snops-agent/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ fn make_env_filter(level: LevelFilter) -> EnvFilter {

#[tokio::main]
async fn main() {
rustls::crypto::ring::default_provider()
.install_default()
.expect("Failed to install rustls crypto provider");

let (stdout, _guard) = tracing_appender::non_blocking(std::io::stdout());
let start_time = Instant::now();

Expand Down
2 changes: 1 addition & 1 deletion scripts/agent_watch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
cargo watch -x 'build --profile release-big -p snops-agent' \
-w ./crates/snops-agent \
-w ./crates/snops-common \
-w ./crates/checkpoint
-w ./crates/snops-checkpoint
2 changes: 1 addition & 1 deletion scripts/control_plane_watch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
cargo watch -x 'run -p snops' \
-w ./crates/snops \
-w ./crates/snops-common \
-w ./crates/checkpoint
-w ./crates/snops-checkpoint
2 changes: 1 addition & 1 deletion scripts/control_plane_watch_prom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
cargo watch -x 'run -p snops -- --prometheus http://127.0.0.1:9090 --loki http://127.0.0.1:3100' \
-w ./crates/snops \
-w ./crates/snops-common \
-w ./crates/checkpoint
-w ./crates/snops-checkpoint
7 changes: 5 additions & 2 deletions scripts/measure_tps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

ENDPOINT="$1"
NUM_BLOCKS="$2"
if [ -z "$NETWORK"]; then
NETWORK="testnet"
fi

# check if mode is client, validator, or prover
if [ -z "$ENDPOINT" ]; then
Expand All @@ -14,7 +17,7 @@ if [ -z "$NUM_BLOCKS" ]; then
NUM_BLOCKS=10
fi

HEIGHT="$(curl -s $ENDPOINT/mainnet/latest/height)"
HEIGHT="$(curl -s $ENDPOINT/$NETWORK/latest/height)"
if [ -z "$HEIGHT" ]; then
echo "error: failed to get height from $ENDPOINT"
exit 1
Expand Down Expand Up @@ -48,7 +51,7 @@ prev_block_time=""

# get all the blocks from (HEIGHT-NUM_BLOCKS) to HEIGHT
for i in $(seq $((HEIGHT-NUM_BLOCKS+1)) $HEIGHT); do
block="$(curl -s $ENDPOINT/mainnet/block/$i)"
block="$(curl -s $ENDPOINT/$NETWORK/block/$i)"

# update timestamps
LAST_TIMESTAMP="$(echo $block | jq '.header.metadata.timestamp')"
Expand Down
Loading

0 comments on commit dc30271

Please sign in to comment.