Skip to content

Commit

Permalink
Merge branch 'feat/barnard' into convert-small-int
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-marinica committed Jan 15, 2025
2 parents 6351bc7 + 631de04 commit bc5758d
Show file tree
Hide file tree
Showing 1,375 changed files with 37,493 additions and 11,836 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/actions-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ permissions:
jobs:
contracts:
name: Contracts (nightly)
uses: multiversx/mx-sc-actions/.github/workflows/contracts.yml@v3.2.0
uses: multiversx/mx-sc-actions/.github/workflows/contracts.yml@v4.2.1
with:
rust-toolchain: nightly-2024-05-22
path-to-sc-meta: framework/meta
enable-contracts-size-report: false
mx-scenario-go-version: v2.1.0-alpha
mx-scenario-go-version: v3.0.0
coverage-args: --ignore-filename-regex='meta/src' --ignore-filename-regex='wasm-adapter' --ignore-filename-regex='benchmarks/' --ignore-filename-regex='tests/' --output ./coverage.md
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
20 changes: 16 additions & 4 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,23 @@ permissions:
jobs:
contracts:
name: Contracts
uses: multiversx/mx-sc-actions/.github/workflows/contracts.yml@v3.1.0
uses: multiversx/mx-sc-actions/.github/workflows/contracts.yml@v4.2.1
with:
rust-toolchain: stable
rust-toolchain: 1.82
path-to-sc-meta: framework/meta
mx-scenario-go-version: v2.1.0-alpha
mx-scenario-go-version: v3.0.0
coverage-args: --ignore-filename-regex='meta/src' --ignore-filename-regex='wasm-adapter' --ignore-filename-regex='benchmarks/' --ignore-filename-regex='tests/' --output ./coverage.md
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}

formatting:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Ensure rustfmt is installed and setup problem matcher
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt
- name: Rustfmt Check
uses: actions-rust-lang/rustfmt@v1
12 changes: 6 additions & 6 deletions .github/workflows/lldb-formatter-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
default: true
toolchain: stable
toolchain: 1.82

- name: Download vscode-lldb
uses: robinraju/[email protected]
with:
repository: vadimcn/vscode-lldb
latest: true
fileName: codelldb-x86_64-linux.vsix
tag: v1.11.0
fileName: codelldb-linux-x64.vsix

- name: Setup vscode-lldb
run: |
unzip codelldb-x86_64-linux.vsix -d vscode-lldb
mkdir -p $HOME/.vscode/extensions/vadimcn.vscode-lldb-x.x.x/
mv vscode-lldb/extension/* $HOME/.vscode/extensions/vadimcn.vscode-lldb-x.x.x/
unzip codelldb-linux-x64.vsix -d vscode-lldb
mkdir -p $HOME/.vscode/extensions/vadimcn.vscode-lldb-1.11.0/
mv vscode-lldb/extension/* $HOME/.vscode/extensions/vadimcn.vscode-lldb-1.11.0/
- name: Run the rust tests
run: |
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/plotter-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

on:
push:
branches:
- master
pull_request:

permissions:
checks: write
pull-requests: write

jobs:
template_test_current:
name: Plotter tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.82
target: wasm32-unknown-unknown

- name: Prerequisites
run: |
sudo apt install pkg-config libfreetype6-dev libfontconfig1-dev
- name: Run plotter tests
run: |
cd tools/plotter
cargo test
2 changes: 1 addition & 1 deletion .github/workflows/proxy-compare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
default: true
toolchain: stable
toolchain: 1.82
target: wasm32-unknown-unknown

- name: Install prerequisites
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/template-test-current.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ jobs:
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
default: true
toolchain: stable
toolchain: 1.82
target: wasm32-unknown-unknown

- name: Install prerequisites
run: |
cargo install wasm-opt
cargo install --path framework/meta
sc-meta install mx-scenario-go --tag v2.0.0
sc-meta install mx-scenario-go --tag v3.0.0
which wasm-opt
which mx-scenario-go
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/template-test-released.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ jobs:
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
default: true
toolchain: stable
toolchain: 1.82
target: wasm32-unknown-unknown

- name: Install prerequisites
run: |
cargo install wasm-opt
cargo install --path framework/meta
sc-meta install mx-scenario-go --tag v2.0.0
sc-meta install mx-scenario-go --tag v3.0.0
which wasm-opt
which mx-scenario-go
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Generated by Cargo
# will have compiled files and executables
**/target/**
**/dist

# Remove Cargo.lock from the framework, but not from the wasm contracts.
# In contracts it helps with tracing builds.
Expand Down Expand Up @@ -33,6 +34,7 @@ coverage.md
my-vm-tests.sh
quick.sh
template-test
install-debugger-test

# Zip output with example wasm binaries
examples-wasm.zip
Expand Down
147 changes: 145 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,152 @@ They are:
- `multiversx-sc-codec`, in short `codec`, the serializer/deserializer, 2 crates:
- `multiversx-sc-codec`
- `multiversx-sc-codec-derive`
- `multiversx-chain-vm`, in short `vm`, a Rust VM implementation, 1 crate.
- Chain crates, in short `chain`. Formerly it was only the VM (`vm`). 2 crates:
- `multiversx-chain-core` - *a common crate for chain types, constants, flags*
- `multiversx-chain-vm` - *a Rust VM implementation*
- `multiversx-chain-scenario-format`, in short `scenario-format`, scenario JSON serializer/deserializer, 1 crate.
- `multiversx-sdk`, in short `sdk`, allows communication with the chain(s), 1 crate.
- `multiversx-sdk`, in short `sdk`, allows communication with the chain(s), 3 crates:
- `multiversx-sdk`
- `multiversx-sdk-http`
- `multiversx-sdk-dapp`


## [sc 0.55.0, codec 0.21.2, chain 0.12.0, sdk 0.8.0] - 2025-01-08
- Integrating Spica changes into the framework:
- EGLD+ESDT multi-transfers are now possible:
- changed the handling of call values: EGLD is treated almost the same as an ESDT in `all_transfers` and `multi_egld_or_esdt`, old ESDT methods are given some protection against unexpected scenarios
- changed the tx unified syntax for sending EGLD+ESDT from contracts, interactors and tests;
- support in the Rust VM.
- New built-in functions in the `ESDTSystemSCProxy`: `ESDTModifyRoyalties`, `SDTSetNewURIs`, `ESDTModifyCreator`, `ESDTMetaDataRecreate`, `ESDTMetaDataUpdate`.
- Interactor support for "set state" on the chain simulator.
- Fixed ownership for ManagedVec iterators, specifically reference iterators only produce references to the items.
- Syntax cleanup:
- `#[payable]` now allowed instead of `#[payable("*")]`;
- `register_promise` allows callback, without calling a function on destination.
- Refactoring and optimizations:
- Simplified the callback selector;
- Performance improvements in ManagedVec iterators;
- Removed some unnecessary bound checks in `multi_esdt`.

## [sc 0.54.6] - 2024-12-04
- `ManagedDecimal` bugfixes:
- ABI/proxy bugfix;
- Rescale bugfix.

## [sc 0.54.5] - 2024-11-28
- `ManagedVec` - deprecated `sort` and guarded it by the `alloc` feature, since it uses the allocator.
- `sc-meta`
- versioning fix;
- interactor generator fix.
- Interactors - fixed code metadata on deploy.

## [sc 0.54.4] - 2024-11-22
- `sc-meta`
- `install debugger` CLI that prepares VSCode extension for debugging;
- fixed a crash involving templates and installers.
- Deprecated `#[derive(TypeAbi)]` and added an additional warning in the macro.

## [sc 0.54.3] - 2024-11-18
- `#[storage_mapper_from_address]` fixes for: `FungibleTokenMapper`, `NonFungibleTokenMapper`, `TokenAttributesMapper`, `UniqueIdMapper`, `UserMapper`, `AddressToIdMapper`.

## [sc 0.54.2, codec 0.21.1, chain 0.11.1, sdk 0.7.1] - 2024-11-15
- Codec improvements:
- `MultiValueX` - `TopDecodeMultiLength` implementation fix;
- `ManagedVecItem` implented for MultiValue2 and MultiValue3.
- `sc-meta snippets` improvements.

## [sc 0.54.1] - 2024-11-13
- `sc-meta` `cs` - ChainSimulator CLI, which provides handy functionality to:
- install the chain simulator image in Docker;
- start/stop the chain simulator;
- quick testing using the `chain-simulator-tests` feature flag.
- Adder interactor cleanup, including in template.
- Interactor - `use_chain_simulator` builder method, for improved backwards compatibility.
- `MultiValueEncodedCounted` - a lazy multi-value encoding, but with known number of elements.

## [sc 0.54.0, sdk 0.7.0, chain 0.11.0] - 2024-11-06
- New crate, `multiversx-chain-core`, to be used in both framework and Rust VM. It contains common types, flags, and constants that refer to the protocol.
- Major SDK/interactor refactor:
- Added support for Chain Simulator in interactors:
- Added chain-simulator-specific endpoints: feed account, advance blocks
- Added a system to set up accounts in the chain simulator from the interactor;
- Support for advancing blocks in the interactor;
- Split SDK crate into:
- `multiversx-sdk` - only contains the specifications of the gateway API, without a mechanism to call the API;
- `multiversx-sdk-http` - functionality to call the gateway via reqwest;
- `multiversx-sdk-dapp` - functionality to call the gateway via wasm-bindgen, to be used in WebAssembly front-ends;
- Major improvements in the retrieving of transactions and other blockchain data fron the API, many bugs fixed;
- Support for writing integration tests for interactors, using the Chain Simulator;
- Also added support for test-related `chain-simulator-tests` feature flag in `sc-meta`;
- Interactors on the front-end:
- Interactor type made generic over the gateway API implementation, so that it can be used in both front-end and back-end, with no change in the code base;
- Support for custom random number generation for the front-end;
- Mechanism for fixing file paths in the interactor context;
- Fixed an issue with the account tool;
- Adjusted `sc-meta snippets` for the new syntax and the chain simulator support;
- Unified syntax:
- `ReturnsHandledOrError` result handler, which can gracefully deal with failed transactions;
- `ReturnsGasUsed` result handler;
- `PassValue` result handler for providing a closure-like context for multi-transaction call/deploy;
- More specific back transfer result handlers: `ReturnsBackTransfersEGLD`, `ReturnsBackTransfersMultiESDT`, `ReturnsBackTransfersSingleESDT`;
- Fixed an issue with the update functionality not being general enough;
- Deprecated `prepare_async()`, developers can now call `run()` directly, asynchronously;
- `sc-meta` improvements:
- New mechanism for detecting and warning about storage writes in readonly endpoints, integrated into the build system;
- Support for referencing the framework via git commit, branch, or tag, to make it easier to try out unreleased versions;
- Support for `default-features`;
- Better representation in console of the contract/lib folders, as well as better error messages.
- Refactoring of the dependency handling logic.
- Fixed the debugger, following changes in the Rust debug tooling.
- `ManagedVec` `set` always consumes ownership. Preparations for a profound memory management cleanup.
- ABI:
- `title` field and annotation;
- Refactoring.

## [sc 0.53.2] - 2024-10-02
- `StakingModule` fix.

## [sc 0.53.1, sdk 0.6.1] - 2024-10-01
- Interactor:
- Allow signature to be empty in TransactionOnNetwork;
- Allow return data to be empty in VMOutputApi.

## [sc 0.53.0 codec 0.21.0, vm 0.10.0, sdk 0.6.0, scenario-format 0.23.0] - 2024-09-04
- Unified syntax:
- Whitebox testing;
- Proxy fix for ManagedOption;
- TestTokenIdentifier syntactic sugar.
- New ResultHandler: `ReturnsLogs`.
- Interactor:
- Fix on API fetch process status;
- Fix on ReturnsNewTokenIdentifier edge cases solved;
- Fix on ESDTTransfer for transfer step;
- Support for Keystore + password.
- Framework API support: EI 1.4 crypto functions.
- `sc-meta`:
- New `wallet` command: PEM and keystore generator and conversions;
- New `report` command:
- Generate json or Markdown report based on size, path, allocator and panic messages;
- Compare reports;
- Convert reports.
- VecMapper update with index.
- Substitution list: AddressToIdMapper
- Dependencies updated.

## [sc 0.52.3] - 2024-08-06
- Pause module events.

## [sc 0.52.2] - 2024-08-01
- `ManagedBufferReadToEnd` extract data methods.

## [sc 0.52.1] - 2024-07-31
- `ManagedBufferReadToEnd` `TypeAbi` implementation.

## [sc 0.52.0, codec 0.20.1] - 2024-07-31
- ManagedBufferReadToEnd type, which flushed a nested data buffer.
- Fixed hex and binary formatters for byte slices.
- Added EI 1.4 and 1.5 configs.
- Dependency upgrades.

## [sc 0.51.1]
- `sc-meta upgrade` bugfix.
Expand Down
Loading

0 comments on commit bc5758d

Please sign in to comment.