Skip to content

[framework] Display Registry#23710

Merged
manolisliolios merged 20 commits intomainfrom
ml/display-registry
Mar 9, 2026
Merged

[framework] Display Registry#23710
manolisliolios merged 20 commits intomainfrom
ml/display-registry

Conversation

@manolisliolios
Copy link
Copy Markdown
Contributor

@manolisliolios manolisliolios commented Sep 23, 2025

Description

Introduces new Display using a registry (similar to coin):

  1. Display no longer is restricted to T: key. We can have display for non top-level objects.
  2. Enable migration paths from Display<T> and Publisher, as well as legacy deletion after migration.
  3. Enable "system" migration path using a singleton Cap, that will be destroyed after moving V1s to the registry.

Why we are doing this?

  1. Display indexing currently relies on events, making it extremely hard to maintain proper indexing. This takes away this problem, by having a fixed point of lookup and rely on the live object set.
  2. We wanna enable display for non-key objects too
  3. Future-proof our way into an even better creation (e.g when args on init are landed)

TODOS:

  • Create the core framework code
  • Add move tests for all cases
  • Style / naming nits
  • Create new system object 0xd(?)
  • Leverage GQL's indexer's db to get a snapshot of V1 display objects and create the PTBs to migrate them
  • Come up with a secure key policy to store the migration cap (if we agree on doing it that way)
  • Deprecate V1 package (display.move) [in a follow-up PR]

Test plan

How did you test the new or updated feature?


Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol: Enables Display V2 (0xd system object is created)
  • Nodes (Validators and Full nodes):
  • gRPC:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:

@vercel
Copy link
Copy Markdown

vercel bot commented Sep 23, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sui-docs Ready Ready Preview, Comment Mar 9, 2026 5:02pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
multisig-toolkit Ignored Ignored Preview Mar 9, 2026 5:02pm
sui-kiosk Ignored Ignored Preview Mar 9, 2026 5:02pm

Request Review

manolisliolios added a commit that referenced this pull request Oct 15, 2025
## Description 

Introduce all the logic (but not enable) for the creation of Display
Registry (`0xd`).

This will land before #23710. On that PR, the feature flag will be
enabled & will have e2e tests.

## Test plan 

Just testing that the existing tests pass. 

**This PR does not do the creation of the object, only sets up the types
& logic so we can release in two steps (to avoid breaking indexing)**.
Tests for that will be introduced in the PR that enables the feature
flag, because the move code is not yet landed (so creation cannot really
happen yet!)

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] gRPC:
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
@manolisliolios manolisliolios temporarily deployed to sui-typescript-aws-kms-test-env October 15, 2025 06:49 — with GitHub Actions Inactive
@damirka damirka temporarily deployed to sui-typescript-aws-kms-test-env December 3, 2025 11:21 — with GitHub Actions Inactive
@damirka damirka temporarily deployed to sui-typescript-aws-kms-test-env December 3, 2025 11:28 — with GitHub Actions Inactive
@damirka damirka temporarily deployed to sui-typescript-aws-kms-test-env December 10, 2025 12:28 — with GitHub Actions Inactive
Copy link
Copy Markdown

Copilot AI commented Feb 10, 2026

@damirka I've opened a new pull request, #25390, to work on those changes. Once the pull request is ready, I'll request review from you.

}

#[test_only]
public(package) fun create_for_testing(ctx: &mut TxContext) {
Copy link
Copy Markdown
Contributor

@damirka damirka Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we're missing a function that returns DisplayRegistry for testing.
Additionally, please make sure to add it to test_scenario::create_system_objects (this one is easy to miss!) (missed that you've added it already)

@manolisliolios manolisliolios temporarily deployed to sui-typescript-aws-kms-test-env March 9, 2026 11:15 — with GitHub Actions Inactive
@manolisliolios manolisliolios marked this pull request as ready for review March 9, 2026 11:15
@manolisliolios manolisliolios requested review from a team and mystenmark as code owners March 9, 2026 11:15
@manolisliolios manolisliolios temporarily deployed to sui-typescript-aws-kms-test-env March 9, 2026 11:16 — with GitHub Actions Inactive
@manolisliolios manolisliolios temporarily deployed to sui-typescript-aws-kms-test-env March 9, 2026 17:00 — with GitHub Actions Inactive
@manolisliolios manolisliolios merged commit fa9eab2 into main Mar 9, 2026
59 checks passed
@manolisliolios manolisliolios deleted the ml/display-registry branch March 9, 2026 17:25
amnn added a commit that referenced this pull request Mar 10, 2026
## Description
GraphQL will look for and preference `sui::display_registry::Display<T>`
over `sui::display::Display<T>` (+ its events) when computing the
Display output for a given Move Value.

## Test plan

New E2E tests:

```
$ cargo nextest run            \
  -p sui-indexer-alt-e2e-tests \
  --test transactional_tests   \
  -- display_v2
```

## Stack

- #23710 
- #25240 
- #25241

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] gRPC:
- [ ] JSON-RPC: 
- [x] GraphQL: Adds support for Display Registry to GraphQL:
`MoveValue.display` will look for a `Display<T>` stored in the Display
Registry and will use that as the source of truth for its type's format.
This takes precedence over any Display v1 formats that exist for this
type.
- [ ] CLI: 
- [ ] Rust SDK:
- [ ] Indexing Framework:
amnn added a commit that referenced this pull request Mar 10, 2026
## Description

Relax the type of `DisplayFieldsResponse` to allow values to be
arbitrary JSON, instead of just strings, so it can support Display v2
fields.

## Test plan

CI

## Stack

- #23710 
- #25242

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] gRPC:
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
- [ ] Indexing Framework:
amnn added a commit that referenced this pull request Mar 10, 2026
## Description
Replicate the GraphQL alt integration for JSONRPC-alt.

## Test plan

New E2E tests:

```
cargo nextest run              \
  -p sui-indexer-alt-e2e-tests \
  --test transactional_tests   \
  -- jsonrpc/objects/display/display_v2
```

## Stack

- #23710 
- #25242
- #25358 

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] gRPC:
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
- [ ] Indexing Framework:
amnn added a commit that referenced this pull request Mar 11, 2026
## Description

Add support to legacy JSONRPC for Display v2.

## Test plan

New E2E tests:

```
$ cargo nextest run -p sui-json-rpc-tests --test rpc_server_tests
```

## Stack

- #23710 
- #25242
- #25358 
- #25359 

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] gRPC:
- [x] JSON-RPC: Adds support for Display Registry to JSONRPC: When
`showDisplay` is set, the RPC will look for a `Display<T>` stored in the
Display Registry and will use that as the source of truth for its type's
format. This takes precedence over any Display v1 formats that exist for
this type.
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
- [ ] Indexing Framework:
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.

7 participants