Skip to content
Merged
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
8 changes: 4 additions & 4 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -797,9 +797,9 @@ dependencies = [

[[package]]
name = "clvm-fuzzing"
version = "0.18.0"
version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "edfac8b7af2c7202157ce59439a63882da45492dc414a7e4e15b8590b6d08b88"
checksum = "de29478366d9c96ef90eb2690d1faef52805f5586701f4e7d079fa60cba14d5c"
dependencies = [
"anyhow",
"arbitrary",
Expand Down Expand Up @@ -862,9 +862,9 @@ dependencies = [

[[package]]
name = "clvmr"
version = "0.18.0"
version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05a2651e364d36ec9a9848c819e763c892477317b5887fa140085ae79fc0bc4f"
checksum = "3a9d2342687e3210c4b7f8556966ee80e4106d451dd4d8b14b1e446412c640a4"
dependencies = [
"bitflags",
"bitvec",
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ chia-puzzle-types-fuzz = { path = "./crates/chia-puzzle-types/fuzz", version = "
clvm-traits-fuzz = { path = "./crates/clvm-traits/fuzz", version = "0.46.0" }
clvm-utils-fuzz = { path = "./crates/clvm-utils/fuzz", version = "0.46.0" }
blst = { version = "0.3.16", features = ["portable"] }
clvmr = "0.18.0"
clvm-fuzzing = "0.18.0"
clvmr = "0.19.0"
clvm-fuzzing = "0.19.0"
syn = "2.0.101"
quote = "1.0.40"
proc-macro2 = "1.0.95"
Expand Down
14 changes: 14 additions & 0 deletions crates/chia-consensus/src/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ bitflags! {
const RELAXED_BLS = 0x0008;
const LIMIT_SOFTFORK = 0x0010;
const ENABLE_GC = 0x0020;
const LIMITS = 0x0040;
const ENABLE_KECCAK_OPS_OUTSIDE_GUARD = 0x0100;
const DISABLE_OP = 0x0200;
const ENABLE_SHA256_TREE = 0x0400;
const ENABLE_SECP_OPS = 0x0800;
const MALACHITE = 0x1000;
const NEW_COST_MODEL = 0x2000;

// Consensus flags
/// Skip validating AGG_SIG / condition signatures.
Expand Down Expand Up @@ -98,6 +100,12 @@ impl ConsensusFlags {
if clvm.contains(ClvmFlags::MALACHITE) {
out = out.union(ConsensusFlags::MALACHITE);
}
if clvm.contains(ClvmFlags::NEW_COST_MODEL) {
out = out.union(ConsensusFlags::NEW_COST_MODEL);
}
if clvm.contains(ClvmFlags::LIMITS) {
out = out.union(ConsensusFlags::LIMITS);
}
out
}

Expand Down Expand Up @@ -139,6 +147,12 @@ impl ConsensusFlags {
if self.contains(ConsensusFlags::MALACHITE) {
out.insert(ClvmFlags::MALACHITE);
}
if self.contains(ConsensusFlags::NEW_COST_MODEL) {
out.insert(ClvmFlags::NEW_COST_MODEL);
}
if self.contains(ConsensusFlags::LIMITS) {
out.insert(ClvmFlags::LIMITS);
}
out
}
}
Expand Down
8 changes: 5 additions & 3 deletions crates/chia-consensus/src/spendbundle_validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,13 @@ pub fn get_flags_for_height_and_constants(
flags |= ConsensusFlags::ENABLE_KECCAK_OPS_OUTSIDE_GUARD
| ConsensusFlags::COST_CONDITIONS
| ConsensusFlags::ENABLE_SECP_OPS
| ConsensusFlags::NEW_COST_MODEL
| ConsensusFlags::RELAXED_BLS;
}

if prev_tx_height >= constants.soft_fork8_height {
} else if prev_tx_height >= constants.soft_fork8_height {
// once the hard fork activates, we no longer apply the limits, nor
// disable the operators
flags |= ConsensusFlags::DISABLE_OP;
flags |= ConsensusFlags::LIMITS;
}

if prev_tx_height >= constants.soft_fork9_height {
Expand Down
Loading