Skip to content

Commit

Permalink
operation: improve and document state APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Oct 17, 2024
1 parent 8267ce2 commit 7542450
Show file tree
Hide file tree
Showing 12 changed files with 106 additions and 100 deletions.
44 changes: 25 additions & 19 deletions src/operation/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ impl Display for AttachId {

impl_serde_baid64!(AttachId);

/// Binary state data, serialized using strict type notation from the structured data type.
#[derive(Wrapper, Clone, PartialOrd, Ord, Eq, PartialEq, Hash, Debug, From)]
#[wrapper(Deref, BorrowSlice, Index, RangeOps)]
#[wrapper(Deref, AsSlice, BorrowSlice, Index, RangeOps)]
#[derive(StrictType, StrictDumb, StrictEncode, StrictDecode)]
#[strict_type(lib = LIB_NAME_RGB_COMMIT)]
#[cfg_attr(
Expand All @@ -77,10 +78,6 @@ pub struct StateData(SmallBlob);
impl StrictSerialize for StateData {}
impl StrictDeserialize for StateData {}

impl AsRef<[u8]> for StateData {
fn as_ref(&self) -> &[u8] { self.0.as_slice() }
}

impl StateData {
pub fn from_checked(vec: Vec<u8>) -> Self { Self(SmallBlob::from_checked(vec)) }

Check warning on line 82 in src/operation/state.rs

View check run for this annotation

Codecov / codecov/patch

src/operation/state.rs#L82

Added line #L82 was not covered by tests

Expand All @@ -95,46 +92,55 @@ impl StateData {
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize), serde(crate = "serde_crate"))]

Check warning on line 92 in src/operation/state.rs

View check run for this annotation

Codecov / codecov/patch

src/operation/state.rs#L92

Added line #L92 was not covered by tests
pub struct State {
pub reserved: ReservedBytes<1>,
pub value: StateData,
pub data: StateData,
pub attach: Option<AttachId>,
}

impl From<StateData> for State {
fn from(value: StateData) -> Self {
/// Constructs new state object using the provided pre-serialized binary data. Sets attachment
/// to `None`.
fn from(data: StateData) -> Self {
State {
reserved: default!(),
value,
data,
attach: None,
}
}

Check warning on line 108 in src/operation/state.rs

View check run for this annotation

Codecov / codecov/patch

src/operation/state.rs#L102-L108

Added lines #L102 - L108 were not covered by tests
}

impl State {
/// Constructs new state object by performing strict serialization of the provided structured
/// data type. Sets attachment to `None`.
///
/// The data type must implement [`StrictSerialize`].
///
/// # NB
///
/// Use the function carefully, since the common pitfall here is to perform double serialization
/// of an already serialized data type, like `SmallBlob`. This produces an invalid state object
/// which can't be properly parsed later.
///
/// # Panics
///
/// If the size of the serialized value exceeds 0xFFFF bytes.
pub fn new(value: impl StrictSerialize) -> Self {
pub fn from_serialized(typed_data: impl StrictSerialize) -> Self {
State {
reserved: default!(),
value: value
data: typed_data
.to_strict_serialized::<U16MAX>()
.expect("unable to fit in the data")
.into(),
attach: None,
}
}

Check warning on line 135 in src/operation/state.rs

View check run for this annotation

Codecov / codecov/patch

src/operation/state.rs#L126-L135

Added lines #L126 - L135 were not covered by tests

/// # Panics
///
/// If the size of the serialized value exceeds 0xFFFF bytes.
pub fn with(value: impl StrictSerialize, attach: AttachId) -> Self {
/// Constructs new state object using the provided pre-serialized binary data and attachment
/// information.
pub fn with(data: StateData, attach_id: AttachId) -> Self {
State {
reserved: default!(),
value: value
.to_strict_serialized::<U16MAX>()
.expect("unable to fit in the data")
.into(),
attach: Some(attach),
data,
attach: Some(attach_id),

Check warning on line 143 in src/operation/state.rs

View check run for this annotation

Codecov / codecov/patch

src/operation/state.rs#L139-L143

Added lines #L139 - L143 were not covered by tests
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/stl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ use crate::{

/// Strict types id for the library providing data types for RGB consensus.
pub const LIB_ID_RGB_COMMIT: &str =
"stl:r43G92Ru-4TQgKzY-eeZQr$e-k0DccV0-6d0mlAI-Dil$Hr4#printer-window-alpine";
"stl:ez6C2mcp-R$E5xSD-Svibf8j-6BOqvf9-p65bBKl-FzWb$aw#trident-rover-tape";
/// Strict types id for the library providing data types for RGB consensus.
pub const LIB_ID_RGB_LOGIC: &str =
"stl:51OgjzV6-F5XuTyt-FMJe4k6-opdtsQd-cptXuc4-FqM7npk#ohio-electra-dilemma";
"stl:LfHcR$Q$-tHON4hL-lwtJ1pT-!gCSP4i-C3fw2FZ-X!HGkwE#leonid-melody-quick";

fn _rgb_commit_stl() -> Result<TypeLib, CompileError> {
LibBuilder::new(libname!(LIB_NAME_RGB_COMMIT), tiny_bset! {
Expand Down
2 changes: 1 addition & 1 deletion src/validation/logic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ impl OwnedStateSchema {
) -> validation::Status {
let mut status = validation::Status::new();
if type_system
.strict_deserialize_type(self.sem_id, assign.as_state().value.as_ref())
.strict_deserialize_type(self.sem_id, assign.as_state().data.as_ref())
.is_err()
{
status.add_failure(validation::Failure::SchemaInvalidOwnedValue(
Expand Down
4 changes: 2 additions & 2 deletions src/vm/op_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ impl<S: ContractStateAccess> InstructionSet for ContractOp<S> {
else {
fail!()
};
regs.set_s(*reg, Some(state.value.as_inner()));
regs.set_s(*reg, Some(state.data.as_inner()));

Check warning on line 242 in src/vm/op_contract.rs

View check run for this annotation

Codecov / codecov/patch

src/vm/op_contract.rs#L242

Added line #L242 was not covered by tests
}
ContractOp::LdS(state_type, reg_32, reg) => {
let Some(reg_32) = *regs.get_n(RegA::A16, *reg_32) else {
Expand All @@ -255,7 +255,7 @@ impl<S: ContractStateAccess> InstructionSet for ContractOp<S> {
else {
fail!()
};
regs.set_s(*reg, Some(state.value.into_inner()));
regs.set_s(*reg, Some(state.data.into_inner()));

Check warning on line 258 in src/vm/op_contract.rs

View check run for this annotation

Codecov / codecov/patch

src/vm/op_contract.rs#L258

Added line #L258 was not covered by tests
}
ContractOp::LdG(state_type, reg_8, reg_s) => {
let Some(reg_32) = *regs.get_n(RegA::A8, *reg_8) else {
Expand Down
4 changes: 2 additions & 2 deletions stl/AnchoredBundle.vesper
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ TransitionBundle rec
liquid bytes len=32 wrapped aka=SecretSeal tag=1
state rec State
reserved bytes len=1 aka=ReservedBytes1
value bytes len=0..MAX16 aka=StateData
data bytes len=0..MAX16 aka=StateData
some bytes len=32 option wrapped aka=AttachId tag=1
lock bytes len=2 aka=ReservedBytes2
revealed rec tag=1
Expand All @@ -76,7 +76,7 @@ TransitionBundle rec
blinding is U64
state rec State
reserved bytes len=1 aka=ReservedBytes1
value bytes len=0..MAX16 aka=StateData
data bytes len=0..MAX16 aka=StateData
some bytes len=32 option wrapped aka=AttachId tag=1
lock bytes len=2 aka=ReservedBytes2
valencies set len=0..MAX8 aka=Valencies
Expand Down
108 changes: 54 additions & 54 deletions stl/[email protected]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-----BEGIN STRICT TYPE LIB-----
Id: stl:r43G92Ru-4TQgKzY-eeZQr$e-k0DccV0-6d0mlAI-Dil$Hr4#printer-window-alpine
Id: stl:ez6C2mcp-R$E5xSD-Svibf8j-6BOqvf9-p65bBKl-FzWb$aw#trident-rover-tape
Name: RGBCommit
Dependencies:
StrictTypes#century-comrade-chess,
Expand All @@ -8,7 +8,7 @@ Dependencies:
CommitVerify#miller-pancake-elastic,
Std#ralph-blue-lucky,
Bitcoin#signal-color-cipher
Check-SHA256: 9784117eff575534fd00f2c58a4b7e77f7295eb5152e4034fe3b50c9693a9fad
Check-SHA256: a2b07d103862ce1af940fc108bc66785e882bee82491a164259acd89af95c594

2~tNwLvL+uX><lf>Z4!V_T!KNI`QJ|h6;Zj^jB$MPK+?7Lu3>C`4HI)Q*?4^V{}w`aAk8=6V}(%hjW>8
uUwNXi!t*yd7K}=K!`A`1OPgv%fUznLQq3*a%Ez0HGd)H<Dj;Nz^!EbXX{KgjJY{tu+xnhvc`|O#x?~(
Expand All @@ -30,20 +30,20 @@ Xt{%a=RmHK6WZ%EWRm@*ULd%lgGoFTxU<Z3$DN1yuMa_NaA;veVQ_OyZ)9O}XbV$xa%p39RC#b^a{>TU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p3Y36tDMM#=e#tGI($UA5U3KNx<*C>jc*f<p7l*U`|S655U7U@unG_-_ux
#CFBNXjx241Z7qM25f0@b!lV(1pxx}Y!hN5_Bp3Y36tDMM#=e#tGI($UA5U3KNx<*C>jc*f<p7l*U`|S
655U7U@unG_-_ux#CFBNXjx241Z7q

-----END STRICT TYPE LIB-----

Binary file modified stl/[email protected]
Binary file not shown.
6 changes: 3 additions & 3 deletions stl/[email protected]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{-
Id: stl:r43G92Ru-4TQgKzY-eeZQr$e-k0DccV0-6d0mlAI-Dil$Hr4#printer-window-alpine
Id: stl:ez6C2mcp-R$E5xSD-Svibf8j-6BOqvf9-p65bBKl-FzWb$aw#trident-rover-tape
Name: RGBCommit
Version: 0.1.0
Description: Consensus commitment layer for RGB smart contracts
Expand Down Expand Up @@ -221,9 +221,9 @@ data Schema : ffv Ffv
@mnemonic(ramirez-patron-simon)
data SchemaId : [Byte ^ 32]

@mnemonic(trapeze-gustav-shoe)
@mnemonic(logo-plato-shadow)
data State : reserved CommitVerify.ReservedBytes1
, value StateData
, data StateData
, attach AttachId?

@mnemonic(nissan-pattern-inside)
Expand Down
Loading

0 comments on commit 7542450

Please sign in to comment.