RGB-WG / rgb-core

RGB Core Library: consensus validation for private & scalable client-validated smart contracts on Bitcoin & Lightning
https://spec.rgb.tech
Apache License 2.0
207 stars 52 forks source link

Move non-consensus data types to stdlib; better separate commitments and logic validation #263

Closed dr-orlovsky closed 1 month ago

dr-orlovsky commented 2 months ago

This is a prerequisite for solving witness transaction blockchain re-org and lightning channel constructions issues. It also unlocks a way for adding contract state introspection and cross-contract interaction.

The PR contains no changes for the logic and validation; it has just module re-arrangements and movement of non-consensus types to stdlib. It also introduces a new trait type for ContractState which fixes the way the standard library must account for the contract state to enforce consensus rules in the standard library - and in the future to use inside AluVM.

This PR is followed by RGB standard library, interfaces, schemata and cli PRs: