From 4dbe854490eb47ced75c5248a352289729c710dc Mon Sep 17 00:00:00 2001 From: IgorKoval Date: Thu, 3 Aug 2023 02:45:12 +0300 Subject: [PATCH 1/3] Upd DEFAULT_CAPABILITIES --- Cargo.lock | 47 ++++++++++++++++++++++++----------------------- Cargo.toml | 2 +- README.md | 2 +- src/main.rs | 2 +- src/program.rs | 4 ++-- 5 files changed, 29 insertions(+), 28 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6ceca2c8..c2e51cb5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -231,11 +231,12 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "cc" -version = "1.0.79" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "6c6b2562119bf28c3439f7f02db99faf0aa1a8cdfe5772a2ee155d32227239f0" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -479,9 +480,9 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "failure" @@ -771,9 +772,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", ] @@ -869,9 +870,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.31" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fe8a65d69dd0808184ebb5f836ab526bb259db23c657efa38711b1072ee47f0" +checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" dependencies = [ "proc-macro2", ] @@ -1000,9 +1001,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310" +checksum = "b7b6d6190b7594385f61bd3911cd1be99dfddcfc365a4160cc2ab5bff4aed294" dependencies = [ "aho-corasick", "memchr", @@ -1047,29 +1048,29 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "serde" -version = "1.0.173" +version = "1.0.180" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91f70896d6720bc714a4a57d22fc91f1db634680e65c8efe13323f1fa38d53f" +checksum = "0ea67f183f058fe88a4e3ec6e2788e003840893b91bac4559cabedd00863b3ed" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.173" +version = "1.0.180" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6250dde8342e0232232be9ca3db7aa40aceb5a3e5dd9bddbc00d99a007cde49" +checksum = "24e744d7782b686ab3b73267ef05697159cc0e5abbed3f47f9933165e5219036" dependencies = [ "proc-macro2", "quote", - "syn 2.0.26", + "syn 2.0.28", ] [[package]] name = "serde_json" -version = "1.0.103" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d03b412469450d4404fe8499a268edd7f8b79fecb074b0d812ad64ca21f4031b" +checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" dependencies = [ "itoa", "ryu", @@ -1163,9 +1164,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.26" +version = "2.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45c3457aacde3c65315de5031ec191ce46604304d2446e803d71ade03308d970" +checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" dependencies = [ "proc-macro2", "quote", @@ -1326,7 +1327,7 @@ dependencies = [ [[package]] name = "tvm_linker" -version = "0.20.4" +version = "0.20.5" dependencies = [ "assert_cmd", "base64 0.13.1", @@ -1440,7 +1441,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.26", + "syn 2.0.28", "wasm-bindgen-shared", ] @@ -1462,7 +1463,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.26", + "syn 2.0.28", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -1589,7 +1590,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.26", + "syn 2.0.28", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 828b9804..5ce33ff6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ license-file = 'LICENSE.md' name = 'tvm_linker' readme = 'README.md' repository = 'https://github.com/tonlabs/TVM-linker' -version = '0.20.4' +version = '0.20.5' [[bin]] name = 'tvm_linker' diff --git a/README.md b/README.md index 4096beb5..02d900ef 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ Use `--decode-c6` to see output actions in user-friendly format. Use `--balance ` to define account balance in nanograms. It will be available at the bottom of initial stake and in SmartContractInfo tuple from c7 register . Use `--config ` to define the config parameters to run VM with. The TVC file is a state of the config smart-contract. -The capabilities field of the config defines the VM mode of operation. If the config parameter is omitted, the capabilities default value of 0x42E is used. +The capabilities field of the config defines the VM mode of operation. If the config parameter is omitted, the capabilities default value of 0x880116ae is used. For the available capability codes consult [here](https://github.com/tonlabs/ton-labs-block/blob/master/src/config_params.rs#L336) Note: configuration smart-contract resides at the address: -1:5555555555555555555555555555555555555555555555555555555555555555 diff --git a/src/main.rs b/src/main.rs index b7a19630..efa63c0e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -64,7 +64,7 @@ use resolver::resolve_name; use testcall::{call_contract, MsgInfo, TestCallParams, TraceLevel}; use disasm::commands::disasm_command; -const DEFAULT_CAPABILITIES:u64 = 0x42E; // Default capabilities in the main network + const DEFAULT_CAPABILITIES:u64 = 0x880116ae; // Default capabilities on the main network fn main() -> std::result::Result<(), i32> { linker_main().map_err(|err_str| { diff --git a/src/program.rs b/src/program.rs index ba2acb4d..ba881a0b 100644 --- a/src/program.rs +++ b/src/program.rs @@ -387,7 +387,7 @@ pub fn get_now() -> u32 { #[cfg(test)] mod tests { - use crate::abi; + use crate::{abi, DEFAULT_CAPABILITIES}; use crate::testcall::{load_config, load_debug_info, call_contract, MsgInfo, TestCallParams}; use crate::{printer::get_version_mycode_aware, program::load_stateinit}; use crate::testcall::TraceLevel; @@ -441,7 +441,7 @@ mod tests { action_decoder, trace_level, debug_info, - capabilities: 0x42E, // default + capabilities: DEFAULT_CAPABILITIES, } )?; if is_vm_success { From b728c6aa51f9131eb93b1b7e5ce354ca0d7cdd83 Mon Sep 17 00:00:00 2001 From: IgorKoval Date: Thu, 3 Aug 2023 11:46:10 +0300 Subject: [PATCH 2/3] Fixed test_suite.py for python 3 --- test_suite.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test_suite.py b/test_suite.py index 66e4f05c..2feef752 100644 --- a/test_suite.py +++ b/test_suite.py @@ -108,7 +108,7 @@ def compile2(source_name, directory = "tests_sol", lib_file = STDLIB_SOL): SIGN = None def error(msg): - print "ERROR!", msg + print("ERROR!", msg) quit(1) def exec_and_parse(cmd, expected_ec): @@ -123,7 +123,7 @@ def exec_and_parse(cmd, expected_ec): ec = getExitCode() if ec != expected_ec: - print cmd + print(cmd) with open('exec_log.tmp', 'r') as f: print(f.read()) @@ -184,7 +184,7 @@ def expect_output(regex): for l in lines: match = re.search(regex, l) if match: - print "> ", match.group(0) + print( "> ", match.group(0)) return with open('exec_log.tmp', 'r') as f: From 90553987ecb12c47cfec33da942cb2d52158c0fb Mon Sep 17 00:00:00 2001 From: tonjen Date: Thu, 3 Aug 2023 08:49:59 +0000 Subject: [PATCH 3/3] Preparing to merge with the master #nolog --- Cargo.lock | 8 ++++---- Cargo.toml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c2e51cb5..8adf8a2b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1224,8 +1224,8 @@ dependencies = [ [[package]] name = "ton_abi" -version = "2.3.129" -source = "git+https://github.com/tonlabs/ever-abi.git?tag=2.3.129#6445189dbf5aa9b7ecac93c06421eacc09461a0b" +version = "2.3.130" +source = "git+https://github.com/tonlabs/ever-abi.git?tag=2.3.130#1aa427ee0a5d4d61cc8f7acd169ae5c35621dc66" dependencies = [ "base64 0.10.1", "byteorder", @@ -1306,8 +1306,8 @@ dependencies = [ [[package]] name = "ton_vm" -version = "1.8.189" -source = "git+https://github.com/tonlabs/ever-vm.git?tag=1.8.189#5bc2dece1944b22a9cfafee3d7ad7f577f5fb10f" +version = "1.8.190" +source = "git+https://github.com/tonlabs/ever-vm.git?tag=1.8.190#0bc10254a621ae10062acca70da353d3e405e8ae" dependencies = [ "diffy", "ed25519 1.5.3", diff --git a/Cargo.toml b/Cargo.toml index 5ce33ff6..00766adf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,11 +33,11 @@ serde_json = '1.0' sha2 = '0.10' simplelog = '0.6' serde = { features = [ 'derive' ], version = '1.0' } -ton_abi = { git = 'https://github.com/tonlabs/ever-abi.git', tag = '2.3.129' } +ton_abi = { git = 'https://github.com/tonlabs/ever-abi.git', tag = '2.3.130' } ton_block = { features = [ 'gosh' ], git = 'https://github.com/tonlabs/ever-block.git', tag = '1.9.88' } ton_labs_assembler = { features = [ 'gosh' ], git = 'https://github.com/tonlabs/ever-assembler.git', tag = '1.2.130' } ton_types = { git = 'https://github.com/tonlabs/ever-types.git', tag = '2.0.18' } -ton_vm = { features = [ 'gosh' ], git = 'https://github.com/tonlabs/ever-vm.git', tag = '1.8.189' } +ton_vm = { features = [ 'gosh' ], git = 'https://github.com/tonlabs/ever-vm.git', tag = '1.8.190' } [dev-dependencies] assert_cmd = '2.0.5'