Skip to content

rofl: Move offer access policy to on-chain offer metadata - #711

Draft
anzoman wants to merge 3 commits into
masterfrom
anzoman/feature/rofl-offer-access-policy
Draft

rofl: Move offer access policy to on-chain offer metadata#711
anzoman wants to merge 3 commits into
masterfrom
anzoman/feature/rofl-offer-access-policy

Conversation

@anzoman

@anzoman anzoman commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Adds CLI support for the on-chain ROFL offer access policy introduced in oasisprotocol/oasis-sdk#2485. Implements oasisprotocol/oasis-sdk#2475 (CLI part).

Previously allowed_creators and allowed_artifacts lived in the ROFL node's local config.yml, so changing them meant editing the config and restarting the machine. They are now part of the offer metadata on-chain, and this PR exposes them as first-class fields of the provider manifest:

offers:
  - id: internal_small
    # ...resources, payment and capacity omitted...
    allowed_creators:
      - oasis1qrk58a6j2qn065m6p06jgjyt032f7qucy5wqeqpt
      - oasis1qqnf0s9p8z79zfutszt0hwlh7w7jjrfqnq997mlw
    allowed_artifacts:
      firmware:
        - 4f2b3c1d0e9a8b7c...
    private: true

Applying them is a plain oasis rofl provider update-offers; the scheduler picks the new policy up on the next round.

Docs counterpart for the node config side: oasisprotocol/docs#1788.

anzoman added 3 commits August 5, 2026 15:28
Adds the `allowed_creators`, `allowed_artifacts` and `private` offer
fields to the provider manifest. They are stored on-chain as the
`net.oasis.scheduler.offer.*` metadata keys read by the ROFL Scheduler,
so the access policy can now be changed with `rofl provider
update-offers` instead of editing the node config and restarting the
machine.

Account names from the wallet and the address book are resolved to
addresses, artifact kinds and hashes are validated up front and list
entries are sorted and deduplicated so that reordering them in the
manifest does not produce a spurious offer update.
Offers marked as private in their on-chain metadata are now omitted from
`rofl provider list --show-offers`, `rofl provider show` and
`rofl deploy --show-offers`. The new `--all` (`-a`) flag includes them
again and private offers are marked as such when listed.

Automatic offer selection in `rofl deploy` skips private offers, but an
offer explicitly requested via `--offer` is still resolved so that
whitelisted users can rent one.
Documents the `allowed_creators`, `allowed_artifacts` and `private`
offer fields, the `--all` flag of the offer listings and extends the
example provider manifest with an offer reserved for the provider's own
team.
@netlify

netlify Bot commented Aug 5, 2026

Copy link
Copy Markdown

Deploy Preview for oasisprotocol-cli canceled.

Name Link
🔨 Latest commit a2c32dd
🔍 Latest deploy log https://app.netlify.com/projects/oasisprotocol-cli/deploys/6a73441f2c4d310008785144

@anzoman anzoman self-assigned this Aug 5, 2026
@anzoman
anzoman force-pushed the anzoman/feature/rofl-offer-access-policy branch from fb07310 to a2c32dd Compare August 5, 2026 14:09
@anzoman
anzoman requested a review from matevz August 5, 2026 14:12
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