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

Merge master -> rc/v0.42 #1164

Merged
merged 66 commits into from
Jul 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
6099582
update default issue callback
alyn509 May 9, 2023
5cf9fbd
check if token state is pending
alyn509 May 9, 2023
19a24a1
check pending on simple issue
alyn509 May 9, 2023
c3f202a
clippy
alyn509 May 9, 2023
cc381df
test fix
alyn509 May 9, 2023
fba6de8
tests update part2
alyn509 May 9, 2023
7e6b764
default issue callback set consistency
alyn509 May 9, 2023
9d299ef
test fixes part 3
alyn509 May 9, 2023
7df2ffd
is not available bug fix
alyn509 May 9, 2023
61e5416
fix test with empty string value
alyn509 May 9, 2023
1e8f6be
add example inside snippet
alyn509 May 9, 2023
353e384
change check not set or pending
alyn509 May 9, 2023
44d350d
fungible token mapper refactor
alyn509 May 9, 2023
2dc9b3c
top encode backwards compatibility
alyn509 May 10, 2023
445abef
undo encoding in test
alyn509 May 10, 2023
b0ee349
encoding fix in checks
alyn509 May 10, 2023
93f9e79
remove match from read token id
alyn509 May 10, 2023
67c8d35
fix text with empty storage as reset
alyn509 May 11, 2023
bba6357
fix custom callback set token id
alyn509 May 11, 2023
1a916a3
undo storage mapper fungible token set
alyn509 May 11, 2023
65c6043
remove set `notset` value
alyn509 May 12, 2023
8eb760c
fix decoding
alyn509 May 12, 2023
32b8c2a
add clear to custom callbacks
alyn509 May 12, 2023
8d991fe
rename check + add clear to error
alyn509 May 12, 2023
30d80d0
default callbacks direct set storage
alyn509 May 12, 2023
027c8a4
token_mapper have TokenMapperState in memory
alyn509 May 12, 2023
e0729a8
update snippet
alyn509 May 12, 2023
dc90e70
token mapper bugfix
andrei-marinica May 15, 2023
590bc93
token mappers folder
andrei-marinica May 15, 2023
62f5fc7
Merge pull request #1086 from multiversx/fungible-token-mapper-fix
andrei-marinica May 15, 2023
51768d4
sc 0.41.1, vm 0.3.1
andrei-marinica May 15, 2023
8eca0bb
publish.sh update
andrei-marinica May 15, 2023
008e71f
Cargo.lock update
andrei-marinica May 15, 2023
bbe740a
Merge pull request #1095 from multiversx/release-41-1
andrei-marinica May 16, 2023
eb6c3ac
fix comment
dorin-iancu May 19, 2023
ebb23df
Merge pull request #1096 from multiversx/fix-comment
dorin-iancu May 19, 2023
c578a0b
Digital cash fix (#1078)
alyn509 May 29, 2023
e6c49fe
chore(sdk/core): bump bip39 to v2.0.0
rupansh Jun 7, 2023
f4692b4
chore(sdk/core): bump rand to v0.8.5
rupansh Jun 7, 2023
6f66a2d
sc 0.41.2, codec 0.17.2, vm 0.3.2
andrei-marinica Jun 9, 2023
48542b0
update Cargo.lock
andrei-marinica Jun 9, 2023
95ebfd5
Merge pull request #1105 from multiversx/release-41-2
andrei-marinica Jun 9, 2023
172a134
fixed deploy on devnet (signed)
bogdan-marian Jun 13, 2023
c1452c1
explicit enum ABI
andrei-marinica Jun 16, 2023
7a7bc83
Merge pull request #1113 from multiversx/explicit-enum-abi
andrei-marinica Jun 16, 2023
747e47e
Merge branch 'master' into master
rupansh Jun 19, 2023
c0ccce3
large-storage contract & test
andrei-marinica Jun 19, 2023
041b48f
ManagedBufferCachedBuilder bugfix
andrei-marinica Jun 19, 2023
771d963
Merge pull request #1121 from multiversx/cached-builder-bugfix
andrei-marinica Jun 19, 2023
e450521
sc 0.41.3, vm 0.3.3
andrei-marinica Jun 19, 2023
b1b74fc
Cargo.lock update
andrei-marinica Jun 19, 2023
d4a9c9a
Merge pull request #1122 from multiversx/release-41-3
andrei-marinica Jun 19, 2023
39ad294
meta all command pretty print current index
andrei-marinica Jun 19, 2023
e3baa63
Merge pull request #1123 from multiversx/meta-all-count
andrei-marinica Jun 19, 2023
8669096
proxy-pause sc use a proper sc for extension (#1138)
alyn509 Jun 27, 2023
40ff122
Merge branch 'master' into 001-bogdan-config-dev-environment
andrei-marinica Jun 29, 2023
6458630
Merge pull request #1108 from bogdan-marian/001-bogdan-config-dev-env…
andrei-marinica Jun 29, 2023
2771f73
Merge branch 'master' into master
rupansh Jun 30, 2023
b5f2d55
Merge pull request #1101 from Entropy-Foundation/master
andrei-marinica Jun 30, 2023
3c03347
rebranding
andrei-marinica Jul 7, 2023
c7ad475
Merge pull request #1152 from multiversx/rebranding-leftovers
andrei-marinica Jul 7, 2023
1444201
Merge branch 'master' into rc/v0.42
andrei-marinica Jul 14, 2023
df4e01e
digital cash test gen, rebuild
andrei-marinica Jul 14, 2023
d9c6174
wasm crate update
andrei-marinica Jul 14, 2023
7e1f258
large-storage test-gen
andrei-marinica Jul 14, 2023
83814f7
clippy fix in tests
andrei-marinica Jul 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ They are:
- `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.


## [sc 0.41.3, vm 0.3.3] - 2023-06-19
- Bugfix on `ManagedBufferCachedBuilder`, involving large inputs.
- Explicit enum ABI: `OperationCompletionStatus` is now properly described in the ABI as an enum that gets serialized by name instead of discriminant.

## [sc 0.41.2, codec 0.17.2, vm 0.3.2] - 2023-06-09
- Releasing a new version of the codec, without the dependency to `wee_alloc`.

## [sc 0.41.1, vm 0.3.1] - 2023-05-15
- Fixed an edge case for the token storage mappers (`FungibleTokenMapper`, `NonFungibleTokenMapper`).

## [sc 0.41.0, vm 0.3.0] - 2023-05-05
- Fixed compatibility with rustc v1.71.0.
- Allocator system:
Expand Down
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ members = [
"contracts/benchmarks/mappers/single-value-repeat/meta",
"contracts/benchmarks/mappers/vec-repeat",
"contracts/benchmarks/mappers/vec-repeat/meta",
"contracts/benchmarks/large-storage",
"contracts/benchmarks/large-storage/meta",
"contracts/benchmarks/str-repeat",
"contracts/benchmarks/str-repeat/meta",
"contracts/benchmarks/send-tx-repeat",
Expand All @@ -57,6 +59,8 @@ members = [
"contracts/examples/crypto-bubbles/meta",
"contracts/examples/crypto-zombies",
"contracts/examples/crypto-zombies/meta",
"contracts/examples/check-pause",
"contracts/examples/check-pause/meta",
"contracts/examples/crypto-kitties/kitty-ownership",
"contracts/examples/crypto-kitties/kitty-ownership/meta",
"contracts/examples/crypto-kitties/kitty-genetic-alg",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The crowdfunding tutorial is a great place to start: https://docs.multiversx.com

# IDE

The framework is designed to be easiest to use with the Elrond IDE VSCode extension: https://marketplace.visualstudio.com/items?itemName=Elrond.vscode-elrond-ide
The framework is designed to be easiest to use with the IDE VSCode extension: https://marketplace.visualstudio.com/items?itemName=Elrond.vscode-elrond-ide

# Building contracts

Expand Down
7 changes: 7 additions & 0 deletions contracts/benchmarks/large-storage/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Generated by Cargo
# will have compiled files and executables
/target/
*/target/

# The mxpy output
output
17 changes: 17 additions & 0 deletions contracts/benchmarks/large-storage/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[package]
name = "large-storage"
version = "0.0.0"
authors = ["Andrei Marinica <andrei.marinica@multiversx.com>"]
edition = "2021"
publish = false

[lib]
path = "src/large_storage.rs"

[dependencies.multiversx-sc]
version = "0.41.3"
path = "../../../framework/base"

[dev-dependencies.multiversx-sc-scenario]
version = "0.41.3"
path = "../../../framework/scenario"
12 changes: 12 additions & 0 deletions contracts/benchmarks/large-storage/meta/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "large-storage-meta"
version = "0.0.0"
edition = "2021"
publish = false

[dependencies.large-storage]
path = ".."

[dependencies.multiversx-sc-meta]
version = "0.41.3"
path = "../../../../framework/meta"
3 changes: 3 additions & 0 deletions contracts/benchmarks/large-storage/meta/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
multiversx_sc_meta::cli_main::<large_storage::AbiProvider>();
}
3 changes: 3 additions & 0 deletions contracts/benchmarks/large-storage/multiversx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"language": "rust"
}
1 change: 1 addition & 0 deletions contracts/benchmarks/large-storage/pi.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"name": "large-storage",
"steps": [
{
"step": "setState",
"accounts": {
"address:owner": {
"nonce": "0",
"balance": "0"
}
},
"newAddresses": [
{
"creatorAddress": "address:owner",
"creatorNonce": "0",
"newAddress": "sc:contract"
}
]
},
{
"step": "scDeploy",
"id": "deploy",
"tx": {
"from": "address:owner",
"contractCode": "file:../output/large-storage.wasm",
"arguments": [],
"gasLimit": "2,000,000",
"gasPrice": "0"
},
"expect": {
"out": [],
"status": "",
"logs": [],
"gas": "*",
"refund": "*"
}
},
{
"step": "scCall",
"id": "save",
"tx": {
"from": "address:owner",
"to": "sc:contract",
"function": "saveStructure",
"arguments": [
"str:abc",
"1",
"file:../pi.txt"
],
"gasLimit": "600,000,000",
"gasPrice": "0"
},
"expect": {
"out": [],
"status": "",
"logs": [],
"gas": "*",
"refund": "*"
}
},
{
"step": "checkState",
"accounts": {
"sc:contract": {
"nonce": "0",
"balance": "0",
"storage": {
"str:savedStructure": [
"u32:3",
"str:abc",
"1",
"u32:40330",
"file:../pi.txt"
]
},
"code": "*"
},
"+": ""
}
}
]
}
36 changes: 36 additions & 0 deletions contracts/benchmarks/large-storage/src/large_storage.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#![no_std]

multiversx_sc::imports!();
multiversx_sc::derive_imports!();

#[derive(TypeAbi, TopEncode, TopDecode, NestedEncode, NestedDecode, Clone)]
pub enum SampleEnum {
Value1,
Value2,
}
#[derive(TypeAbi, TopEncode, TopDecode, NestedEncode, NestedDecode, Clone)]
pub struct Structure<M: ManagedTypeApi> {
pub field1: ManagedBuffer<M>,
pub field2: SampleEnum,
pub field3: ManagedBuffer<M>,
}

#[multiversx_sc::contract]
pub trait LargeStorageBenchmark {
#[init]
fn init(&self) {}

#[endpoint(saveStructure)]
fn save_structure(&self, field1: ManagedBuffer, field2: SampleEnum, field3: ManagedBuffer) {
let s = Structure {
field1,
field2,
field3,
};
self.structure().set(s);
}

#[view(savedStructure)]
#[storage_mapper("savedStructure")]
fn structure(&self) -> SingleValueMapper<Structure<Self::Api>>;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use multiversx_sc_scenario::*;

fn world() -> ScenarioWorld {
ScenarioWorld::vm_go()
}

#[test]
fn large_storage_go() {
world().run("scenarios/large_storage.scen.json");
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
use multiversx_sc_scenario::*;

fn world() -> ScenarioWorld {
let mut blockchain = ScenarioWorld::new();
blockchain.set_current_dir_from_workspace("contracts/benchmarks/large-storage");
blockchain.register_contract(
"file:output/large-storage.wasm",
large_storage::ContractBuilder,
);
blockchain
}

#[test]
fn large_storage_rs() {
world().run("scenarios/large_storage.scen.json");
}
Loading
Loading