Skip to content

Expose validated RGB transfer and contract imports - #128

Merged
gofman8 merged 7 commits into
UTEXO-Protocol:devfrom
Jainakin:codex/rgb-contract-import
Sep 29, 2026
Merged

gofman8 merged 7 commits into
UTEXO-Protocol:devfrom
Jainakin:codex/rgb-contract-import

Conversation

@Jainakin

@Jainakin Jainakin commented Aug 4, 2026 •

Copy link
Copy Markdown

Summary

Rebase validated contract and transfer-consignment metadata import onto RLN v0.13.0-beta.3 (af03c7f1a65135a429f05a5820600338215954dc). The existing SDK, HTTP, UniFFI and C-FFI APIs share one parser and mutation path.

The released RGB-lib v0.3.0-beta.34 already includes contract-only import. This revision keeps the release's root Cargo manifest, lockfile and rust-lightning gitlink unchanged. The old RGB-lib and rust-lightning fork overrides are removed. No VSS changes from the newer dev tip are included.

Semantics and safety

  • Contract import validates the public contract and expected asset identity before registering metadata. It creates no allocations or asset balance.
  • Transfer-consignment import registers metadata for an already accepted transfer. It is not ownership acceptance or a replacement for normal on-chain receiving.
  • Strict standard Base64; maximum 16 MiB of encoded text (at most 12 MiB decoded), with bounded HTTP bodies.
  • Exact transaction-ID parsing and canonical metadata responses.
  • Parsing and wallet mutation run on blocking workers. Submitted mutations retain lifecycle ownership through completion even if the caller stops waiting.
  • Contract idempotence and interrupted-persistence repair come from released RGB-lib. Attachment-bearing standalone contracts require a separate flow providing their files.

Verification

Rebased head: 5d5aa742984d52767e1055fed6aa154ad732d551. The local Rust funded test ran at implementation commit 6300718; the follow-up changes formatting only. Downstream native builds include the current 5d5aa74 import source.

  • Locked SDK test compile with UniFFI, test utilities and VLS: passed.
  • Real regtest SDK import test: passed, 39.84 seconds, against the existing Core 31.1 / Electrs 0.12 / proxy 0.3 qualification stack, using loopback port/auth adapters without recreating services.
  • That test covers NIA and IFA contract import, expected-ID mismatch before mutation, canonical metadata, zero initial balance, duplicate import, a fresh IFA-specific invoice, receipt of 250,000 real fixture units, issuer/recipient spendable balances, and reimport preserving allocations.
  • Strict Base64 parsing unit test: passed.
  • UniFFI entrypoint, identity, error and signing tests: 10 passed.
  • Rust formatting and diff whitespace checks: passed.

Downstream integration is pushed in Node #23, Bare #21, WDK #44 and Iris #8. Both Node and Bare pass fresh imported-IFA receipt/send/settlement and balance-preserving reimport. WDK passes 706 tests; Iris passes 2384 tests, Android APK checks and the signed iOS simulator app build/identity checks. Initial iOS normal authentication, native baseline and BTC address generation pass; the Mac relocked before funded app tests. All five Node native runtime jobs and all seven Bare source/ABI builds pass. Bare's two Android 64-bit jobs fail the existing published-linker post-packaging RELRO gate, not native source compilation.

PR CI checks the dev merge 1bd104750a65821ab9880f8f9edfb36bceba16fd, not the raw production-rebased head. Core/SDK, external signer, language bindings, feature matrix, platform builds, general test/coverage and persistence sanitizer checks pass. The VSS test job fails restored_node_recovers_force_closed_channel_funds: balance remains zero with missing/spent-input diagnostics. This merge includes newer dev VSS changes that the downstream production-based builds do not include. Root cause is unassigned pending baseline comparison; the failure is not waived.

Earlier branch-head platform results are not qualification of this rebase. C-FFI consumers still require the binding/build adapter maintained in the binding packages.

The fixture asset is regtest-only and is not production USDT. This PR does not establish Signet/mainnet deployment readiness or resolve unrelated signer-lock, VSS or recovery issues.

@Jainakin
Jainakin force-pushed the codex/rgb-contract-import branch from 8b881eb to 825766c Compare August 4, 2026 17:51
@Jainakin Jainakin changed the title Expose RGB transfer consignment import Expose validated RGB transfer and contract imports Aug 4, 2026
@Jainakin
Jainakin force-pushed the codex/rgb-contract-import branch 2 times, most recently from ea3434c to 9292dfe Compare August 14, 2026 11:03
@Jainakin
Jainakin force-pushed the codex/rgb-contract-import branch from 09ad1d3 to 6300718 Compare September 27, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants