From 33bed9c05de6535e22f5038b7506b89c015b7683 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Thu, 17 Oct 2024 12:07:09 +0200 Subject: [PATCH] operation: improve and document state APIs --- src/operation/state.rs | 42 ++++++++------- src/stl.rs | 4 +- src/validation/logic.rs | 2 +- src/vm/op_contract.rs | 4 +- stl/AnchoredBundle.vesper | 4 +- stl/RGBCommit@0.1.0.sta | 108 +++++++++++++++++++------------------- stl/RGBCommit@0.1.0.stl | Bin 10264 -> 10263 bytes stl/RGBCommit@0.1.0.sty | 6 +-- stl/RGBLogic@0.1.0.sta | 26 ++++----- stl/RGBLogic@0.1.0.stl | Bin 1659 -> 1659 bytes stl/RGBLogic@0.1.0.sty | 4 +- stl/Transition.vesper | 4 +- 12 files changed, 104 insertions(+), 100 deletions(-) diff --git a/src/operation/state.rs b/src/operation/state.rs index da7cecd7..9f987b96 100644 --- a/src/operation/state.rs +++ b/src/operation/state.rs @@ -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( @@ -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) -> Self { Self(SmallBlob::from_checked(vec)) } @@ -95,46 +92,53 @@ impl StateData { #[cfg_attr(feature = "serde", derive(Serialize, Deserialize), serde(crate = "serde_crate"))] pub struct State { pub reserved: ReservedBytes<1>, - pub value: StateData, + pub data: StateData, pub attach: Option, } impl From for State { - fn from(value: StateData) -> Self { + fn from(data: StateData) -> Self { State { reserved: default!(), - value, + data, attach: None, } } } impl State { - /// # Panics - /// - /// If the size of the serialized value exceeds 0xFFFF bytes. - pub fn new(value: impl StrictSerialize) -> Self { + /// Constructs new state object using the provided pre-serialzied binary data. Sets attachment + /// to `None`. + pub fn new(data: StateData) -> Self { State { reserved: default!(), - value: value - .to_strict_serialized::() - .expect("unable to fit in the data") - .into(), + data, attach: None, } } + /// 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 with(value: impl StrictSerialize, attach: AttachId) -> Self { + pub fn from_serialized(typed_data: impl StrictSerialize) -> Self { State { reserved: default!(), - value: value + data: typed_data .to_strict_serialized::() .expect("unable to fit in the data") .into(), - attach: Some(attach), + attach: None, } } } diff --git a/src/stl.rs b/src/stl.rs index 2b719675..5c606119 100644 --- a/src/stl.rs +++ b/src/stl.rs @@ -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 { LibBuilder::new(libname!(LIB_NAME_RGB_COMMIT), tiny_bset! { diff --git a/src/validation/logic.rs b/src/validation/logic.rs index b28b603a..f1de49de 100644 --- a/src/validation/logic.rs +++ b/src/validation/logic.rs @@ -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( diff --git a/src/vm/op_contract.rs b/src/vm/op_contract.rs index 026be026..203af330 100644 --- a/src/vm/op_contract.rs +++ b/src/vm/op_contract.rs @@ -239,7 +239,7 @@ impl InstructionSet for ContractOp { else { fail!() }; - regs.set_s(*reg, Some(state.value.as_inner())); + regs.set_s(*reg, Some(state.data.as_inner())); } ContractOp::LdS(state_type, reg_32, reg) => { let Some(reg_32) = *regs.get_n(RegA::A16, *reg_32) else { @@ -255,7 +255,7 @@ impl InstructionSet for ContractOp { else { fail!() }; - regs.set_s(*reg, Some(state.value.into_inner())); + regs.set_s(*reg, Some(state.data.into_inner())); } ContractOp::LdG(state_type, reg_8, reg_s) => { let Some(reg_32) = *regs.get_n(RegA::A8, *reg_8) else { diff --git a/stl/AnchoredBundle.vesper b/stl/AnchoredBundle.vesper index 7fb409de..3e9d3e0a 100644 --- a/stl/AnchoredBundle.vesper +++ b/stl/AnchoredBundle.vesper @@ -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 @@ -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 diff --git a/stl/RGBCommit@0.1.0.sta b/stl/RGBCommit@0.1.0.sta index 1be40fd4..4b31a31c 100644 --- a/stl/RGBCommit@0.1.0.sta +++ b/stl/RGBCommit@0.1.0.sta @@ -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, @@ -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>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)HTU 76^nC$%1sKzB<;EQA|)S-x88IWKN#S$#@T&w`gPtRC#b^PGN0jYXqYdo~D%m7H6OD0<^0n_2##VWXRdj y=DB@qgYOj1yf~hNn|nr2|;XhOksItaxnt|25f0@b!lV)3_)ykOksItaxqh7bOiwb2?5A!f_n>Eea4Xl By!~KtpQ8M_qJyiO1VIUJ=H=)@ii_1#@&^bY%ge?_#fa ->f2YbpqsWJ=H5;$3iFlwr`bMCi{X7L`pc*UY;R+00(t`--)Viz@~C%8KNS}Z0aQ3s^SOqbBwN-D{wl@O +Z*FF3WMyu2X<=*t1_K0hWnpXq+lpEmf)o&SDDwD>KtpQ8M_qJyiO1VIUJ=H=)@ii_1#@&^bY%f%nDE%V +j@4G$n608NVcXT~JHxYW^+v~7{W03rq(;firJ1#@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rV{X-@9uLPa%Zg)eEW zXD>fly~@t)MD6z}I@5XYZ)v~({mhKn(_3#f{nm(^yj?|KVXH%0p!21CU0s6&v*rKW bWi}XC#|Al+tulJ$vb#<1soZ8ZRY7I|Qy%oJ diff --git a/stl/RGBCommit@0.1.0.sty b/stl/RGBCommit@0.1.0.sty index 04faa3c0..5df9c6f0 100644 --- a/stl/RGBCommit@0.1.0.sty +++ b/stl/RGBCommit@0.1.0.sty @@ -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 @@ -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) diff --git a/stl/RGBLogic@0.1.0.sta b/stl/RGBLogic@0.1.0.sta index 7a2b5e04..54fdaf0f 100644 --- a/stl/RGBLogic@0.1.0.sta +++ b/stl/RGBLogic@0.1.0.sta @@ -1,14 +1,14 @@ -----BEGIN STRICT TYPE LIB----- -Id: stl:51OgjzV6-F5XuTyt-FMJe4k6-opdtsQd-cptXuc4-FqM7npk#ohio-electra-dilemma +Id: stl:LfHcR$Q$-tHON4hL-lwtJ1pT-!gCSP4i-C3fw2FZ-X!HGkwE#leonid-melody-quick Name: RGBLogic Dependencies: BPCore#austin-story-retro, - RGBCommit#printer-window-alpine, + RGBCommit#trident-rover-tape, Bitcoin#signal-color-cipher -Check-SHA256: 4d0d9fae7563710d6f467c95623de3453f5cc1c9beee9a427ba84777b4909016 +Check-SHA256: 430e87ae7e142bc8985569b79136cc2340a1e07f2089f235e6c7f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?vTA1;^Q1`ZqBog<<3Rh`# +LdY0XT`|v$|M|2EBF6^D+OST}`A!+zFZPFTn&AR;c>;Srg4$;(NAWquAkw}j-|{|zI;-FIp1Euir581u +{j6kl9zv-Vp*%wog4O?q)g04AaHEjnO6;Ie%sNwVNZti*Z*F5{000OCZ*Xa30((A!+Gi<8@j1mH(!M6& +@;-q&tKasXxoi@p7d4yxtd+>-dLDIRU(}XWLTZugenOC;Z(5k~zEJnJiX;;E#s3O)a$#@6CZU6=Z +2X|?7Ze??G0dl)S$QV;yG0%+u`Lqfm#|FpRuujhTP8r)T_J?np;R1Ad0((A!+Gi<8@j1mH(!M6&@;-q& +tKasXxoi@p7d4yxtTa*&t`n9TUcD*&5hFi^PVx{q1b@^7zTcrn*%qZTXa#O>ZewKt00;zcaA{-$dp?5N +XDLVVImIB-z9!%DK7l%`-}aulY!amxHJkmcmB{9L9(7`0)Rt93YLV-HLXe?vTA1;^Q1`ZqBog<<3Rh`# Ze??GPjX}g0{{qNa${&|c4cG$00036ZE0?0WB>&L0bJY;BNZ=sBHM?<`J6+Fr=ADb5bYX39002k +5&{WyWo~p~bZK^F0000AS7~%^Wpi^-Z*v9%25ez@WpXhBdp?5NXDLVVImIB-z9!%DK7l%`-}aulY!amx +HJkmcdBoUB2y8Zom7+;NN8Xgkb3WeV)QDb*=NiflQ)(Iz254nzXJ~W)00aqiX>Db5bYX39002k -----END STRICT TYPE LIB----- diff --git a/stl/RGBLogic@0.1.0.stl b/stl/RGBLogic@0.1.0.stl index 975f2766c1dae62e073fcbbcb1a4049541815a2f..d5c99d76307e311b742982bed4e9145e87d35833 100644 GIT binary patch delta 251 zcmey(^P6Xap+dD?)2(z(_m7rG6)x>lyZ_0q(Q5VmZ}WEM2rU&io&9&s#y~+9f{G^Z zW>U~+&CAbAPGw-=V977YOkpBq@Z^guF@z2FWz{FF=pu{4e)_0yy|I>*e-s3>0J`sA%$T zCIx-gy!^c6R0akPmi&Uu6edCjPrk?!L)c(nR(-;XF0v?0-ou(fSm8@1#mT8`VgP&3 BXU_lt diff --git a/stl/RGBLogic@0.1.0.sty b/stl/RGBLogic@0.1.0.sty index a6e3fb5d..a2e5fc94 100644 --- a/stl/RGBLogic@0.1.0.sty +++ b/stl/RGBLogic@0.1.0.sty @@ -1,5 +1,5 @@ {- - Id: stl:51OgjzV6-F5XuTyt-FMJe4k6-opdtsQd-cptXuc4-FqM7npk#ohio-electra-dilemma + Id: stl:LfHcR$Q$-tHON4hL-lwtJ1pT-!gCSP4i-C3fw2FZ-X!HGkwE#leonid-melody-quick Name: RGBLogic Version: 0.1.0 Description: Consensus logic layer for RGB smart contracts @@ -18,7 +18,7 @@ import BPCore#austin-story-retro use TapretRightBranch#miracle-patriot-touch use OpretProof#good-village-flex -import RGBCommit#printer-window-alpine +import RGBCommit#trident-rover-tape use TransitionType#picture-reflex-brigade use ExtensionType#apropos-scoop-viva use Layer1#camilla-basket-justin diff --git a/stl/Transition.vesper b/stl/Transition.vesper index 58dfce39..521b4213 100644 --- a/stl/Transition.vesper +++ b/stl/Transition.vesper @@ -65,7 +65,7 @@ Transition 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 @@ -86,7 +86,7 @@ Transition 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