Skip to content

Commit 55d82b8

Browse files
committed
feat: enable clarity-wasm for all epochs
1 parent c10dde4 commit 55d82b8

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

stackslib/src/chainstate/stacks/db/transactions.rs

+9-12
Original file line numberDiff line numberDiff line change
@@ -1266,18 +1266,15 @@ impl StacksChainState {
12661266
.expect("BUG: total block cost decreased");
12671267
let sponsor = tx.sponsor_address().map(|a| a.to_account_principal());
12681268

1269-
// Beginning in epoch 3.0, smart contracts are compiled to Wasm
1270-
// and executed using the Wasm runtime.
1271-
debug!("Before Epoch 3.0 check");
1272-
if epoch_id >= StacksEpochId::Epoch30 {
1273-
debug!("Compiling the contract to wasm binary");
1274-
let mut module = compile_contract(contract_analysis.clone()).map_err(|e| {
1275-
Error::ClarityError(clarity_error::Wasm(WasmError::WasmGeneratorError(
1276-
e.message(),
1277-
)))
1278-
})?;
1279-
contract_ast.wasm_module = Some(module.emit_wasm());
1280-
}
1269+
// Compile contracts to Wasm and
1270+
// execute using the Wasm runtime.
1271+
debug!("Compiling the contract to wasm binary");
1272+
let mut module = compile_contract(contract_analysis.clone()).map_err(|e| {
1273+
Error::ClarityError(clarity_error::Wasm(WasmError::WasmGeneratorError(
1274+
e.message(),
1275+
)))
1276+
})?;
1277+
contract_ast.wasm_module = Some(module.emit_wasm());
12811278

12821279
// execution -- if this fails due to a runtime error, then the transaction is still
12831280
// accepted, but the contract does not materialize (but the sender is out their fee).

0 commit comments

Comments
 (0)