Skip to content

creation: the genesis template owns its allocations - #40

Open
owenwahlgren wants to merge 2 commits into
mainfrom
feature/genesis-template-allocs
Open

creation: the genesis template owns its allocations#40
owenwahlgren wants to merge 2 commits into
mainfrom
feature/genesis-template-allocs

Conversation

@owenwahlgren

Copy link
Copy Markdown
Collaborator

What changed

  • genesis-template.json alloc is no longer forced empty. Two key forms: the $genesis-funds placeholder (resolves to the generated bombard account with the balance the template states) and literal hex addresses, which pass through verbatim (balance, code, storage, nonce). Operators can prefund their own accounts, prebake their own contracts, or remove the bombard funding (create prints a note; only bombard stops working).
  • Shipped default and oracle templates now carry the $genesis-funds line visibly.
  • Generated allocations (feeder, oracle aggregator) still inject; collisions with template allocations are errors. Unknown alloc fields and unknown placeholders are refused, not dropped.
  • New examples/oracle-feed.ini (main + oracle shape in generic chain=oracle syntax); stale oracle-roles sentence in examples/README.md fixed; two-chains.ini comment updated.
  • Docs: README "Genesis allocations" section, playbook 04 bombard funding note, playbook 09 template-allocation rules.

Verification

  • go test ./... green; new render tests cover placeholder resolution, literal passthrough, removal, collisions, and strict field validation.
  • Create-level test pins the split path: main keeps the placeholder, trading removes it.
  • Both shipped templates smoke-rendered through the new path.

The alloc object accepts the $genesis-funds placeholder (resolves to the
generated bombard account) and literal addresses, which pass through
verbatim: prefunds and prebaked contracts alike. Removing the placeholder
line only disables bombard on that chain; l1 create prints a note. The
generated feeder and the oracle aggregator still inject, and a collision
with a template allocation is an error. New examples/oracle-feed.ini shows
the oracle shape in generic syntax.
The values equal the default ladder, so behavior is unchanged; the
failover design is now visible on the lines. dev-single-host stays
untagged as the zero-config demonstration, and the oracle chain takes no
tag because its flat weight is not operator-tunable. A new test loads
every example through the real parser so the files cannot drift again.
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