Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rest of V5 Updates #1217

Merged
merged 60 commits into from
Sep 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
93b7619
base_fee method on runtime
ec2 Jun 17, 2021
c109f75
add beacon looking back to Rand
ec2 Jun 17, 2021
834e0bd
fmt
ec2 Jun 17, 2021
db80529
bump proofs to v8
ec2 Jun 17, 2021
0f1dc97
add verify_aggregate_seals
ec2 Jun 18, 2021
84bd0ce
fmt
ec2 Jun 18, 2021
e5579ee
fix tests
ec2 Jun 21, 2021
4c0a691
fix conformance tests
ec2 Jun 21, 2021
bac8319
fix mock rt
ec2 Jun 22, 2021
bbbd1d7
fmt
ec2 Jun 22, 2021
56920f8
fix conf tests again
ec2 Jun 22, 2021
098c2fa
fix some suggestions
ec2 Jul 5, 2021
83ffdd6
comment
ec2 Jul 5, 2021
abb20cf
remove return
ec2 Jul 5, 2021
5485508
Merge branch 'main' into ec2/v5-runtime
ec2 Jul 5, 2021
d2aac95
implement aggregate proving
ec2 Jul 5, 2021
0e0e990
fmt
ec2 Jul 5, 2021
f207270
fmt
ec2 Jul 5, 2021
b5272b6
lint
ec2 Jul 5, 2021
2f81d51
Merge branch 'main' into ec2/fip13
ec2 Jul 5, 2021
0bf2190
batch precommit
ec2 Jul 12, 2021
b9686ce
clippy
ec2 Jul 12, 2021
5087ad6
constant consensus fault reward
ec2 Jul 12, 2021
04a71d9
Merge branch 'main' into ec2/fip11
ec2 Jul 12, 2021
1f0d125
allow for verifreg topup
ec2 Jul 12, 2021
0d9863f
market cron randomness modify
ec2 Jul 12, 2021
793709c
Merge branch 'ec2/fip8' into ec2/v5
ec2 Jul 12, 2021
1da88b9
Merge branch 'ec2/fip11' into ec2/v5
ec2 Jul 12, 2021
e7862b8
Merge branch 'ec2/fip12' into ec2/v5
ec2 Jul 12, 2021
3a96427
Merge branch 'ec2/fip13' into ec2/v5
ec2 Jul 12, 2021
ade476d
Merge branch 'ec2/market-cron-randomness' into ec2/v5
ec2 Jul 12, 2021
c7408f4
miner interface, state tree version bump, expose v5
ec2 Jul 12, 2021
90ff1f6
remove placeholder epochs, add hyperdrive epoch
ec2 Jul 12, 2021
057061e
update code id
ec2 Jul 12, 2021
d8b944f
update interface for all the other actors
ec2 Jul 12, 2021
238c29d
fix aggregate commit
ec2 Jul 12, 2021
5598001
convert sector id
ec2 Jul 12, 2021
0c45a30
some fixes
ec2 Jul 13, 2021
dbc0480
fix the fixs
ec2 Jul 13, 2021
995f038
fix pre_commit_due
ec2 Jul 13, 2021
4c83836
collision policy
ec2 Jul 13, 2021
8a37622
change the sort
ec2 Jul 13, 2021
8365947
cargo lock proofs update
ec2 Jul 13, 2021
fffe716
UNDO THIS COMMIT LATER: Print Deadline State
ec2 Jul 13, 2021
5f01f9f
UNDO THIS COMMIT AS WELL
ec2 Jul 13, 2021
e2be521
remove redundant info read
ec2 Jul 16, 2021
5889c81
Fix warnings. (#1198)
cryptoquick Jul 23, 2021
8b657af
check for max length on encoded bitfields
ec2 Aug 10, 2021
27ebdd6
Merge branch 'main' into ec2/v5
ec2 Aug 11, 2021
0122366
Merge branch 'main' into ec2/v5
ec2 Aug 24, 2021
a26db9e
fmt
ec2 Aug 24, 2021
c7aa238
some cleanup
ec2 Aug 24, 2021
93ba7a5
catch_unwind
Aug 31, 2021
f67e521
Linter fix.
cryptoquick Sep 1, 2021
f6bece1
Add some missing docs to the rest of v5 updates (#1224)
cryptoquick Sep 1, 2021
ecd135f
fix policies
ec2 Sep 23, 2021
4167718
Merge branch 'ec2/proofpanic' into ec2/v5
ec2 Sep 23, 2021
4d96774
clean runtime
ec2 Sep 23, 2021
30fb135
bigint version bump
ec2 Sep 23, 2021
87137d5
Merge branch 'main' into ec2/v5
ec2 Sep 23, 2021
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
83 changes: 57 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion blockchain/state_manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ bitfield = { package = "forest_bitfield", version = "0.1" }
serde = { version = "1.0", features = ["derive"] }
num-traits = "0.2.11"
tokio = { version = "1.0", features = ["sync"] }
filecoin-proofs-api = { version = "8", features = ["blst"], default_features = false }
filecoin-proofs-api = { version = "9", features = ["blst"], default_features = false }
futures = "0.3.5"
runtime = { package = "forest_runtime", version = "0.2" }
lazy_static = "1.4"
Expand Down
4 changes: 2 additions & 2 deletions node/rpc/src/chain_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ where
DomainSeparationTag::from_i64(pers).ok_or("invalid DomainSeparationTag")?,
epoch,
&base64::decode(entropy)?,
epoch <= networks::UPGRADE_PLACEHOLDER_HEIGHT,
epoch <= networks::UPGRADE_HYPERDRIVE_HEIGHT,
)
.await?)
}
Expand All @@ -301,7 +301,7 @@ where
DomainSeparationTag::from_i64(pers).ok_or("invalid DomainSeparationTag")?,
epoch,
&base64::decode(entropy)?,
epoch <= networks::UPGRADE_PLACEHOLDER_HEIGHT,
epoch <= networks::UPGRADE_HYPERDRIVE_HEIGHT,
)
.await?)
}
6 changes: 6 additions & 0 deletions node/rpc/src/state_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,12 @@ pub(crate) async fn state_miner_sector_allocated<
.get::<bitfield::BitField>(&m.allocated_sectors)?
.ok_or("allocated sectors bitfield not found")?
.get(sector_num as usize),
miner::State::V5(m) => data
.chain_store
.db
.get::<bitfield::BitField>(&m.allocated_sectors)?
.ok_or("allocated sectors bitfield not found")?
.get(sector_num as usize),
};

Ok(allocated_sectors)
Expand Down
2 changes: 1 addition & 1 deletion types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ chrono = "0.4.9"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0.56"
commcid = { path = "../utils/commcid", version = "0.1.1", optional = true }
filecoin-proofs-api = { version = "8", features = ["blst"], default_features = false, optional = true }
filecoin-proofs-api = { version = "9", features = ["blst"], default_features = false, optional = true }
vm = { package = "forest_vm", version = "0.3" }
cid = { package = "forest_cid", features = ["cbor"], version = "0.3" }
num-bigint = { path = "../utils/bigint", package = "forest_bigint", version = "0.1.1" }
Expand Down
2 changes: 2 additions & 0 deletions types/networks/src/devnet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ pub const UPGRADE_ACTORS_V3_HEIGHT: ChainEpoch = 550321;
pub const UPGRADE_NORWEGIAN_HEIGHT: ChainEpoch = 665280;
/// V12 network upgrade TODO
pub const UPGRADE_ACTORS_V4_HEIGHT: ChainEpoch = 999999;
/// V13 network upgrade TODO
pub const UPGRADE_HYPERDRIVE_HEIGHT: ChainEpoch = 1000000;

pub const UPGRADE_PLACEHOLDER_HEIGHT: ChainEpoch = 9999999;

Expand Down
2 changes: 2 additions & 0 deletions types/networks/src/interopnet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ pub const UPGRADE_ACTORS_V3_HEIGHT: ChainEpoch = 999999998;
pub const UPGRADE_NORWEGIAN_HEIGHT: ChainEpoch = 999999999;
/// V12 network upgrade TODO
pub const UPGRADE_ACTORS_V4_HEIGHT: ChainEpoch = 999999999;
/// V13 network upgrade TODO
pub const UPGRADE_HYPERDRIVE_HEIGHT: ChainEpoch = 999999999;

pub const UPGRADE_PLACEHOLDER_HEIGHT: ChainEpoch = 9999999;

Expand Down
6 changes: 5 additions & 1 deletion types/networks/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ struct DrandPoint<'a> {
pub config: &'a DrandConfig<'a>,
}

const VERSION_SCHEDULE: [Upgrade; 12] = [
const VERSION_SCHEDULE: [Upgrade; 13] = [
Upgrade {
height: UPGRADE_BREEZE_HEIGHT,
network: NetworkVersion::V1,
Expand Down Expand Up @@ -103,6 +103,10 @@ const VERSION_SCHEDULE: [Upgrade; 12] = [
height: UPGRADE_ACTORS_V4_HEIGHT,
network: NetworkVersion::V12,
},
Upgrade {
height: UPGRADE_HYPERDRIVE_HEIGHT,
network: NetworkVersion::V13,
},
];

/// Gets network version from epoch using default Mainnet schedule.
Expand Down
2 changes: 2 additions & 0 deletions types/networks/src/mainnet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ pub const UPGRADE_ACTORS_V3_HEIGHT: ChainEpoch = 550321;
pub const UPGRADE_NORWEGIAN_HEIGHT: ChainEpoch = 665280;
/// V12 network upgrade
pub const UPGRADE_ACTORS_V4_HEIGHT: ChainEpoch = 712320;
/// V13 network upgrade
pub const UPGRADE_HYPERDRIVE_HEIGHT: ChainEpoch = 892800;

pub const UPGRADE_PLACEHOLDER_HEIGHT: ChainEpoch = 9999999;

Expand Down
4 changes: 3 additions & 1 deletion types/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ pub enum StateTreeVersion {
V1,
/// Corresponds to actors = v3
V2,
/// Corresponds to actors >= v4
/// Corresponds to actors = v4
V3,
/// Corresponds to actors >= v5
V4,
}

/// State root information. Contains information about the version of the state tree,
Expand Down
7 changes: 3 additions & 4 deletions types/src/verifier/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,12 @@ pub trait ProofVerifier {
}
let spt: proofs::RegisteredSealProof = aggregate.seal_proof.try_into()?;
let prover_id = prover_id_from_u64(aggregate.miner);

struct AggregationInputs {
// replica
commr: [u8; 32],
// data
commd: [u8; 32],
sector_id: u64,
sector_id: SectorId,
ticket: [u8; 32],
seed: [u8; 32],
}
Expand All @@ -80,7 +79,7 @@ pub trait ProofVerifier {
Ok(AggregationInputs {
commr,
commd,
sector_id: info.sector_number,
sector_id: SectorId::from(info.sector_number),
ticket: info.randomness.0,
seed: info.interactive_randomness.0,
})
Expand All @@ -95,7 +94,7 @@ pub trait ProofVerifier {
input.commr,
input.commd,
prover_id,
input.sector_id.try_into()?,
input.sector_id,
input.ticket,
input.seed,
)
Expand Down
Loading