Skip to content

feat: added internal built-in magic root program - #23

Open
bmuddha wants to merge 1 commit into
processorfrom
programs
Open

feat: added internal built-in magic root program#23
bmuddha wants to merge 1 commit into
processorfrom
programs

Conversation

@bmuddha

@bmuddha bmuddha commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

What changed

Added the engine's internal program crates: MagicRoot and v42 calculator
implementations with separate interface crates.

Why

Engine account CRUD needs privileged operations ordinary programs cannot perform,
while callers and tests need instruction schemas without depending on execution
implementations.

Part of #4.

Closes #30.

Impact

  • magic-root-interface defines MagicRootInstruction and instruction
    composition; magic-root-program provides the native entrypoint.
  • Patch applies field changes and balances lamport deltas against the authority;
    Finalize loads executable targets into the transaction program cache.
  • Delete marks accounts closed, while PostFinalize invokes follow-up
    instructions after rejecting immutable writable accounts.
  • The v42 interface, builder, and program provide a deterministic fixture for
    runtime and integration tests.

Reviewer notes

MagicRoot is authority-gated: every invocation must be top-level and signed by
the thread-local AUTHORITY. Authorization and decoding complete before the
target account is borrowed.

Follow-up

The engine crate registers MagicRoot and exposes account CRUD through these
instructions upstack.

@bmuddha
bmuddha force-pushed the programs branch 2 times, most recently from 73c6092 to 3c15947 Compare June 24, 2026 16:22
@bmuddha
bmuddha force-pushed the processor branch 2 times, most recently from 076b715 to b45cdf8 Compare June 25, 2026 19:52
@bmuddha
bmuddha force-pushed the programs branch 2 times, most recently from 367c7dc to 5f260c4 Compare June 26, 2026 10:36
@bmuddha
bmuddha force-pushed the processor branch 2 times, most recently from 114bf56 to 4e0fa26 Compare June 26, 2026 16:33
@bmuddha
bmuddha force-pushed the programs branch 3 times, most recently from e26900b to 7921abb Compare June 30, 2026 15:56
@bmuddha
bmuddha force-pushed the processor branch 2 times, most recently from 756dc43 to 63b2969 Compare June 30, 2026 21:16
@bmuddha
bmuddha force-pushed the programs branch 2 times, most recently from 11b31fc to ffefa44 Compare July 1, 2026 20:03
@bmuddha
bmuddha force-pushed the programs branch 2 times, most recently from 4ae6502 to 6d93fcd Compare July 16, 2026 20:43
@bmuddha
bmuddha force-pushed the processor branch 2 times, most recently from 067ddca to ef9cedd Compare July 16, 2026 21:28
@bmuddha
bmuddha force-pushed the programs branch 2 times, most recently from d5a0037 to ff94259 Compare July 16, 2026 21:43
@bmuddha
bmuddha force-pushed the processor branch 2 times, most recently from c2448d7 to f484006 Compare July 16, 2026 22:12
@bmuddha
bmuddha force-pushed the programs branch 3 times, most recently from 48f5d00 to a80df02 Compare July 17, 2026 10:19
@bmuddha
bmuddha force-pushed the programs branch 2 times, most recently from 219a70d to dddc008 Compare July 17, 2026 20:22
@bmuddha
bmuddha force-pushed the processor branch 2 times, most recently from 6fff79a to 89f8881 Compare July 18, 2026 12:25
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.

1 participant