Skip to content

Conversation

@jkrvivian
Copy link
Contributor

@jkrvivian jkrvivian commented Oct 21, 2024

Description of change

Remove multiple versions of types in the Move and Rust codebases, and start versioning from the latest type version.

Move

The renaming changes in accordance with the rules:

  • Add version postfix to those that will certainly be upgraded in the future.
  • No version postfix to those that won't be new version.
  • For the wrappers, we don't add Wrapper postfix.
  • For inner types, we don't add Inner, just add version postfix {structure}V1.

Structures with versioning:

  • SystemParametersV2 -> SystemParametersV1
  • IotaSystemStateWrapper -> IotaSystemState
  • IotaSystemStateInnerV2 -> IotaSystemStateV1
  • ValidatorWrapper -> Validator
  • Validator -> ValidatorV1
  • ValidatorMetadata -> ValidatorMetadataV1
  • ValidatorSet -> ValidatorSetV1
  • ValidatorEpochInfoEvent -> ValidatorEpochInfoEventV1
  • SystemEpochInfoEvent -> SystemEpochInfoEventV1
  • StakingPool -> StakingPoolV1
  • StorageFund -> StorageFundV1
  • VotingPowerInfoV2 -> VotingPowerInfoV1

Rust

  • Align type names to Move codes
    Note: IotaSystemStateWrapper still exists and corresponds to IotaSystemState in Move. It's a thin wrapper for accessing the inner object and is rarely used in Rust. It's used only in genesis snapshots and testing, and in most cases, we use the enum IotaSystemState instead.
  • IotaSystemStateInnverV2 -> IotaSystemStateV1
  • ValidatorWrapper -> Validator
  • UnverifiedValidatorOperationCapV1 -> UnverifiedValidatorOperationCap

Links to any relevant issues

Close partially #1083

Type of change

Choose a type of change, and delete any options that are not relevant.

  • Breaking change

Change checklist

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that new and existing unit tests pass locally with my changes

jkrvivian and others added 9 commits October 21, 2024 11:14
…he iota-system types (#3048)

* refactor(iota-framework/iota-system): Remove deprecated structures

* refactor(iota-framework/iota-system): Rename ValidatorSet to ValidatorSetV1

* refactor(iota-framework/iota-system): Rename Validator to ValidatorV1

* refactor(iota-framework/iota-system): Rename ValidatorMetadata to ValidatorMetadataV1

* refactor(iota-framework/iota-system): Rename IotaSystemStateInnerV1 to IotaSystemStateV1

* refactor(iota-framework/iota-system): Rename SystemEpochInfoEvent to SystemEpochInfoEventV1

* refactor(iota-framework/iota-system): Rename StakingPool to StakingPoolV1

* refactor(iota-framework/iota-system): Rename PoolTokenExchangeRate to PoolTokenExchangeRateV1

* refactor(iota-framework/iota-system): Rename StakedIota to StakedIotaV1

* refactor(iota-framework/iota-system): Rename StorageFund to StorageFundV1

* refactor(iota-framework/iota-system): Rename TimelockedStakedIota to TimelockedStakedIotaV1

* refactor(iota-framework/iota-system): Rename IotaSystemStateInner to IotaSystemState in comments
* !chore(core-node): remove deprecated tables in `AuthorityEpochTables`

* !chore(core-node): remove deprecated tables in `IndexStoreTables`

* chore(scripts): add `target` to ignored_dirs
…ochTable` logic (#3139)

* !chore(core-node): remove unused EpochFlags

* !chore(core-node): remove ExecutedInEpochTable EpochFlag incl. special logic
…rStateUpdate` (#3173)

* refactor(iota-types/authenticator-state): Rename AuthenticatorStateUpdate

* refactor(iota-types/authenticator-state): Fix fmt and clippy
@jkrvivian jkrvivian added the node Issues related to the Core Node team label Oct 21, 2024
@miker83z miker83z requested a review from a team October 21, 2024 16:24
bingyanglin and others added 4 commits October 23, 2024 10:40
…mulatorV2` (#3524)

* Remove StateAccumulatorV1

* Remove the state_accumulator_v2 always true logic

* Rename state_accumulator_v2_enabled_config to be state_accumulator_config

* Set the default state_accumulator_config

* Rename with_state_accumulator_v2_enabled_callback to be with_state_accumulator_callback

* Rename StateAccumulatorV2 to be StateAccumulatorV1

* clippy and fmt

* Remove StateAccumulatorV1Enabled* flags
* Clean narwhal type versioning

* Fix Batch::V2 to Batch::V1 in test
* Clean data types related to iota-e2e-tests

* Rename ExecuteTransactionRequestV1::new_v2 to be new_v1
@alexsporn alexsporn marked this pull request as ready for review October 23, 2024 09:48
@alexsporn alexsporn requested review from a team, miker83z and valeriyr as code owners October 23, 2024 09:48
@miker83z
Copy link
Contributor

d4ff63c fixes (this).
But now that it compiles, some simtests are failing.

@github-actions
Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: d4ff63c

✅ Preview: https://apps-backend-29a719c9ccbdb9b80c97b599a599d8953354da-14pgav61v.vercel.app

@github-actions
Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: d4ff63c

✅ Preview: https://wallet-dashboard-a225fcfa1e2f852205a61a7cd1d5d93e92-6deakiiop.vercel.app

@github-actions
Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: d4ff63c

✅ Preview: https://iota-rebased-explorer-092603f1de8088243ccb8b861b23e-guvs8tbao.vercel.app

@github-actions
Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: 7d2c562

✅ Preview: https://apps-backend-29a719c9ccbdb9b80c97b599a599d8953354da-ptg0dnepw.vercel.app

@github-actions
Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: 7d2c562

✅ Preview: https://iota-rebased-explorer-092603f1de8088243ccb8b861b23e-k9zq003tz.vercel.app

@github-actions
Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: 7d2c562

✅ Preview: https://wallet-dashboard-a225fcfa1e2f852205a61a7cd1d5d93e92-b17sc9sbv.vercel.app

@miker83z miker83z removed request for a team October 25, 2024 15:06
@miker83z miker83z merged commit 2204491 into develop Oct 25, 2024
30 of 37 checks passed
@miker83z miker83z deleted the core-node/feat/remove-multiple-types branch October 25, 2024 16:10
alexsporn pushed a commit to iotaledger/iota-rust-sdk that referenced this pull request Oct 29, 2024
DaughterOfMars pushed a commit to iotaledger/iota-rust-sdk that referenced this pull request Jan 7, 2025
DaughterOfMars pushed a commit to iotaledger/iota-rust-sdk that referenced this pull request Feb 17, 2025
DaughterOfMars pushed a commit to iotaledger/iota-rust-sdk that referenced this pull request Feb 24, 2025
DaughterOfMars pushed a commit to iotaledger/iota-rust-sdk that referenced this pull request May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

node Issues related to the Core Node team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants