diff --git a/etherlink/kernel_evm/evm_evaluation/src/evalhost.rs b/etherlink/kernel_evm/evm_evaluation/src/evalhost.rs index d4260a03f600a168fa4659e12eee8855fb2cdc07..df8e9849936d08b3fbfbfd336e4345fecfe3527b 100644 --- a/etherlink/kernel_evm/evm_evaluation/src/evalhost.rs +++ b/etherlink/kernel_evm/evm_evaluation/src/evalhost.rs @@ -127,7 +127,6 @@ unsafe impl SmartRollupCore for EvalHost { self.host.reveal_metadata(destination_addr, max_bytes) } - #[cfg(feature = "proto-alpha")] unsafe fn reveal( &self, _payload_addr: *const u8, diff --git a/etherlink/kernel_evm/kernel/src/safe_storage.rs b/etherlink/kernel_evm/kernel/src/safe_storage.rs index 2df7b5dcbfd9b487b81eb06e93a091556a06edb6..99dd9afb71b44da6efb1ebce0d2bd662a4863fd4 100644 --- a/etherlink/kernel_evm/kernel/src/safe_storage.rs +++ b/etherlink/kernel_evm/kernel/src/safe_storage.rs @@ -7,7 +7,6 @@ use crate::internal_storage::{ExtendedRuntime, InternalRuntime}; use tezos_smart_rollup_core::PREIMAGE_HASH_SIZE; -#[cfg(feature = "proto-alpha")] use tezos_smart_rollup_host::dal_parameters::RollupDalParameters; use tezos_smart_rollup_host::{ input::Message, @@ -185,7 +184,6 @@ impl Runtime for SafeStorage<&mut Host, &mut Intern self.host.reveal_metadata() } - #[cfg(all(feature = "alloc", feature = "proto-alpha"))] fn reveal_dal_page( &self, published_level: i32, @@ -197,7 +195,6 @@ impl Runtime for SafeStorage<&mut Host, &mut Intern .reveal_dal_page(published_level, slot_index, page_index, destination) } - #[cfg(feature = "proto-alpha")] fn reveal_dal_parameters(&self) -> RollupDalParameters { self.host.reveal_dal_parameters() } diff --git a/src/kernel_sdk/CHANGES.md b/src/kernel_sdk/CHANGES.md index 35e98a269adbdb1b949742d0cd923fda0a481ddd..39a3d3a5fdaae3a0163ec99fb7aff3ec3e445e15 100644 --- a/src/kernel_sdk/CHANGES.md +++ b/src/kernel_sdk/CHANGES.md @@ -17,6 +17,7 @@ - Add `tezos_smart_rollup::entrypoint` module for kernel entrypoint configuration & macros. - Add `entrypoint::main` procedural macro to mark the kernel entrypoint function. - Add `extra` feature flag, for functionalility not-expected to be used by kernels directly. +- Remove the `proto-alpha` flag restriction on DAL host functions. ### Installer client/kernel diff --git a/src/kernel_sdk/core/src/rollup_host.rs b/src/kernel_sdk/core/src/rollup_host.rs index 7af71709fcc7ec6c6dccff3abf065cbc082bdbcf..3e722bad45f3103a6d13741cc73bac7b6c0e0904 100644 --- a/src/kernel_sdk/core/src/rollup_host.rs +++ b/src/kernel_sdk/core/src/rollup_host.rs @@ -120,7 +120,6 @@ unsafe impl SmartRollupCore for RollupHost { core::reveal_preimage(hash_addr, hash_len, destination_addr, max_bytes) } - #[cfg(feature = "proto-alpha")] unsafe fn reveal( &self, payload_addr: *const u8, diff --git a/src/kernel_sdk/core/src/smart_rollup_core.rs b/src/kernel_sdk/core/src/smart_rollup_core.rs index a492c6c19e193bc10902417a8ccac4019a7d79ce..cad442896defb14670ae93ae33ce0b6d5e8deab0 100644 --- a/src/kernel_sdk/core/src/smart_rollup_core.rs +++ b/src/kernel_sdk/core/src/smart_rollup_core.rs @@ -135,7 +135,6 @@ extern "C" { /// `payload_len` is the same as the one used by the Tezos protocol. /// /// Returns the size of the data loaded in memory. - #[cfg(feature = "proto-alpha")] pub fn reveal( payload_addr: *const u8, payload_len: usize, @@ -324,7 +323,6 @@ pub unsafe trait SmartRollupCore { /// - `payload_len` must be the length of the slice. /// - `destination_addr `must point to a mutable slice of bytes with /// `capacity >= max_bytes`. - #[cfg(feature = "proto-alpha")] unsafe fn reveal( &self, payload_addr: *const u8, @@ -497,7 +495,6 @@ mod riscv64_hermit { unimplemented!() } - #[cfg(feature = "proto-alpha")] pub unsafe fn reveal( _payload_addr: *const u8, _payload_len: usize, diff --git a/src/kernel_sdk/entrypoint/src/host.rs b/src/kernel_sdk/entrypoint/src/host.rs index 7228cc2718dc2226848601acd163aa056b7f1166..29dd0d7f4eeb48eb8f49c3ccfedcce27ba3aa160 100644 --- a/src/kernel_sdk/entrypoint/src/host.rs +++ b/src/kernel_sdk/entrypoint/src/host.rs @@ -123,7 +123,6 @@ unsafe impl SmartRollupCore for RollupHostWithInMemoryStorage { .reveal_preimage(hash_addr, hash_len, destination_addr, max_bytes) } - #[cfg(feature = "proto-alpha")] unsafe fn reveal( &self, payload_addr: *const u8, diff --git a/src/kernel_sdk/host/src/runtime.rs b/src/kernel_sdk/host/src/runtime.rs index 615afc8b4fb9903c714282b167cf3629d15c5230..dc18b80e78571ea470da94fbe2a175a4b90672e2 100644 --- a/src/kernel_sdk/host/src/runtime.rs +++ b/src/kernel_sdk/host/src/runtime.rs @@ -12,7 +12,6 @@ use alloc::vec::Vec; use tezos_smart_rollup_core::{SmartRollupCore, PREIMAGE_HASH_SIZE}; -#[cfg(feature = "proto-alpha")] use crate::dal_parameters::RollupDalParameters; #[cfg(feature = "alloc")] use crate::input::Message; @@ -21,7 +20,6 @@ use crate::metadata::RollupMetadata; use crate::path::{Path, RefPath}; #[cfg(not(feature = "alloc"))] use crate::path::{Path, RefPath}; -#[cfg(feature = "proto-alpha")] use crate::DAL_PARAMETERS_SIZE; use crate::{Error, METADATA_SIZE}; #[cfg(feature = "alloc")] @@ -191,7 +189,7 @@ pub trait Runtime { ) -> Result; /// Reveal a DAL page. - #[cfg(all(feature = "alloc", feature = "proto-alpha"))] + #[cfg(feature = "alloc")] fn reveal_dal_page( &self, published_level: i32, @@ -201,7 +199,6 @@ pub trait Runtime { ) -> Result; /// Reveal the DAL parameters. - #[cfg(feature = "proto-alpha")] fn reveal_dal_parameters(&self) -> RollupDalParameters; /// Return the size of value stored at `path` @@ -598,7 +595,7 @@ where RollupMetadata::from(destination) } - #[cfg(all(feature = "alloc", feature = "proto-alpha"))] + #[cfg(feature = "alloc")] fn reveal_dal_page( &self, published_level: i32, @@ -631,7 +628,6 @@ where } } - #[cfg(feature = "proto-alpha")] fn reveal_dal_parameters(&self) -> RollupDalParameters { let mut destination = [0u8; DAL_PARAMETERS_SIZE]; // This will match the encoding declared for revealing DAL parameters in the Tezos protocol. @@ -754,7 +750,6 @@ fn check_path_exists( #[cfg(test)] mod tests { use super::{Runtime, RuntimeError, PREIMAGE_HASH_SIZE}; - #[cfg(feature = "proto-alpha")] use crate::{dal_parameters::RollupDalParameters, DAL_PARAMETERS_SIZE}; use crate::{ input::Message, @@ -1345,7 +1340,6 @@ mod tests { } #[test] - #[cfg(feature = "proto-alpha")] fn reveal_dal_parameters_ok() { // Arrange let expected_dal_parameters = RollupDalParameters { diff --git a/src/kernel_sdk/mock/src/host.rs b/src/kernel_sdk/mock/src/host.rs index b57684ededc079d605ec9c4a122d7f2a6fcfa8a6..9ac2bab831698d5cfd74d51a99b34e19e20659ef 100644 --- a/src/kernel_sdk/mock/src/host.rs +++ b/src/kernel_sdk/mock/src/host.rs @@ -193,7 +193,6 @@ unsafe impl SmartRollupCore for MockHost { metadata.len().try_into().unwrap() } - #[cfg(feature = "proto-alpha")] unsafe fn reveal( &self, _payload_addr: *const u8, diff --git a/src/kernel_sdk/sdk/src/entrypoint/internal/static_input_host.rs b/src/kernel_sdk/sdk/src/entrypoint/internal/static_input_host.rs index 7b9fe5096c5879096632101f7d04f0aa181dd203..c71c17013183249baca5b5f1c7c84ada85141a7e 100644 --- a/src/kernel_sdk/sdk/src/entrypoint/internal/static_input_host.rs +++ b/src/kernel_sdk/sdk/src/entrypoint/internal/static_input_host.rs @@ -12,7 +12,6 @@ use crate::core_unsafe::PREIMAGE_HASH_SIZE; use crate::host::{Runtime, RuntimeError, ValueType}; use crate::storage::path::Path; -#[cfg(feature = "proto-alpha")] use crate::types::RollupDalParameters; use crate::types::{Message, RollupMetadata}; use crate::utils::inbox::{file::InboxFile, Inbox, InboxBuilder}; @@ -205,7 +204,6 @@ impl<'runtime, R: Runtime> Runtime for StaticInputHost<'runtime, R> { self.host.runtime_version() } - #[cfg(feature = "proto-alpha")] #[inline(always)] fn reveal_dal_page( &self, @@ -218,7 +216,6 @@ impl<'runtime, R: Runtime> Runtime for StaticInputHost<'runtime, R> { .reveal_dal_page(published_level, slot_index, page_index, destination) } - #[cfg(feature = "proto-alpha")] #[inline(always)] fn reveal_dal_parameters(&self) -> RollupDalParameters { self.host.reveal_dal_parameters() diff --git a/src/kernel_sdk/sdk/src/lib.rs b/src/kernel_sdk/sdk/src/lib.rs index 27ab0e41af7aa6a2184a77e0644e4a2557580f4f..e3ed495f0923443207c1b15318eab86186d9a7a8 100644 --- a/src/kernel_sdk/sdk/src/lib.rs +++ b/src/kernel_sdk/sdk/src/lib.rs @@ -86,7 +86,6 @@ pub mod types { pub use tezos_smart_rollup_host::input::Message; pub use tezos_smart_rollup_host::metadata::RollupMetadata; - #[cfg(feature = "proto-alpha")] pub use tezos_smart_rollup_host::dal_parameters::RollupDalParameters; }