Skip to content

Commit

Permalink
Merge pull request #860 from tonlabs/IgorKoval/upd-default-cap
Browse files Browse the repository at this point in the history
Upd DEFAULT_CAPABILITIES
  • Loading branch information
IgorKoval authored Aug 3, 2023
2 parents 3072438 + 9055398 commit 316e473
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 37 deletions.
55 changes: 28 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Use `--decode-c6` to see output actions in user-friendly format.
Use `--balance <value>` 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 <tvc_file>` 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
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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| {
Expand Down
4 changes: 2 additions & 2 deletions src/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -441,7 +441,7 @@ mod tests {
action_decoder,
trace_level,
debug_info,
capabilities: 0x42E, // default
capabilities: DEFAULT_CAPABILITIES,
}
)?;
if is_vm_success {
Expand Down
6 changes: 3 additions & 3 deletions test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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())

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 316e473

Please sign in to comment.