Skip to content

Conversation

tzakian
Copy link
Contributor

@tzakian tzakian commented Sep 10, 2024

Description

Boxes fields in the MoveTypeLayout to make the enum size smaller for type layouts.

Test plan

Added test to check size of the enums + make sure existing tests pass.


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: Increase the maximum type layout size in the VM. Most users should not notice this change.
  • Nodes (Validators and Full nodes):
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:
  • REST API:

Copy link

vercel bot commented Sep 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 11, 2024 5:25am
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Sep 11, 2024 5:25am
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Sep 11, 2024 5:25am
sui-typescript-docs ⬜️ Ignored (Inspect) Visit Preview Sep 11, 2024 5:25am

Comment on lines +37 to +39
entry fun x4(): X4 {
X4::U64(0)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Funny that this is all it took to hit it still

@tzakian tzakian force-pushed the tzakian/box-layouts branch from 6b7ce71 to ed3d6ed Compare September 11, 2024 05:21
@tzakian tzakian merged commit 0fdeb2d into main Sep 11, 2024
49 checks passed
@tzakian tzakian deleted the tzakian/box-layouts branch September 11, 2024 05:53
suiwombat pushed a commit that referenced this pull request Sep 16, 2024
## Description 

Boxes fields in the `MoveTypeLayout` to make the enum size smaller for
type layouts.

## Test plan 

Added test to check size of the enums + make sure existing tests pass. 

---

## 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.

- [X] Protocol: Increase the maximum type layout size in the VM. Most
users should not notice this change.
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
- [ ] REST API:
tzakian pushed a commit that referenced this pull request Feb 17, 2025
## Description 

The `MoveFieldLayout` struct `fields` was wrapped in a box as part of
#19310, which states in its
reasoning:

> Boxes fields in the MoveTypeLayout to make the enum size smaller for
type layouts.

However, this field being boxed does not affect the enums which this was
referring to as it is also boxed in the variants. This means that the
variant size of those enums is always the size of a pointer. Thus, this
additional box around the vec serves only to create an additional
indirection.

## 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:
- [ ] Nodes (Validators and Full nodes): 
- [ ] gRPC:
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
DaughterOfMars added a commit to iotaledger/iota that referenced this pull request Mar 3, 2025
The `MoveFieldLayout` struct `fields` was wrapped in a box as part of MystenLabs/sui#19310, which states in its reasoning:

> Boxes fields in the MoveTypeLayout to make the enum size smaller for type layouts.

However, this field being boxed does not affect the enums which this was referring to as it is also boxed in the variants. This means that the variant size of those enums is always the size of a pointer. Thus, this
additional box around the vec serves only to create an additional indirection.
DaughterOfMars added a commit to iotaledger/iota that referenced this pull request Mar 4, 2025
The `MoveFieldLayout` struct `fields` was wrapped in a box as part of MystenLabs/sui#19310, which states in its reasoning:

> Boxes fields in the MoveTypeLayout to make the enum size smaller for type layouts.

However, this field being boxed does not affect the enums which this was referring to as it is also boxed in the variants. This means that the variant size of those enums is always the size of a pointer. Thus, this
additional box around the vec serves only to create an additional indirection.
Ginowine pushed a commit to iotaledger/iota that referenced this pull request Mar 11, 2025
The `MoveFieldLayout` struct `fields` was wrapped in a box as part of MystenLabs/sui#19310, which states in its reasoning:

> Boxes fields in the MoveTypeLayout to make the enum size smaller for type layouts.

However, this field being boxed does not affect the enums which this was referring to as it is also boxed in the variants. This means that the variant size of those enums is always the size of a pointer. Thus, this
additional box around the vec serves only to create an additional indirection.
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.

2 participants