Skip to content

Conversation

@Dkwcs
Copy link
Contributor

@Dkwcs Dkwcs commented Feb 14, 2025

Description of change

Optimizes some calls to is_empty in loop conditions. This saves on the
function call overhead and uses the bytecode instruction directly.
Accroding to changes.

Links to any relevant issues

Fixes #5138 .

Type of change

  • Enhancement (a non-breaking change which adds functionality)

How the change has been tested

iota-framework
iota move test

miker83z and others added 5 commits February 3, 2025 22:38
* feat(iota-framework/move-stdlib): Deprecated `fixed_point32`, new type implemented uq32_32
…oop conditions. This saves on the

function call overhead and uses the bytecode instruction directly.
@Dkwcs Dkwcs added the vm-language Issues related to the VM & Language Team label Feb 14, 2025
@Dkwcs Dkwcs self-assigned this Feb 14, 2025
@Dkwcs Dkwcs requested review from a team as code owners February 14, 2025 15:04
@vercel
Copy link

vercel bot commented Feb 14, 2025

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

Name Status Preview Comments Updated (UTC)
apps-backend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 19, 2025 3:30pm
apps-ui-kit ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 19, 2025 3:30pm
rebased-explorer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 19, 2025 3:30pm
wallet-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 19, 2025 3:30pm

@iota-ci iota-ci added the sc-platform Issues related to the Smart Contract Platform group. label Feb 14, 2025
@Dkwcs Dkwcs changed the title Vm lang/update some calls to is empty in loops fix(iota-framework/packges): update some calls to is empty in loops Feb 14, 2025
@Dkwcs Dkwcs requested a review from a team as a code owner February 15, 2025 20:57
@miker83z miker83z force-pushed the vm-lang/upstream-nov-dic-24 branch from d1ed70b to 268cb70 Compare February 18, 2025 12:09
@miker83z miker83z requested review from a team as code owners February 18, 2025 12:09
@miker83z miker83z force-pushed the vm-lang/upstream-nov-dic-24 branch from 268cb70 to d62c99d Compare February 18, 2025 12:13
…o vm-lang/Update-some-calls-to-is_empty-in-loops
@miker83z miker83z removed request for a team February 18, 2025 16:36
…o vm-lang/Update-some-calls-to-is_empty-in-loops
@Dkwcs Dkwcs merged commit c18ed7c into vm-lang/upstream-nov-dic-24 Feb 19, 2025
43 checks passed
@Dkwcs Dkwcs deleted the vm-lang/Update-some-calls-to-is_empty-in-loops branch February 19, 2025 17:15
miker83z added a commit that referenced this pull request Mar 20, 2025
* feat(docs/random): update docs realted to randomness (#5388)

* feat(iota-framework/move-stdlib): Deprecated `fixed_point32` (#5193)

* feat(iota-framework/move-stdlib): Deprecated `fixed_point32`, new type implemented uq32_32

* fix(iota-execution/crypto): update fastcrypto pointer and bls12381 scalar length path (#5378)

* fix(iota-execution/crypto): update fastcrypto pointer and bls12381 scalar length path

* bump to protocol v5

* update framework snapshot

* fix protocol version and snapshots

* fix iota-swarm

* fix(iota-benchmark): update simtest max protocol version

* revert MAX_ALLOWED msim fake version removal

* fix(move-stdlib): print string instead of bytes (#5446)

* fix(iota-framework/packges):  update some calls to is empty in loops (#5403)

* fix(iota-framework/packages): optimizes some calls to `is_empty` in loop conditions. This saves on the
function call overhead and uses the bytecode instruction directly.

* fix(iota-framework): check for IOTA in private balance functions (#5489)

* fix(iota-framework): check for IOTA in private balance functions

* feat(iota-framework-snapshot): the snapshots update

* fix(iota-framework): check for IOTA in `destroy_genesis_supply`

* feat(iota-framework-snapshot): the snapshots update

* fix(iota-swarm-config): update the baseline

* fix(iota-framework): update the compiled packages

* feat(iota-framework-snapshot): the snapshots update

* fix(iota-swarm-config): update the baseline

---------

Co-authored-by: Mirko Zichichi <[email protected]>

* fix(iota-framework/move-stdlib,crypto): Assertions for groth16 public inputs parser, snapshot regenerating (#5432)

* fix(iota-framework/move-stdlib,crypto): Assertions for groth16 public inputs parser, snapshot regenerating

* feat(iota-framework/move-stdlib): add to_string method for integer types (#5517)

* feat(iota-framework/move-stdlib): add to_string method for integer types

* feat: disallow new modules from being added to packages in deps-only mode (#5481)

* feat(iota-framework): add get_validator_address_by_pool_id function (#5377)

* feat(iota-framework): add get_validator_address_by_pool_id function

* chore: update snapshots

* chore: update bytecode snapshot and manifest

* update swarm config snapshot

* chore: update snapshot and binaries

* chore: update iota-framework-snapshot files

* chore: update swarm snapshot

* chore: update iota-framework-snapshot manifest

* chore: update swarm snapshot

* chore: update iota-framework-snapshot manifest

* chore: update snapshot

* chore: update manifest

---------

Co-authored-by: Mirko Zichichi <[email protected]>
Co-authored-by: miker83z <[email protected]>

* feat(iota-transactional-test-runner): add sponsor and gas payment for transactional-test-runner (#5518)

* feat(iota-transactional-test-runner):
Add a way to create programmable transactions with gas from a sponsor
address, rather than a sender address
Add the ability to specify an explicit gas payment object to a
programmable transaction in transactional test runner

* fmt

* cargo lock

* fix(iota-move): update move command to use module labels, generate-struct-layouts fix (#5592)

* fix(iota-move): update move command to use module labels, generate-struct-layouts fix

* feat(iota-framework/move-stdlib): add new uq64_64 type, minor updates u128 (#5597)

* feat(iota-framework/move-stdlib): add new uq64_64 type, minor updates u128

* feat(framework): add fun bitwise_not and macro fun max_value (#5589)

* feat(move-stdlib): add fun bitwise_not and macro fun max_value

* chore: update compiled binaries and published api

* chore: update snapshot

* chore: update iota-swarm-config snapshot

* chore: update manifest

* fix: remove duplicate macro fun

* chore: update compiled packages and swarm snapshot

* chore: update snapshot and manifest

* chore: update swarm snapshot

* chore: update manifest

* feat(iota-protocol, iota-execution, iota-framework): Update signing verifier constants setting (#5588)

* feat(iota-protocol, iota-execution, iota-framework): allowing verifier constants for limits and metering to be set by the node config instead of being hardcoded into the binary

* fix(iota, iota-move, iota-framework-tests): removes the feature flags for the `iota-move` crate (#5634)

* feat(iota-framework, iota-move-natives): introduces a new uncompressed representation of BLS12381-G1 (#5630)

* feat(iota-framework, iota-move-natives): introduces a new uncompressed representation of BLS12381-G1 elements and a function to add a vector of uncompressed elements

* feat(iota-procotol, iota-adapter-tx-tests): Update how we handle type errors in some commands (#5664)

* feat(iota-procotol, iota-adapter-tx-tests): Update how we handle type errors in some commands

* feat: gas logic tweaks and cleanups (#5594)

* feat: gas logic tweaks and cleanups

* fix: pulled the uncompressed G1 group changes

* chore(iota-framework, docs): add iota-swarm-config test to contributing.md (#5646)

* refactor(move-sdtlib): minimize calls to length in vector functions (#5723)

* refactor(move-stdlib): minimize calls to length in vector functions

* chore: add docs to protocol-config

* chore: update iota-adapter-transactional-tests and compiled move-stdlib

* chore: update iota-framework-snapshot

* chore: update manifest

* Update crates/iota-protocol-config/src/lib.rs

Co-authored-by: Valerii Reutov <[email protected]>

---------

Co-authored-by: Valerii Reutov <[email protected]>

* feat: bump version to 0.11.0-alpha with protocol version 5

revert: removal of fake `MAX_ALLOWED` for tests

* fix(iota-framework): audit issue 58 extra mutable self in coin manager (#5447)

* fix(iota-framework): use immutable self in `coin_manager::additional_metadata`

* feat(iota-framework-snapshot): the snapshots update

* fix(iota-swarm-config): update the baseline

* fix(iota-framework): add `coin_manager::get_additional_metadata`

* feat(iota-framework-snapshot): the snapshots update

* fix(iota-swarm-config): update the baseline

* feat(protocol): PCR-2 (#5479)

* PCR-2 base changes

* transaction-fuzzer changes

* comment construct_advance_epoch_pt_* functions

* iota-adapter-transactional-tests changes (#5283)

Co-authored-by: Mirko Zichichi <[email protected]>

* feat(protocol): PCR-2 iota-json-rpc* and iota-open-rpc (#5277)

* iota-json-rpc* and iota-open-rpc changes

* refactor(protocol): pcr2 more base changes (#5448)

* feat: implement conversions between v1 and v2 for system-state summary

* refactor(types): add non_exhaustive attribute to IotaSystemStateSummary

* refactor(core): use system-state summary v2

* doc(type): fix typo in system-state summary v2 doc

* refactor(json-rpc): support new system state summary (#5449)

* feat(json-rpc-api): support all versions of system-state summary

* refactor(json-rpc): support v2 of system-state summary

* chore(open-rpc): update specification

---------

Co-authored-by: Konstantinos Demartinos <[email protected]>

* feat(protocol): PCR-2 iota-rest-api (#5276)

* iota-rest-api changes

* refactor(rest-api): use v2 of system state summary (#5455)

---------

Co-authored-by: Konstantinos Demartinos <[email protected]>

* feat(protocol): PCR-2 iota-proxy (#5461)

* feat(protocol): PCR-2 iota-sdk (#5467)

* feat(protocol): PCR-2 iota-sdk

* more examples fix

* feat(protocol): PCR-2 iota-indexer (#5278)

* iota-indexer changes

* refactor(indexer): use new system state summary (#5477)

* refactor(indexer): add burned computation cost to schema

* refactor(indexer)!: use new system-state summary type

* Update crates/iota-indexer/src/handlers/checkpoint_handler.rs

Co-authored-by: Thoralf-M <[email protected]>

---------

Co-authored-by: Konstantinos Demartinos <[email protected]>
Co-authored-by: Thoralf-M <[email protected]>

* feat(protocol): PCR-2 iota-bridge-cli/iota-tool (#5478)

* feat(protocol): PCR-2 iota-bridge-cli

* iota-tool

* refactor(types): derive serde and clone for IotaSystemStateSummary

* iota-analytics-indexer changes (#5282)

* feat(protocol): PCR-2 iota-graphql-rpc (#5280)

* iota-graphql-rpc changes

* feat(indexer): add computation_cost_burned getter

* refactor(graphql-rpc): use the new system-state summary

---------

Co-authored-by: Konstantinos Demartinos <[email protected]>

* refactor(transactional-test-runner): use new system-state summary type (#5501)

* fix(indexer): get system summary conditionally in index_epoch

* refactor(iota): use new system-state summary type (#5502)

* refactor(rosetta): use new system-state summary (#5507)

* refactor(graphql-e2e-tests: update baselines (#5281)

Co-authored-by: Konstantinos Demartinos <[email protected]>

* refactor(json-rpc-tests): use new system-state summary

* feat(protocol): PCR-2 iota-benchmark and iota-cluster-test (#5516)

* refactor(iota-benchmark): use new system-state summary type

* refactor(iota-cluster-test): use new system-state summary type

* fix: clippy error

* feat(protocol): PCR-2 iota-e2e-tests (#5520)

* refactor(iota-e2e-tests): use new system-state summary type

* fix: never trust the autocomplete...

* fix: typo

* fix: fix `IotaSystemStateV2` docstring

* fix: missing IotaSystemStateSummary in iota-e2e-tests simtests

* chores: Update system package build and snapshot

* chores: Update snapshot in iota-swarm-config

* Revert manifest.json in iota-framework-snapshot

* docs: Fix doc comments in iota_system_state_inner_v2.rs

---------

Co-authored-by: jkrvivian <[email protected]>

* refactor(json-rpc,indexer): add get_latest_iota_system_state_v2 (#5586)

* refactor(json-rpc-api): add get_latest_iota_system_state_v2

* refactor(indexer): use get_latest_iota_system_state_v2

* refactor(json-rpc-api): add deprecated rust attribute

* Tokenomics documentation update (#5271)

* Initial commit tokenomics documentation update

* docs(tokenomics): first round of changes in tokenomics.mdx and gas-in-iota.mdx

* gas pricing updates

* Solved merge conflict

* Solved merge conflict

* staking changes

* docs(tokenomics): review iota-token and proof-of-stake

* docs(tokenomics): review validators-staking

* docs(tokenomics): review staking-unstaking

* docs(tokenomics): review gas-pricing

* docs(tokenomics): review gas-in-iota

* Tokenomics home page fix

* Remove redundant text related to token utilization

* Minor changes to tokenomics docs

* Update docs/content/about-iota/tokenomics/tokenomics.mdx

Co-authored-by: Lucas Tortora <[email protected]>

* Style and naming changes in gas pricing file

* fix inflation rate value

* Update docs/content/_snippets/staking-pool-reqs.mdx

Co-authored-by: Lucas Tortora <[email protected]>

* Update docs/content/about-iota/tokenomics/gas-pricing.mdx

Co-authored-by: Lucas Tortora <[email protected]>

* tweaks to tokenomics homepage

* Update tokenomics image

* update tokenomics image

---------

Co-authored-by: Roman Overko <[email protected]>
Co-authored-by: Andrew <[email protected]>
Co-authored-by: Can <[email protected]>
Co-authored-by: Lucas Tortora <[email protected]>
Co-authored-by: Lucas Tortora <[email protected]>
Co-authored-by: Andrew Cullen <[email protected]>

* refactor(iota-sdk): version get_latest_iota_system_state (#5587)

* refactor(json-rpc-api): add get_latest_iota_system_state_v2

* refactor(indexer): use get_latest_iota_system_state_v2

* refactor(iota-sdk): version get_latest_iota_system_state

* refactor(iota-sdk): use get_latest_iota_system_state_v2 if available in the rpc_methods

* refactor(iota-sdk): cache iota_system_state_v2_support

* fix: use get_latest_iota_system_state_v2 in tests

* fix: update remaining tests to get_latest_iota_system_state_v2

---------

Co-authored-by: Thoralf Müller <[email protected]>
Co-authored-by: Thoralf-M <[email protected]>

* refactor(simulacrum): use ChangeEpochV2

* chore(json-rpc-api,open-rpc): correct supported protocol version in docs

* feat(ts-sdk): update TS SDK after PCR2 changes (#5637)

* feat(update-tssdk-types): Run update-open-rpc-client-types

* feat(update-tssdk-types): Support versioned system state. Sdk build passing. Updates version.ts.

* feat(update-tssdk-types): Bump graphql schema version (2025.2) and run update-graphql-schemas

* feat(update-tssdk-types): Run graphql-transport codegen

* feat(update-tssdk-types): Fix IotaSystemStateSummary type mismatch in graphql-transport

* feat(update-tssdk-types): Support getLatestIotaSystemStateV2 in TS client and adjust

* feat(update-tssdk-types): Fix turbo build & lint for apps

* feat(ts-sdk): Add changeset

* Update sdk/typescript/src/client/client.ts comment to align with openrpc.json

Co-authored-by: Begoña Álvarez de la Cruz <[email protected]>

* feat(ts-sdk): dprint

* feat(ts-sdk): dprint

---------

Co-authored-by: Begoña Álvarez de la Cruz <[email protected]>

---------

Co-authored-by: Alexander Sporn <[email protected]>
Co-authored-by: Mirko Zichichi <[email protected]>
Co-authored-by: Konstantinos Demartinos <[email protected]>
Co-authored-by: muXxer <[email protected]>
Co-authored-by: Thibault Martinez <[email protected]>
Co-authored-by: Thoralf-M <[email protected]>
Co-authored-by: jkrvivian <[email protected]>
Co-authored-by: Luigi Vigneri <[email protected]>
Co-authored-by: Roman Overko <[email protected]>
Co-authored-by: Can <[email protected]>
Co-authored-by: Lucas Tortora <[email protected]>
Co-authored-by: Lucas Tortora <[email protected]>
Co-authored-by: Thoralf Müller <[email protected]>
Co-authored-by: Mario <[email protected]>
Co-authored-by: Begoña Álvarez de la Cruz <[email protected]>

* fix(iota-move/docs): Add Conventions as comments to a new package when `iota move new` (#5724)

* update protocol snapshots

* refactor validator_address_by_pool_id for IotaSystemStateV2

* update framework snapshots

* fix fmt

* fix clippy

* update swarm config snapshot

* re-build framework packages

* update framework snapshots

* update protocol snapshots

* update CONTRIBUTING readme in framework to use the snapshots script

* revert iota-system/delegation_tests changes

* update graphql-e2e-test baselines

---------

Co-authored-by: Pavlo Botnar <[email protected]>
Co-authored-by: Nonast <[email protected]>
Co-authored-by: Valerii Reutov <[email protected]>
Co-authored-by: Alexander Sporn <[email protected]>
Co-authored-by: Andrew Cullen <[email protected]>
Co-authored-by: Konstantinos Demartinos <[email protected]>
Co-authored-by: muXxer <[email protected]>
Co-authored-by: Thibault Martinez <[email protected]>
Co-authored-by: Thoralf-M <[email protected]>
Co-authored-by: jkrvivian <[email protected]>
Co-authored-by: Luigi Vigneri <[email protected]>
Co-authored-by: Roman Overko <[email protected]>
Co-authored-by: Can <[email protected]>
Co-authored-by: Lucas Tortora <[email protected]>
Co-authored-by: Lucas Tortora <[email protected]>
Co-authored-by: Thoralf Müller <[email protected]>
Co-authored-by: Mario <[email protected]>
Co-authored-by: Begoña Álvarez de la Cruz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sc-platform Issues related to the Smart Contract Platform group. vm-language Issues related to the VM & Language Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[framework] Update some calls to is_empty in loops · MystenLabs/sui@68ac44a

6 participants