Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,180 changes: 1,000 additions & 180 deletions Cargo.lock

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ members = [

[workspace.dependencies]
ab-chacha8 = "0.1.0"
ab-core-primitives = { git = "https://github.com/nazar-pc/abundance", rev = "fc8da9992575a3b33ea9c5c764ea71f926f4592e", default-features = false }
ab-proof-of-space = { git = "https://github.com/nazar-pc/abundance", rev = "fc8da9992575a3b33ea9c5c764ea71f926f4592e", default-features = false }
ab-proof-of-space-gpu = { git = "https://github.com/nazar-pc/abundance", rev = "fc8da9992575a3b33ea9c5c764ea71f926f4592e", default-features = false }
actix-web = { version = "4.9.0", default-features = false }
aes = "0.9.0"
anyhow = "1.0.89"
Expand All @@ -51,7 +54,7 @@ blst = "0.3.13"
bytes = { version = "1.11.1", default-features = false }
bytesize = "2.3.1"
cc = "1.2.62"
chacha20 = { version = "0.10.0", default-features = false }
chacha20 = { version = "0.10.1", default-features = false }
clap = "4.6.1"
console = "0.15.11"
core_affinity = "0.8.1"
Expand Down Expand Up @@ -276,6 +279,7 @@ subspace-networking = { version = "0.1.0", path = "crates/subspace-networking" }
subspace-process = { version = "0.0.1", path = "shared/subspace-process" }
subspace-proof-of-space = { version = "0.1.0", path = "crates/subspace-proof-of-space", default-features = false }
subspace-proof-of-space-gpu = { version = "0.1.0", path = "shared/subspace-proof-of-space-gpu" }
subspace-proof-of-space-wgpu = { version = "0.1.0", path = "shared/subspace-proof-of-space-wgpu" }
subspace-proof-of-time = { version = "0.1.0", path = "crates/subspace-proof-of-time" }
subspace-rpc-primitives = { version = "0.1.0", path = "crates/subspace-rpc-primitives" }
subspace-runtime = { version = "0.1.0", path = "crates/subspace-runtime" }
Expand Down Expand Up @@ -318,6 +322,7 @@ ziggy = { version = "1.7.0", default-features = false }
#
# This list is ordered alphabetically.
[profile.dev.package]
ab-proof-of-space = { opt-level = 3 }
bitvec = { opt-level = 3 }
blake2 = { opt-level = 3 }
blake3 = { opt-level = 3 }
Expand Down Expand Up @@ -444,3 +449,10 @@ substrate-bip39 = "=0.6.0"
# Patch away `libp2p-identity` in our dependency tree with the git version.
# For details see: https://github.com/autonomys/rust-libp2p/blob/676c687c2f7a6e92f8f4f77a6934022aec3ba16c/Cargo.toml#L140-L145
libp2p-identity = { git = "https://github.com/autonomys/rust-libp2p", rev = "676c687c2f7a6e92f8f4f77a6934022aec3ba16c" }

# Point the abundance dependencies at my fork for review; revert to an upstream nazar-pc rev once
# these abundance changes are merged.
[patch."https://github.com/nazar-pc/abundance"]
ab-core-primitives = { git = "https://github.com/vedhavyas/abundance", rev = "6d5c97150b639a8fae80683b180b84c11453545e" }
ab-proof-of-space = { git = "https://github.com/vedhavyas/abundance", rev = "6d5c97150b639a8fae80683b180b84c11453545e" }
ab-proof-of-space-gpu = { git = "https://github.com/vedhavyas/abundance", rev = "6d5c97150b639a8fae80683b180b84c11453545e" }
2 changes: 2 additions & 0 deletions crates/subspace-farmer-components/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ tracing.workspace = true
winapi = "0.3.9"

[dev-dependencies]
anyhow.workspace = true
criterion.workspace = true
futures.workspace = true
subspace-archiving.workspace = true
subspace-proof-of-space.workspace = true
subspace-proof-of-space-wgpu.workspace = true

[[bench]]
name = "plotting"
Expand Down
4 changes: 2 additions & 2 deletions crates/subspace-farmer-components/benches/auditing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ use subspace_farmer_components::sector::{
};
use subspace_kzg::Kzg;
use subspace_proof_of_space::Table;
use subspace_proof_of_space::chia::ChiaTable;
use subspace_proof_of_space::chia_v2::ChiaV2Table;

type PosTable = ChiaTable;
type PosTable = ChiaV2Table;

const MAX_PIECES_IN_SECTOR: u16 = 1000;

Expand Down
4 changes: 2 additions & 2 deletions crates/subspace-farmer-components/benches/plotting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ use subspace_farmer_components::plotting::{CpuRecordsEncoder, PlotSectorOptions,
use subspace_farmer_components::sector::sector_size;
use subspace_kzg::Kzg;
use subspace_proof_of_space::Table;
use subspace_proof_of_space::chia::ChiaTable;
use subspace_proof_of_space::chia_v2::ChiaV2Table;

type PosTable = ChiaTable;
type PosTable = ChiaV2Table;

const MAX_PIECES_IN_SECTOR: u16 = 1000;

Expand Down
4 changes: 2 additions & 2 deletions crates/subspace-farmer-components/benches/proving.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ use subspace_farmer_components::sector::{
SectorContentsMap, SectorMetadata, SectorMetadataChecksummed, sector_size,
};
use subspace_kzg::Kzg;
use subspace_proof_of_space::chia::ChiaTable;
use subspace_proof_of_space::chia_v2::ChiaV2Table;
use subspace_proof_of_space::{Table, TableGenerator};

type PosTable = ChiaTable;
type PosTable = ChiaV2Table;

const MAX_PIECES_IN_SECTOR: u16 = 1000;

Expand Down
4 changes: 2 additions & 2 deletions crates/subspace-farmer-components/benches/reading.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ use subspace_farmer_components::sector::{
use subspace_farmer_components::{FarmerProtocolInfo, ReadAt, ReadAtSync};
use subspace_kzg::Kzg;
use subspace_proof_of_space::Table;
use subspace_proof_of_space::chia::ChiaTable;
use subspace_proof_of_space::chia_v2::ChiaV2Table;

type PosTable = ChiaTable;
type PosTable = ChiaV2Table;

const MAX_PIECES_IN_SECTOR: u16 = 1000;

Expand Down
6 changes: 6 additions & 0 deletions crates/subspace-farmer-components/src/proving.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use std::io;
use subspace_core_primitives::pieces::{PieceOffset, Record};
use subspace_core_primitives::pos::PosSeed;
use subspace_core_primitives::sectors::{SBucket, SectorId};
use subspace_core_primitives::segments::HistorySize;
use subspace_core_primitives::solutions::{ChunkWitness, Solution, SolutionRange};
use subspace_core_primitives::{PublicKey, ScalarBytes};
use subspace_erasure_coding::ErasureCoding;
Expand Down Expand Up @@ -159,6 +160,11 @@ where
self.chunk_candidates.is_empty()
}

/// History size of the sector these candidates belong to.
pub fn history_size(&self) -> HistorySize {
self.sector_metadata.history_size
}

/// Turn solution candidates into actual solutions
pub fn into_solutions<RewardAddress, PosTable, TableGenerator>(
self,
Expand Down
Loading
Loading