From 6873cff4c15339fd248141e065707e3cbf1a0336 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Wed, 18 Oct 2023 14:30:29 +0200 Subject: [PATCH 1/3] doc: fix typo --- src/validation/validator.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/validation/validator.rs b/src/validation/validator.rs index 416c5477..f7164eae 100644 --- a/src/validation/validator.rs +++ b/src/validation/validator.rs @@ -191,7 +191,7 @@ impl<'consignment, 'resolver, C: ConsignmentApi, R: ResolveTx> expected: self.schema_id, actual: schema.schema_id(), }); - // Unlike other failures, here we return immediatelly, since there is no point + // Unlike other failures, here we return immediately, since there is no point // to validate all consignment data against an invalid schema: it will result in // a plenty of meaningless errors return; From 214f2425d7603c8be70fe9a0182e37c1defe4f25 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Wed, 18 Oct 2023 14:30:57 +0200 Subject: [PATCH 2/3] vm: fix entry point for owned state validation --- src/vm/runtime.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vm/runtime.rs b/src/vm/runtime.rs index bd2f7717..a070009b 100644 --- a/src/vm/runtime.rs +++ b/src/vm/runtime.rs @@ -66,7 +66,7 @@ impl<'script> AluRuntime<'script> { .copied() .collect::>(); for ty in used_state { - self.run(EntryPoint::ValidateGlobalState(ty), ®s, info)?; + self.run(EntryPoint::ValidateOwnedState(ty), ®s, info)?; } Ok(()) From a4c1c4a842d7f11107ccc0a750105bc8e8e8c3a5 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Wed, 18 Oct 2023 14:32:03 +0200 Subject: [PATCH 3/3] chore: add todo for doing wrapped state and operation types --- src/schema/operations.rs | 1 + src/schema/schema.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/schema/operations.rs b/src/schema/operations.rs index 14c74e64..725088c2 100644 --- a/src/schema/operations.rs +++ b/src/schema/operations.rs @@ -27,6 +27,7 @@ use super::{ExtensionType, GlobalStateType, Occurrences, TransitionType}; use crate::LIB_NAME_RGB; // Here we can use usize since encoding/decoding makes sure that it's u16 +// TODO: Do custom types pub type AssignmentType = u16; pub type ValencyType = u16; pub type GlobalSchema = TinyOrdMap; diff --git a/src/schema/schema.rs b/src/schema/schema.rs index 31613431..0430f0bf 100644 --- a/src/schema/schema.rs +++ b/src/schema/schema.rs @@ -43,6 +43,7 @@ pub trait SchemaTypeIndex: } impl SchemaTypeIndex for u16 {} +// TODO: Do custom types pub type GlobalStateType = u16; pub type ExtensionType = u16; pub type TransitionType = u16;