Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4/n][enums] Move enums all of the Move tests #17246

Merged

Conversation

tzakian
Copy link
Contributor

@tzakian tzakian commented Apr 19, 2024

Description

This PR consists of tests only! (and updates to exp files of existing tests).

Stack:

Test Plan

File format

Status: Done

  • Bounds checking and serialization proptests updated.

Deserializer

Status: Done

  • Added test to verify that we are properly checking for versioning issues
    -- e.g., if someone manually changed the version of the serialized module
    so the version was pre-enums, but contained enum-data inside of it.

Serializer

Status: Done

  • Ensured that serializing a version 7 module at version 6 works as long as
    no version 7 features are used, and that the resulting module can be
    deserialized into version 6 and version 7 modules.
  • Proptests for serializer/deserializer round-trips
  • Tested round-trip properties:
    • Version 7 module with no eums can:
      • Be serialized under version 6
      • Result can be deserialized under version 6 and 7 and reserialized at version 6 and 7.
  • Updated serializer, and added tests to make sure we use the module's version when serializing, unless it is specified as an override.

Compatibility

Status: Done

  • Add config to allow adding new variants
  • Existing variants must be in the same order (have the same tag)
  • Cannot remove a variant
  • Cannot change a field or fields of an existing variant
  • Cannot rename existing variant

Bytecode Verifier

Status: Done

  • Unpack
    • [type-checker] Unpack a non-generic enum with generic instruction (by value, imm ref, and mut ref)
      • [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/unpack_non_generic_enum_generically.mvir]
    • [type-checker] Unpack a generic enum with non-generic instruction (by value, imm ref, and mut ref)
      • [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/unpack_generic_enum_non_generically.mvir]
    • [type-checker] Unpack a generic enum with invalid type arguments (by value, imm ref, and mut ref)
      • [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/unpack_generic_enum_wrong_type_arg.mvir]
    • ImmRef
      • [type-checker] Unpack a mutable reference [generic, non-generic]
      • [type-checker] Unpack a value [generic, non-generic]
    • MutRef
      • [type-checker] Unpack an immutable reference [generic, non-generic]
      • [type-checker] Unpack a value [generic, non-generic]
    • [stack-balance] Unpack with invalid number of arguments [too many, too little]
    • [bound-checker] Invalid variant index [generic, non-generic]
    • [bound-checker] Invalid enum definition/definition instantiation index [generic, non-generic]
  • Write test to make sure we properly track borrows out of variant ref unpacks:
    • [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/reference_safety/factor_invalid_2_enum.mvir]
    • [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/reference_safety/imm_borrow_on_mut_trivial_invalid_enum.mvir]
  • Pack
    • [type-checker] Pack a non-generic enum [generic]
      • [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/pack_generic_enum_non_generically.mvir]
    • [type-checker] Pack a generic enum [non-generic]
      • [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/pack_non_generic_enum_generically.mvir]
    • [type-checker] Pack a generic enum with invalid type arguments [generic]
      • [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/pack_generic_enum_invalid_type_arguments.mvir]
    • [bound-checker] Invalid variant index [generic, non-generic]
    • Pack with invalid number of arguments [generic, non-generic][too many, too little]
      • [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/stack_usage_verifier/pack_invalid_number_arguments_enum.mvir]
    • Pack with references [generic, non-generic][imm-ref, mut-ref]
      • [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/pack_enum_with_refs.mvir]
  • VariantSwitch/Jump Table (these cannot be IR tests sadly except for the last)
    • [type-checker] Head Type
      • Head type isn't an enum [struct, primitive type]
        • Structurally impossible to represent since it takes an enum definition index
      • Head type is a reference type [enum, struct, primitive type]
        • Structurally impossible to represent since it takes an enum definition index
      • Head type is to a different enum [generic, mono]
        • [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/variant_switch_invalid_head_type.mvir]
    • Switch value type
      • [type-checker] Not a reference [enum, struct, primitive type]
      • [type-checker] Is a mutable reference [enum, struct, primitive type]
      • [type-checker] Switch value type and head type disagree [enum/struct, struct/enum, enum/primitive, struct/primitive, reference[enum,struct,primitive]]
        • [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/variant_switch_invalid_head_type.mvir]
      • [bounds-checker] Invalid code index in jump table
      • [bound-checker] Invalid jump table index
      • Exhaustiveness
        • [type-checker] Write test that checks we properly error if an inexhaustive jump table is supplied [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/variant_switch_partial_enum_switch.mvir]

Abilities

  • Enum can have fewer abilities than the type that it contains [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/ability_field_requirements/unrestricted_enum_has_resource_field.exp]
  • Enum cannot have abilities that a type that it contains does not satisfy [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/ability_field_requirements/unrestricted_enum_has_resource_field.mvir]

check_bounds

  • Generic enum cannot have too few type arguments [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/check_bounds/too_few_type_actuals_enum.mvir]
  • Generic enum cannot have too many type arguments [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/check_bounds/too_many_type_actuals_enum.mvir]

check_duplication

  • Cannot have enum and struct in the same module with the same name [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/check_duplication/duplicate_enum_and_struct_names.mvir]
  • Cannot have two enums in the same module with the same name [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/check_duplication/duplicate_enum_name.mvir]
  • Cannot have an enum variant with duplicate field names [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/check_duplication/duplicate_field_name_enum.mvir]
  • Cannot have an enum with duplicate variant names [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/check_duplication/duplicate_variant_name.mvir]
  • Cannot have an empty enum [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/check_duplication/empty_enums.mvir]
  • Check for duplicated variant handles [external-crates/move/crates/bytecode-verifier-tests/src/unit_tests/duplication_tests.rs]
  • Check for duplicated datatype names [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/enum_defs/module_enum_struct_shared_name.mvir]

enum_defs

  • Can have an enum with the same name as the module [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/enum_defs/module_enum_shared_name.mvir]
  • Cannot have mutually recursive enums (simple test) [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/enum_defs/mutual_recursive_enum.mvir]
  • More complex recursive enum definition checks [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/enum_defs/recursive_enum.mvir]
  • Cannot declare an enum with references inside of it [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/enum_defs/ref_in_enum.mvir]

instantiaion_loops [each test is an existing test that we have for structs but ported over to enums]

  • Complex type instantiation loop using enums [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/instantiation_loops/complex_1_enum.mvir]
  • Mutually recursive enum type instantiated with a type is OK [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/instantiation_loops/mutually_recursive_non_generic_type_ok_enum.mvir]
  • Mutually recursive enum type instantiation with a type is OK since the types eventually shuffle to ground out [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/instantiation_loops/mutually_recursive_three_args_type_con_non_generic_types_ok_enum.mvir]
  • ...

locals_safety

  • Re-assign an enum that doesn't have drop [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/locals_safety/assign_enum_resource.mvir]

stack_usage_verifier

  • Unpack an enum variant with too many fields [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/stack_usage_verifier/unpack_extra_binding_enum.mvir]
  • Unpack an enum variant with too few fields [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/stack_usage_verifier/unpack_missing_binding_enum.mvir]

type_safety

  • Write a mutable non-drop reference containing an enum [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/assign_local_resource.mvir]
  • Write a mutable non-drop reference containing an enum twice [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/assign_local_resource_twice.mvir]
  • Write a mutable non-drop reference contained in an enum [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/assign_resource_type_enum.mvir]
  • Dereference an non-copy enum reference type [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/cant_deref_resource.mvir]
  • Check that equality can occur over enum references without drop [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/equality_resource_refs.mvir]
  • Check that equality cannot be called over non-drop enum types [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/equality_resource_values.mvir]
  • Verify that we can take immutable references into an enum variant, and then take those fields by ownership once those references are no longer live [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/generic_abilities_imm_unpack_enum.mvir]
  • Verify that we can take mutable references into an enum variant, and then take those fields by ownership once those references are no longer live [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/generic_abilities_unpack_mut_enum.mvir]
  • Verify that we properly typecheck a valid generic pack of an enum variant [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/generic_abilities_pack.mvir]
  • Try to copy an enum type that does not have copy [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/generic_abilities_struct_non_nominal_resource.mvir]
  • Unpack a generic enum where the inner value's type parameter doesn't have copy, and then fail to the destroy the value after unpacking [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/generic_abilities_unpack.mvir]
  • Can call a generic function with an instantiated enum variant value [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/generic_call.mvir]
  • Can borrow a deep generic field from within an enum/its variants and properly dereference and return the resulting value [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/generic_field_borrow.mvir]
  • Can borrow and unpack an enum reference returned from a generic function call [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/generic_field_unpack_borrow_after_call_enum.mvir]
  • Can import and use a generic enum type from another module [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/generic_import_struct.mvir]
  • Example using Option (the actual one this time!) and making sure it typechecks [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/generic_option.mvir]
  • We can call pack a generic enum variant correctly [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/generic_pack.mvir]
  • Check correct ability constraints for enum definition parameters [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/generic_struct_def.mvir]
  • Type mismatch in a field write inside an enum variant [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/invalid_field_write_mut_unpack_enum.mvir]
  • Type mismatch in generic unpack of enum [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/generic_unpack_type_mismatch.mvir]
  • Type mismatch in generic pack of enum (and struct) [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/generic_pack_type_mismatch.mvir]
  • Try to overwrite a non-drop value by mut ref held inside an enum [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/invalid_resouce_write_unpack_mut_enum.mvir]
  • Try to unpack_mut on an immutable reference (both generic and non-generic) [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/mut_borrow_from_imm_ref_enum.mvir]
  • Pass an imm ref enum type to a function expecting a mut ref [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/mut_call_with_imm_ref_enum.mvir]
  • Make sure bytecode operations ability requirements respect enum type abilities [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/phantom_params/bytecode_ops_abilities_bad.mvir]
  • Make sure bytecode operations ability requirements work with enum abilities (positive tests) [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/phantom_params/bytecode_ops_abilities_ok.mvir]
  • Verify ability constraints are properly enforced for enum types [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/phantom_params/constraints_abilities_bad.mvir]
  • Verify ability constraints are properly enforced for enum types (positive tests)[external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/phantom_params/constraints_abilities_ok.mvir]
  • Make sure field abilities (or lack thereof) are properly computed and enforced [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/phantom_params/fields_abilities_bad.mvir]
  • Make sure field abilities (or lack thereof) are properly computed and enforced (positive tests)[external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/phantom_params/fields_abilities_ok.mvir]
  • Check for illegal phantom type parameter usage on enums [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/phantom_params/struct_definition_bad.mvir]
  • Check for legal phantom type parameter usage on enums [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/phantom_params/struct_definition_ok.mvir]
  • Check for invalid instantiations of a ref enum type in function parameters [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/ref_type_param.mvir]
  • Check for invalid (and exploitable) usage patterns around references of enums [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/ref_type_param_exploits.mvir]
  • Pack a monomorphic enum with the wrong (non-primitive) type [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/resource_instantiate_bad_type.mvir]
  • Return type mismatch with enum type and unused non-drop enum (sequencing of these checks) [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/return_type_mismatch_and_unused_resource.mvir]
  • Verify that generic enums instantiated with other (non-copy/drop) enums behave as expected [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/struct_kind_inference.mvir]
  • Verify that a non-copy/drop enum can be unpacked, and its contents returned from a function successfully [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/unpack_resource.mvir]
  • Verify that unpacking with a different type, but same variant name/tag/layout will result in a type error [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/unpack_wrong_type.mvir]
  • Verify that we can create droppable enums, and that they can be dropped [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/unrestricted_instantiate.mvir]
  • Try to pack a monomorphic enum with an invalid field type [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/unrestricted_instantiate_bad_type.mvir]
  • Fail to do anything with a non-drop enum type [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/unused_resource_holder.mvir]
  • Ensure that type parameter constraints are properly computed and reported for function type parameters without the proper abilities even though they are inside a native container (vector)
    [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/type_safety/vector_type_param.mvir]
  • Fail to handle an undroppable value within a variant switch [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/control_flow/variant_switch.mvir]
  • Try to use an unassigned value within a variant switch arm [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/control_flow/variant_switch.mvir]
  • Fail to unpack an undroppable enum within a variant switch [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/control_flow/variant_switch_successor.mvir]
  • Make sure we properly construct the control flow graph for a variant switch as an unconditional branch [external-crates/move/crates/bytecode-verifier-transactional-tests/tests/control_flow/variant_switch_unconditional_branch.mvir]
  • Added low-level tests to make sure we properly construct the control flow graph [external-crates/move/crates/move-binary-format/src/unit_tests/control_flow_graph_tests.rs] and in [external-crates/move/crates/move-ir-compiler/src/unit_tests/cfg_tests.rs]
  • Added test to make sure successors are always sorted/stable, and that the control-flow graph generated is the same regardless of the order of the jumps within a variant switch [external-crates/move/crates/move-binary-format/src/unit_tests/control_flow_graph_tests.rs:out_of_order_blocks_variant_switch]

VM

  • Test trying to unpack the wrong variant (generic, non-generic)
  • Test that execution proceeds normally, and that we get expected results for computations that use enums
  • Test that mutable references taken from an enum variant can be modified, and that these modifications are reflected correctly
  • Test that we can mutate the variant inside of an enum type.
  • Added tests to make sure we can't infinitie loop within a variant switch [external-crates/move/crates/move-vm-transactional-tests/tests/enums/variant_switch_loop.mvir]

Values

  • Test that enum Option is backwards compatible with vector Option.

@tzakian tzakian requested review from cgswords, tnowacki, dariorussi and a team April 19, 2024 22:24
Copy link

vercel bot commented Apr 19, 2024

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

Name Status Preview Comments Updated (UTC)
sui-core ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 24, 2024 5:53pm
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 24, 2024 5:53pm
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview May 24, 2024 5:53pm
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview May 24, 2024 5:53pm
sui-typescript-docs ⬜️ Ignored (Inspect) Visit Preview May 24, 2024 5:53pm

@cgswords
Copy link
Contributor

cgswords commented May 2, 2024

Should we preserve / move the development/enums/matching tests to move_2024/ for the compiler suite as well? It is somewhat redundant, but I often rely on the compiler tests during development.

Copy link
Contributor

@cgswords cgswords left a comment

Choose a reason for hiding this comment

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

Reviewed the new transactonal tests with some feedback

Copy link
Contributor

@cgswords cgswords left a comment

Choose a reason for hiding this comment

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

The changes look good to me but I think bad_guard_2.move should be disallowed by the compiler outright due to how match is compiled. I'm going to put a diff up soon to address this.

@tzakian tzakian force-pushed the tzakian/move-enums-implementation branch from 9a3dd52 to 5c315e9 Compare May 24, 2024 00:42
@tzakian tzakian force-pushed the tzakian/move-enums-move-tests branch from 5cf287d to f076f43 Compare May 24, 2024 00:42
tzakian added a commit that referenced this pull request May 24, 2024
## Description 

This is the top-level (and final!) PR in the stack for Move enums.

This PR
* Updates the protocol config to support the new execution version
* Adds new e2e adapter tests to make sure we handle enums properly
* Updates snapshots for tests (and protocol config snapshots and the
like).
This also then tests all other tests that have been added below this in
the stack (e.g., the package resolver tests, graphql tests, all the Move
tests, other misc tests that were added).

**NB:** Before landing this we need to determine the best way of turning
on the correct binary-version for testing only. So I would encourage
mainly looking at the tests (and the updated snapshots for the replay
tool). Protocol-config changes, and snapshots for them will need to be
updated as this gets closer to landing, and we further concretize the
testing/pre-rollout/rollout plan.

## Stack:
* #17245 
* #17246 
* #17247 
* #17248 
* #17249 
* #17250 
* #17251 **<< You are here** 🎉 

## Test plan 

It's pretty much all tests.
tzakian added a commit that referenced this pull request May 24, 2024
## Description 

Adds support for Move enums to both graphql and json-rpc. This adds a
couple different things. At a high level:
1. Adds an interface `IMoveDatatype` that allows for access to common
fields between both Move structs and enums (e.g., name, type parameters,
abilities).
2. Adds methods `datatype(name: String)` and `datatypes` to
`MovePackage` that returns datatypes. Note that datatype names are still
sorted in the same way as before in pagination (in particular: it will
not be paginated as all structs, then all enums or vis-versa, but
paginated in sorted order on the datatype names). This is due to the way
`datatypes` is implemented in the package resolver.
3. Adds `MoveEnum` as a GraphQL type and associated machinery.

This PR is meant to be a logically-reviewable portion but is not
land-able on its own. It must be merged in with the changes in the rest
of this stack to be landed.

## Stack:
* #17245
* #17246 
* #17247 
* #17248 
* #17249 
* #17250 **<< You are here**
* #17251 

## Test plan 

Added new tests in this PR for the new features. 

---

## 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): 
- [ ] Indexer: 
- [X] JSON-RPC: 
- [X] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
tzakian added a commit that referenced this pull request May 24, 2024
## Description 

Adds support for Move enums to the Sui package resolver crate along with
tests for it.

This PR is meant to be a logically-reviewable portion but is not
land-able on its own. It must be merged in with the changes in the rest
of this stack to be landed.

## Stack:
* #17245
* #17246 
* #17247 
* #17248 
* #17249 **<< You are here**
* #17250 
* #17251 

## Test plan 

Added tests in the PR to make sure we can properly resolve enum types. 

---

## 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): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
tzakian added a commit that referenced this pull request May 24, 2024
## Description 

Changes for Move enums in `sui-execution`. Generally nothing surprising.
Only thing worth note is that enums are not allowed to be OTWs (see
tests in top commit in this stack).

This PR is meant to be a logically-reviewable portion but is not
land-able on its own. It must be merged in with the changes in the rest
of this stack to be landed.


## Stack:
* #17245
* #17246 
* #17247 
* #17248 **<< You are here**
* #17249 
* #17250 
* #17251 

## Test plan 

Tests in the top commit on this stack.
…ms (#17247)

## Description 

This PR contains the changes needed for Move enums in sui-types, the
protocol config changes (except for bumping the bytecode version), along
with other misc/smaller changes that are not easily categorized.

This PR is meant to be a logically-reviewable portion but is not
land-able on its own. It must be merged in with the changes in the rest
of this stack to be landed.

## Stack:
* #17245
* #17246 
* #17247 **<< You are here**
* #17248 
* #17249 
* #17250 
* #17251 

## Test plan 

Tests are in the top commit in this stack here:
@tzakian tzakian merged commit d0a9c1b into tzakian/move-enums-implementation May 24, 2024
14 of 18 checks passed
@tzakian tzakian deleted the tzakian/move-enums-move-tests branch May 24, 2024 17:46
tzakian added a commit that referenced this pull request May 24, 2024
## Description 

This adds the enums implementation for Move. This PR only contains the
changes for enums within `external-crates/move` and nowhere else. This
PR _does not_ contain any tests. The tests for these changes can be
found in the PR above in the stack.

Note that individual commits are cut out within this PR to (hopefully)
make the review process a bit easier.

## Stack:
* #17245 **<< You are here**
* #17246 
* #17247 
* #17248 
* #17249 
* #17250 
* #17251 

## Test plan 

Tested in the PR above this. 



---

## 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: Adds a new protocol version, and enables Move enums on
devnet.
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [X] JSON-RPC: Adds support for Move enum values in returned json-rpc
results.
- [X] GraphQL: Adds support for Move enum values and types to GraphQL.
- [ ] CLI: 
- [ ] Rust SDK:
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