Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further improvements to consensus ordering #267

Merged
merged 3 commits into from
Aug 28, 2024
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
6 changes: 2 additions & 4 deletions _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ Atack = "Atack"

[default]
extend-ignore-re = [
# Don't correct RGB address
"[0-9A-Za-z]{7}-[0-9A-Za-z]{9}-[0-9A-Za-z]{9}-[0-9A-Za-z]{9}-[0-9A-Za-z]{9}-[0-9A-Za-z]{6}",
"rgb:[0-9A-Za-z-]+",
"[0-9A-Za-z]{49}"
# Don't correct URIs
"([a-z]+:)*[$!0-9A-Za-z-]+",
]
4 changes: 2 additions & 2 deletions src/operation/commit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@
#[commit_encode(strategy = strict, id = OpId)]
pub struct OpCommitment {
pub ffv: Ffv,
pub nonce: u8,
pub nonce: u64,
pub op_type: TypeCommitment,
pub metadata: StrictHash,
pub globals: MerkleHash,
Expand All @@ -287,7 +287,7 @@
};
OpCommitment {
ffv: self.ffv,
nonce: u8::MAX,
nonce: u64::MAX,

Check warning on line 290 in src/operation/commit.rs

View check run for this annotation

Codecov / codecov/patch

src/operation/commit.rs#L290

Added line #L290 was not covered by tests
op_type: TypeCommitment::Genesis(base),
metadata: self.metadata.commit_id(),
globals: MerkleHash::merklize(&self.globals),
Expand Down
12 changes: 6 additions & 6 deletions src/operation/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@

/// Returns nonce used in consensus ordering of state transitions and
/// extensions.
fn nonce(&self) -> u8;
fn nonce(&self) -> u64;

/// Returns [`Option::Some`]`(`[`TransitionType`]`)` for transitions or
/// [`Option::None`] for genesis and extension operation types
Expand Down Expand Up @@ -383,7 +383,7 @@
pub struct Extension {
pub ffv: Ffv,
pub contract_id: ContractId,
pub nonce: u8,
pub nonce: u64,
pub extension_type: ExtensionType,
pub metadata: Metadata,
pub globals: GlobalState,
Expand Down Expand Up @@ -416,7 +416,7 @@
pub struct Transition {
pub ffv: Ffv,
pub contract_id: ContractId,
pub nonce: u8,
pub nonce: u64,
pub transition_type: TransitionType,
pub metadata: Metadata,
pub globals: GlobalState,
Expand Down Expand Up @@ -519,7 +519,7 @@
fn contract_id(&self) -> ContractId { ContractId::from_inner(self.id().into_inner()) }

#[inline]
fn nonce(&self) -> u8 { u8::MAX }
fn nonce(&self) -> u64 { u64::MAX }

Check warning on line 522 in src/operation/operations.rs

View check run for this annotation

Codecov / codecov/patch

src/operation/operations.rs#L522

Added line #L522 was not covered by tests

#[inline]
fn transition_type(&self) -> Option<TransitionType> { None }
Expand Down Expand Up @@ -564,7 +564,7 @@
fn contract_id(&self) -> ContractId { self.contract_id }

#[inline]
fn nonce(&self) -> u8 { self.nonce }
fn nonce(&self) -> u64 { self.nonce }

Check warning on line 567 in src/operation/operations.rs

View check run for this annotation

Codecov / codecov/patch

src/operation/operations.rs#L567

Added line #L567 was not covered by tests

#[inline]
fn transition_type(&self) -> Option<TransitionType> { None }
Expand Down Expand Up @@ -609,7 +609,7 @@
fn contract_id(&self) -> ContractId { self.contract_id }

#[inline]
fn nonce(&self) -> u8 { self.nonce }
fn nonce(&self) -> u64 { self.nonce }

Check warning on line 612 in src/operation/operations.rs

View check run for this annotation

Codecov / codecov/patch

src/operation/operations.rs#L612

Added line #L612 was not covered by tests

#[inline]
fn transition_type(&self) -> Option<TransitionType> { Some(self.transition_type) }
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:eKthGp7I-52YYwm!-nkAFB7$-0X9zHac-f5pAUKf-V01EhSc#pretend-carpet-caesar";
"stl:ZMTVCU25-QDo98xR-wI91wcu-ydb7kui-QfZbF$n-0KDS2ow#tuna-safari-design";
/// Strict types id for the library providing data types for RGB consensus.
pub const LIB_ID_RGB_LOGIC: &str =
"stl:Pyd01gNn-B3o3lfj-4y6pZ5a-qSgCE1x-0J7gL!C-raacTJs#memphis-martin-jump";
"stl:bioTBozT-NqelHGE-SPbnpMA-XBNSbXZ-6X0dANE-WHVirL8#explain-marvin-bless";

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/consignment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
}
}

fn nonce(&self) -> u8 {
fn nonce(&self) -> u64 {

Check warning on line 88 in src/validation/consignment.rs

View check run for this annotation

Codecov / codecov/patch

src/validation/consignment.rs#L88

Added line #L88 was not covered by tests
match self {
Self::Genesis(op) => op.nonce(),
Self::Transition(op) => op.nonce(),
Expand Down
30 changes: 23 additions & 7 deletions src/vm/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,13 @@
OrdOpRef::Genesis(_) => OpOrd::Genesis,
OrdOpRef::Transition(op, _, witness_ord) => OpOrd::Transition {
witness: *witness_ord,
ty: op.transition_type,

Check warning on line 173 in src/vm/contract.rs

View check run for this annotation

Codecov / codecov/patch

src/vm/contract.rs#L173

Added line #L173 was not covered by tests
nonce: op.nonce,
opid: op.id(),
},
OrdOpRef::Extension(op, _, witness_ord) => OpOrd::Extension {
witness: *witness_ord,
ty: op.extension_type,

Check warning on line 179 in src/vm/contract.rs

View check run for this annotation

Codecov / codecov/patch

src/vm/contract.rs#L179

Added line #L179 was not covered by tests
nonce: op.nonce,
opid: op.id(),
},
Expand Down Expand Up @@ -215,7 +217,7 @@
}
}

fn nonce(&self) -> u8 {
fn nonce(&self) -> u64 {

Check warning on line 220 in src/vm/contract.rs

View check run for this annotation

Codecov / codecov/patch

src/vm/contract.rs#L220

Added line #L220 was not covered by tests
match self {
OrdOpRef::Genesis(op) => op.nonce(),
OrdOpRef::Transition(op, ..) => op.nonce(),
Expand Down Expand Up @@ -415,15 +417,15 @@
#[strict_type(tag = 0x01)]
Extension {
witness: WitnessOrd,
// TODO: Consider using extension type here
nonce: u8,
ty: ExtensionType,
nonce: u64,
opid: OpId,
},
#[strict_type(tag = 0xFF)]
Transition {
witness: WitnessOrd,
// TODO: Consider using transition type here
nonce: u8,
ty: TransitionType,
nonce: u64,
opid: OpId,
},
}
Expand Down Expand Up @@ -465,20 +467,34 @@
idx,
}
}
pub fn transition(opid: OpId, idx: u16, nonce: u8, witness: WitnessOrd) -> Self {
pub fn transition(
opid: OpId,
idx: u16,
ty: TransitionType,
nonce: u64,
witness: WitnessOrd,
) -> Self {

Check warning on line 476 in src/vm/contract.rs

View check run for this annotation

Codecov / codecov/patch

src/vm/contract.rs#L470-L476

Added lines #L470 - L476 were not covered by tests
Self {
op_ord: OpOrd::Transition {
witness,
ty,

Check warning on line 480 in src/vm/contract.rs

View check run for this annotation

Codecov / codecov/patch

src/vm/contract.rs#L480

Added line #L480 was not covered by tests
nonce,
opid,
},
idx,
}
}
pub fn extension(opid: OpId, idx: u16, nonce: u8, witness: WitnessOrd) -> Self {
pub fn extension(
opid: OpId,
idx: u16,
ty: ExtensionType,
nonce: u64,
witness: WitnessOrd,
) -> Self {

Check warning on line 493 in src/vm/contract.rs

View check run for this annotation

Codecov / codecov/patch

src/vm/contract.rs#L487-L493

Added lines #L487 - L493 were not covered by tests
Self {
op_ord: OpOrd::Extension {
witness,
ty,

Check warning on line 497 in src/vm/contract.rs

View check run for this annotation

Codecov / codecov/patch

src/vm/contract.rs#L497

Added line #L497 was not covered by tests
nonce,
opid,
},
Expand Down
2 changes: 1 addition & 1 deletion stl/AnchoredBundle.vesper
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ TransitionBundle rec
value rec Transition
ffv is U16 aka=Ffv
contractId bytes len=32 aka=ContractId
nonce is U8
nonce is U64
transitionType is U16 aka=TransitionType
metadata map len=0..MAX8 aka=Metadata
key is U16 aka=MetaType
Expand Down
14 changes: 7 additions & 7 deletions stl/[email protected]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-----BEGIN STRICT TYPE LIB-----
Id: stl:eKthGp7I-52YYwm!-nkAFB7$-0X9zHac-f5pAUKf-V01EhSc#pretend-carpet-caesar
Id: stl:ZMTVCU25-QDo98xR-wI91wcu-ydb7kui-QfZbF$n-0KDS2ow#tuna-safari-design
Name: RGBCommit
Dependencies:
StrictTypes#century-comrade-chess,
Expand All @@ -8,7 +8,7 @@ Dependencies:
BPCore#totem-holiday-helena,
Std#ralph-blue-lucky,
Bitcoin#signal-color-cipher
Check-SHA256: 8447a453dc6b4effc5ed991125084965c4e0b44a09b757502765c9ab2909be75
Check-SHA256: bca1c6f36dad26f2d0a6f0c23ed8bd7a3c2584bf1f60a4f1ded87de9f8fafa87

2~tNwLvL+uX><lf>Z4!V_T!KNI`QJ|h6;Zj^jB$MPK+?7Lu3>C`4HI)Q*?4^V{}w`aAk91a5aA+<>R2X
hQO_4{AcS-HH^7AVzASV8M4NYxyCjHL2PwaO?m?z-)Viz@~C%8KNS}Z0aQ3s^SOqbBwN-D{wl@OCJaMw
Expand Down Expand Up @@ -135,7 +135,7 @@ x`Tq%|A_kfK&ST81_yLyb98QHbOOpO9&dx0-7pM3Z=O*v*GCA9fL-<|HrZsA`NnJlR3~AEBGG%U@MZ$v
b#7;AVr*pw0t#bqZEb0EZDnqB0Z6?XZWsH8I~II?C0;dW+k!*yDqgzlqQwf$39g<|8VYh@Zf9jsa&K>D
0Z6?XZWsH8I~II?C0;dW+k!*yDqgzlqQwf$39g<|8VW;iZgg^CV{}Pm1pxpD002NB00~54bYW9;VRU5$
0RRX906+i$000000096000000000R^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r=ykNJ#YFTr_BQwWqKF0T5JjVQzD2
bZKvHLUnFrY-I)m3uA0=b7f6sbZBp60;XBAP%ncq!=bH)!l@Cw+&ABgf({>*%N~j&hfyEy&@Q(SCAn^8
7TS9h9ibhaZ&^Bcn*B*;w|~I;-PD|t>j-IXaCLM|VQ>KznP+6nwW~k}RP!Nmu<SJZr!SwWo_pyU_h`er
^ZSSpYi@6MZd7t%ZgXjLX>V?G015$>$mV(;bz)!CmQ_M(k?Vd!kfCo{nDM?)_qK{868FUcln*p#G+NdC
Gjy~AR_gVLaFF}DZ0SlZTU?PU0ls0E0RR9100000|Nj60000005L9wuZgXjLX>V>*V`yb<VFm^WZDn*}
^ZSSpYi@6MZd7t%ZgXjLX>V?G015$>$mV(;bz)!CmQ_M(k?Vd!kfCo{nDM?)_qK{868FUc))-~W22H5+
SDrhMohTRsfLT>C1dS{r3#^{o?N>fE0RR9100000|Nj60000005L9wuZgXjLX>V>*V`yb<VFm^WZDn*}
WMOn+00{wg<W2bB&Wi#Y)kesSpCn_+*5;H&uJdp=m8bOK2??SA00000000300000000007XKZg`VQg~%
3IWybk`76TvuW{aQ_%-X`?VwZ$5L?~`!+pRSq0(b70UrO!8D=zpn(&o-7tVWUa<1Q{n`|;)uYyv!)~4r
GOBq100000000300000000006X>M?JbaMa-0f+wLWmt%8=p4R=gtK{LClh6Z#kObxUW*hKHnBv9xdAr8
Expand Down
Binary file modified stl/[email protected]
Binary file not shown.
14 changes: 7 additions & 7 deletions stl/[email protected]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{-
Id: stl:eKthGp7I-52YYwm!-nkAFB7$-0X9zHac-f5pAUKf-V01EhSc#pretend-carpet-caesar
Id: stl:ZMTVCU25-QDo98xR-wI91wcu-ydb7kui-QfZbF$n-0KDS2ow#tuna-safari-design
Name: RGBCommit
Version: 0.1.0
Description: Consensus commitment layer for RGB smart contracts
Expand Down Expand Up @@ -211,10 +211,10 @@ data ContractId : [Byte ^ 32]
@mnemonic(short-noise-postal)
data DataState : [Byte]

@mnemonic(felix-random-mineral)
@mnemonic(reform-garden-ballet)
data Extension : ffv Ffv
, contractId ContractId
, nonce U8
, nonce U64
, extensionType ExtensionType
, metadata Metadata
, globals GlobalState
Expand Down Expand Up @@ -309,9 +309,9 @@ data Metadata : {MetaType -> ^ ..0xff MetaValue}
@mnemonic(source-olga-mirage)
data Occurrences : min U16, max U16

@mnemonic(chamber-provide-veteran)
@mnemonic(survive-citizen-harris)
data OpCommitment : ffv Ffv
, nonce U8
, nonce U64
, opType TypeCommitment
, metadata CommitVerify.StrictHash
, globals CommitVerify.MerkleHash
Expand Down Expand Up @@ -371,10 +371,10 @@ data Schema : ffv Ffv
@mnemonic(ramirez-patron-simon)
data SchemaId : [Byte ^ 32]

@mnemonic(abraham-think-brother)
@mnemonic(michael-exact-eric)
data Transition : ffv Ffv
, contractId ContractId
, nonce U8
, nonce U64
, transitionType TransitionType
, metadata Metadata
, globals GlobalState
Expand Down
34 changes: 19 additions & 15 deletions stl/[email protected]
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
-----BEGIN STRICT TYPE LIB-----
Id: stl:Pyd01gNn-B3o3lfj-4y6pZ5a-qSgCE1x-0J7gL!C-raacTJs#memphis-martin-jump
Id: stl:bioTBozT-NqelHGE-SPbnpMA-XBNSbXZ-6X0dANE-WHVirL8#explain-marvin-bless
Name: RGBLogic
Dependencies:
RGBCommit#pretend-carpet-caesar,
RGBCommit#tuna-safari-design,
BPCore#totem-holiday-helena,
Bitcoin#signal-color-cipher
Check-SHA256: 2e22050f901819f9ce12a582e13f6119579e01693ebf5921521cd1ca7529137d
Check-SHA256: b4f6b967a70e12d12c5831aa223bd85052f40dbc2bfd5ab3f739e1aa37242f31

2vSEvOmAmtV*_}rVH%#u=VlnfZ>Nv}LGS$+_c7XW{%HY1pI1#pg(nG8M?ynyZEb0ErdhI3FM~0|p{<6(
2vSEvOmAmtV*_Nw)d@|xKsr716mTQmaB}ROZ@Dgs2ia_2=g^?i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+-Eea3oo~4=i3iziU+2)E(%Ot<bsj>g6`?#s5rWnKhSeO?L~x^!;Y#eFP|P}0Z%Ez+Zf|a5
WdHyO1aEL@WCCQw)d@|xKsr716mTQmaB}ROZ@Dgs2ia_2=g^?i+KiRR=6W7=VqesjRYGc!>wZFzp>JB4
@xD;^wu&SY_r?DTbaG*Cb7^#GZ*Bkv1P6C%bZ%vHa{=}XBbpbBLK#dEwxUFHJ){RjtgLvL_X>0rou@Kn
b#Vf8c>-j_)d@|xKsr716mTQmaB}ROZ@Dgs2ia_2=g^?i+Ke<(53UoI8eY9A{1GERg--GiI0S#x1is&)
M%fmnGH3;EZ*F5{000OCZ*Xa30%XM12~D{`Iz96ga3kGta_pUNxh{zZ*=%3u(4f-VjFrgddLDIRU(}XW
LTZugenOC;Z(5k~zEJnJiX;;E#R^wxbZ%vHb5C+)1OosFVRB<=X?A5~000011#M|=Wn=&a0Raxbxa~M%
Zlr^{H1ibsRCVcA*+(@K+$R_oJY%-uiLn9+bY*UIVRUJBWdHyG3Rh`#Ze??GP;YYv0tRShX=iA3000CD
bZKp6b97;CZ~y>E

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

Binary file modified stl/[email protected]
Binary file not shown.
14 changes: 9 additions & 5 deletions stl/[email protected]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{-
Id: stl:Pyd01gNn-B3o3lfj-4y6pZ5a-qSgCE1x-0J7gL!C-raacTJs#memphis-martin-jump
Id: stl:bioTBozT-NqelHGE-SPbnpMA-XBNSbXZ-6X0dANE-WHVirL8#explain-marvin-bless
Name: RGBLogic
Version: 0.1.0
Description: Consensus logic layer for RGB smart contracts
Expand All @@ -11,7 +11,9 @@
@context
typelib RGBLogic

import RGBCommit#pretend-carpet-caesar
import RGBCommit#tuna-safari-design
use TransitionType#picture-reflex-brigade
use ExtensionType#apropos-scoop-viva
use OpId#picnic-single-gloria

import BPCore#totem-holiday-helena
Expand All @@ -37,13 +39,15 @@ data DbcProof : tapret#1 BPCore.TapretProof
@mnemonic(east-sunset-extra)
data GlobalOrd : opOrd OpOrd, idx U16

@mnemonic(heroic-right-pepper)
@mnemonic(combat-henry-flood)
data OpOrd : genesis ()
| extension (witness WitnessOrd
, nonce U8
, ty RGBCommit.ExtensionType
, nonce U64
, opid RGBCommit.OpId)
| transition#255 (witness WitnessOrd
, nonce U8
, ty RGBCommit.TransitionType
, nonce U64
, opid RGBCommit.OpId)

@mnemonic(orange-john-cyclone)
Expand Down
4 changes: 2 additions & 2 deletions stl/Transition.vesper
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ OpId commitment hasher=SHA256 tagged=urn:lnp-bp:rgb:operation#2024-02-03

OpCommitment rec
ffv is U16 aka=Ffv
nonce is U8
nonce is U64
opType union TypeCommitment
genesis rec BaseCommitment wrapped tag=0
flags bytes len=1 aka=ReservedBytes1
Expand Down Expand Up @@ -40,7 +40,7 @@ OpCommitment rec
Transition rec
ffv is U16 aka=Ffv
contractId bytes len=32 aka=ContractId
nonce is U8
nonce is U64
transitionType is U16 aka=TransitionType
metadata map len=0..MAX8 aka=Metadata
key is U16 aka=MetaType
Expand Down
Loading