Benign rust 98,793 installs Download

snarkvm-ledger-puzzle 4.11.0

“Puzzle for a decentralized virtual machine”

Rust parses JSON text or bytesRust test marker or harness
SHA-2562b430ac8eea1255f588f198973ebfe75f637049b71e7c9b9b5dfd315f3d39e17

Evidence

Header names an upstream project bytes.rs · lines 1–8
1// Copyright (c) 2019-2026 Provable Inc.
2// This file is part of the snarkVM library.
3
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at:
7
8// http://www.apache.org/licenses/LICENSE-2 …
imports console::network::MainnetV0 bytes.rs · lines 31–46
31:42… ut writer)?;
32 self.target.write_le(&mut writer)
33 }
34}
35
36#[cfg(test)]
37mod tests {
38 use super::*;
39 use console::{account::PrivateKey, network::MainnetV0};
40
41 type CurrentNetwork = MainnetV0;
42
43 #[test]
44 fn test_bytes() -> Result<()> {
45 let mut rng = TestRng::default();
46 let private_key = PrivateKey::<CurrentNet …
imports console::prelude::Network lib.rs · lines 20–67
20:25… sole as console;
21
22mod partial_solution;
23pub use partial_solution::*;
24
25mod solution;
26pub use solution::*;
27
28mod solution_id;
29pub use solution_id::*;
30
31mod solutions;
32pub use solutions::*;
33
34use console::{
35 account::Address,
36 algorithms::Sha3_256,
37 collections::kary_merkle_tree::KaryMerkleTree,
38 prelude::{
39 FromBits,
40 Network,
41 Result,
42 anyhow,
43 bail,
44 cfg_into_iter,
45 cfg_iter,
46 cfg_keys,
47 cfg_values,
48 ensure,
49 has_duplicates,
50 },
51 types::U64,
52};
53use snarkvm_utilities::ensure_equals;
54
55use aleo_std::prelude::*;
56use anyhow::Context;
57use core::num::NonZeroUsize;
58use indexmap::IndexMap;
59#[cfg(feature = "locktick")]
60use locktick::parking_lot::RwLock;
61use lru::LruCache;
62#[cfg(not(feature = "locktick"))]
63use parking_lot::RwLock;
64use rand::SeedableRng;
65use rand_chacha::ChaChaRng;
66use std::sync::Arc;
67
imports console::network::Network lib.rs · lines 360–381
⋯4 lines
364}
365
366#[cfg(test)]
367mod tests {
368 use super::*;
369 use console::{
370 account::{Address, PrivateKey},
371 network::Network,
372 prelude::{FromBytes, TestRng, ToBits as TBits, ToBytes, Uniform},
373 types::Field,
374 };
375
376 use anyhow::Result;
377 use core::marker::PhantomData;
378 use rand::{CryptoRng, RngExt, SeedableRng};
379 use rand_chacha::ChaChaRng;
380
381 type CurrentNetwork = console::network::MainnetV0 …
Rust synchronous or async test attribute lib.rs · lines 436–444
436:16… :<CurrentNetwork>::new::<SimplePuzzle<CurrentNetwork>>()
437 }
438
439 #[test]
440 fn test_puzzle() {
441 let mut rng = TestRng::default();
442
443 // Initialize a new puzzle.
444 let puzzle = samp …

Showing the top 5 files — 1 more file (14 regions) not shown.

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.