Improvements of "mxpy testnet". Re-brand to "localnet"
In this release, there is a significant change that affects backwards compatibility, specifically related to the new configuration schema. Here's an illustration of the localnet.toml
file, which demonstrates the option of choosing between remote or local software resolution.
[general]
log_level = "*:DEBUG"
genesis_delay_seconds = 10
rounds_per_epoch = 100
round_duration_milliseconds = 6000
[metashard]
consensus_size = 1
...
[shards]
num_shards = 1
...
[networking]
...
port_proxy = 7950
...
[software.mx_chain_go]
resolution = "remote"
archive_url = "https://github.com/multiversx/mx-chain-go/archive/refs/heads/master.zip"
archive_download_folder = "~/multiversx-sdk/localnet_software_remote/downloaded/mx-chain-go"
archive_extraction_folder = "~/multiversx-sdk/localnet_software_remote/extracted/mx-chain-go"
local_path = "~/multiversx-sdk/localnet_software_local/mx-chain-go"
[software.mx_chain_proxy_go]
resolution = "remote"
archive_url = "https://github.com/multiversx/mx-chain-proxy-go/archive/refs/heads/master.zip"
archive_download_folder = "~/multiversx-sdk/localnet_software_remote/downloaded/mx-chain-proxy-go"
archive_extraction_folder = "~/multiversx-sdk/localnet_software_remote/extracted/mx-chain-proxy-go"
local_path = "~/multiversx-sdk/localnet_software_local/mx-chain-proxy-go"
Other significant changes:
- refactoring, partial re-design;
- allow one to use pre-built binaries of
node
,seednode
, andproxy
. - allow one to configure round duration, epoch duration etc.
Re-branding
In regards to the rebranding, from now on:
mxpy testnet
<->mxpy localnet
;testnet.toml
<->localnet.toml
.
Commands
- New command: creates, builds, configures a localnet (without starting it, though) - this calls
new
,prerequisites
,build
, andconfig
in one go.
mxpy localnet setup
- New command: creates a
localnet.toml
configuration file.
mxpy localnet new
- Clean command stays the same:
mxpy localnet clean
- Fetch repositories and other dependencies:
mxpy localnet prerequisites
- New command: will build the software:
mxpy localnet build
- Copying of files & folders & patching the config files (NO BUILD):
mxpy localnet config
- Start the network (can be stopped at any time by killing the mxpy process):
mxpy localnet start
Remove project argument from contract deploy and contract upgrade
The --project
argument from the contract deploy
and contract upgrade
commands has been removed.
They created confusion because when it was used, if the contract wasn't previously built it would build the contract first, then load the bytecode. If the contract was built, it wouldn't rebuild it, it would just load the existing bytecode.
Consider using a newer version of "wasm-opt", by default
Newer versions of rustc
might generate WASM bytecode that isn't properly handled by wasm-opt
v105.
E.g.
rustc 1.70.0-nightly (9df3a39fb 2023-04-11)
Wasm-op error:
[wasm-validator error in function 47] unexpected false: all used features should be allowed, on ...
Remove command "mxpy account get-transactions"
Removed command mxpy account get-transactions
, without a prior deprecation notice (being very exotic, rarely used, and not very helpful). Instead, one can directly query the API using wget
or curl
.
Remove already-deprecated wallet commands and options
Some commands and command arguments were deprecated in mxpy 6
. Now (for mxpy 7
), we remove them.
Removed:
- command
mxpy wallet derive
. One should now usemxpy wallet convert
, instead. - arguments
--pem
,--json
,--output-path
of commandmxpy wallet new
. One should now use--format=...
and--outfile
parameters, instead
Replacement examples:
mxpy wallet derive alice.pem --mnemonic
is replaced bymxpy wallet convert --in-format=raw-mnemonic --out-format=pem --outfile=alice.pem
mxpy wallet new --pem --output-path=alice.pem
is replaced bymxpy wallet new --format=pem --outfile=alice.pem
See:
- https://github.com/multiversx/mx-sdk-py-cli/blob/main/CLI.md#walletnew
- https://github.com/multiversx/mx-sdk-py-cli/blob/main/CLI.md#walletconvert
Remove deprecated EEI checks
This is a breaking change. Nevertheless, CI workflows should remain unaffected as the latest versions of mx-sc-actions
no longer rely on mxpy
.
Github Release link: mxpy V7
Migration support from v6 to v7: migration to v7
We hope that you'll find these changes useful and that they will help you to be even more productive in your development work. As always, we welcome your feedback and suggestions in Discord or Telegram, and we look forward to continuing to enhance mxpy
in the future.