fix: add hosting contract to devnet provision script (closes #44) #45
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
urgent
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_ledger!45
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_mik02_add_hosting_to_deploy"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds the
hostingcontract to the devnet/testnet/mainnet provisioning scriptscripts/rhai/provision/deploy_services.rhai. The contract exists incontracts/hosting/with tests, but was never part of standard provisioning — only anexamples/rhai/contracts/deploy/11_deploy_hosting.rhaiexisted, which is not run as part of normal deploys.Why
On devnet today:
hosting.dev.herodoes not exist. This blocks anything that callshosting.farm_create/hosting.node_registerfrom a downstream service. Context: #44 (verified via authenticatedaccount.existsqueries against the devnet gateway).Also motivates the marketplace scaling architecture initiative Phase 3 (mycelium_code/home#72) —
hero_compute_serverfirst-boot hook calls the hosting contract directly vianear-jsonrpc-client.Diff
13 lines, mirrors the existing
dnsandmarketplacedeploy blocks exactly:Placed between the DNS and Marketplace deploy blocks.
The init arg
spore_tokenmatches the existingexamples/rhai/contracts/deploy/11_deploy_hosting.rhaiand theContract::newsignature incontracts/hosting/src/lib.rs. The SPORE storage deposit registration is needed so the hosting account can receive SPORE viaft_transfer_callfor slice payments — again matching the example script.Verification
wasm32-unknown-unknown: verified with isolatedcargo check --target wasm32-unknown-unknownfromcontracts/hosting/. No new deps.contract_hosting()Rhai builder already exists atsrc/rhai/account/contract_helpers.rs:399and is registered atsrc/rhai/account/mod.rs:451— no registration changes needed.examples/rhai/contracts/deploy/11_deploy_hosting.rhaiproves this deploy flow works.Deploy impact
Next devnet provision run will create
hosting.dev.herofresh. No migration concerns since nothing depends on prior state (there is no prior state). Same for testnet/mainnet when those are provisioned next.If you prefer a minimal one-shot instead of modifying the provision script, you can alternatively run
examples/rhai/contracts/deploy/11_deploy_hosting.rhaidirectly against devnet and close this PR — the end result for downstream consumers is the same. I went with the script change because it keeps future provision runs consistent.Related
@scott — whenever convenient. Non-urgent; we will implement Phase 3 using
near-workspaces-rssandbox tests in the meantime, so the only thing that waits on this merge is the final on-devnet E2E validation step.The `hosting` contract (contracts/hosting/) has source and tests but was never part of scripts/rhai/provision/deploy_services.rhai. Only an example deploy script existed at examples/rhai/contracts/deploy/11_deploy_hosting.rhai, which is not run as part of standard provisioning. Result: on devnet, `hosting.dev.hero` does not exist, so anything that calls hosting.farm_create / hosting.node_register from a downstream service (marketplace scaling initiative Phase 3) fails with AccountDoesNotExist. This adds a hosting deploy block to deploy_services.rhai modeled on the existing dns and marketplace blocks: - Creates subaccount `hosting.<root_id>` - Registers SPORE storage deposit (hosting contract receives SPORE via ft_transfer_call for slice payments) - Deploys the contract with `new({ spore_token: "spore.<root_id>" })` The hosting contract compiles cleanly on wasm32-unknown-unknown from current source (verified with isolated `cargo check --target wasm32-unknown-unknown`). No new dependencies. Closes #44CI status note
All four CI jobs on this PR are failing with the same error in the Checkout step:
Full log excerpt from run #468:
This is not caused by this PR. The same
Test / build-and-testandBootstrap Test / bootstrapworkflows failed on recentdevelopmentruns (#189, #190) with identical symptoms on commitbb54ee00— while a third workflow (#191) on the same commit passed. It looks like the runner's git-over-https auth is broken for these two workflows, and the fix is probably runner-side / extraheader related, not in this repo's code.The actual diff in this PR is 13 lines in a Rhai provision script — it literally cannot affect a git checkout step that runs before any Rhai interpreter or Rust compile touches it.
Suggested next step: re-run manually from the Actions UI after the runner is fixed, or if the runner config needs a token refresh, please handle that separately. Happy to help investigate the runner infra if useful, but I don't have access to the runner config. Non-blocking for us — Phase 3 code work continues in parallel.
@scott — FYI, this is the CI failure I wanted you to look at when convenient.
mik-tf referenced this pull request from lhumina_code/hero_compute2026-04-11 02:44:09 +00:00
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.