Skip to content

Commit

Permalink
1.add move stdlib nursery GasParam
Browse files Browse the repository at this point in the history
2.fix starcoin_vm gas_meter
3.fix fmt and clippy warnning
  • Loading branch information
nkysg committed Nov 13, 2022
1 parent 1fd254f commit 9f35588
Show file tree
Hide file tree
Showing 43 changed files with 338 additions and 350 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: clean
- name: build
uses: actions-rs/cargo@v1
with:
command: build
args: --all
- name: test
run: ./scripts/nextest.sh
- name: run cargo check
uses: actions-rs/cargo@v1
env:
RUSTFLAGS: -D warnings
with:
command: clippy
args: --all-targets
- name: build
uses: actions-rs/cargo@v1
with:
command: build
args: --all
- name: test
run: ./scripts/nextest.sh
# - name: check changed files
# run: bash ./scripts/changed_files.sh
- name: Doc Tests
Expand Down
80 changes: 41 additions & 39 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion abi/decoder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ version = "1.12.5"
[dependencies]
anyhow = "1.0.41"
hex = "0.4.3"
move-binary-format = { git = "https://github.com/starcoinorg/move", rev = "e2282776b8a6642a68e7ac1a0c819bda76d64d95" }
move-binary-format = { git = "https://github.com/starcoinorg/move", rev = "54a90b627e38875bda8b8b4809faa21e88df10a2" }
starcoin-resource-viewer = { path = "../../vm/resource-viewer" }
starcoin-vm-types = { path = "../../vm/types" }
starcoin-abi-types = { path = "../types" }
Expand Down
2 changes: 1 addition & 1 deletion abi/resolver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ starcoin-vm-types = { path = "../../vm/types" }
starcoin-abi-types = { path = "../types" }
anyhow = "~1"
starcoin-resource-viewer = { path = "../../vm/resource-viewer" }
move-model = { git = "https://github.com/starcoinorg/move", rev = "e2282776b8a6642a68e7ac1a0c819bda76d64d95" }
move-model = { git = "https://github.com/starcoinorg/move", rev = "54a90b627e38875bda8b8b4809faa21e88df10a2" }
[dev-dependencies]
stdlib = { path = "../../vm/stdlib" }
serde_json = "1"
Expand Down
4 changes: 2 additions & 2 deletions cmd/db-exporter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ logger = { path = "../../commons/logger", package = "starcoin-logger" }
clap = { version = "3", features = ["derive"] }
atomic-counter = "1.0.1"
tokio = { version = "^1", features = ["full"] }
move-binary-format = { git = "https://github.com/starcoinorg/move", rev = "e2282776b8a6642a68e7ac1a0c819bda76d64d95" }
move-bytecode-verifier = { git = "https://github.com/starcoinorg/move", rev = "e2282776b8a6642a68e7ac1a0c819bda76d64d95" }
move-binary-format = { git = "https://github.com/starcoinorg/move", rev = "54a90b627e38875bda8b8b4809faa21e88df10a2" }
move-bytecode-verifier = { git = "https://github.com/starcoinorg/move", rev = "54a90b627e38875bda8b8b4809faa21e88df10a2" }
starcoin-resource-viewer = { path = "../../vm/resource-viewer" }
starcoin-state-tree = { path = "../../state/state-tree" }
[target."cfg(target_os=\"linux\")".dependencies]
Expand Down
4 changes: 2 additions & 2 deletions cmd/starcoin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ starcoin-resource-viewer = { path = "../../vm/resource-viewer" }
starcoin-service-registry = { path = "../../commons/service-registry" }
starcoin-move-explain = { path = "../../vm/move-explain" }
vm-status-translator = { path = "../../vm/vm-status-translator" }
move-errmapgen = { git = "https://github.com/starcoinorg/move", rev = "e2282776b8a6642a68e7ac1a0c819bda76d64d95" }
move-errmapgen = { git = "https://github.com/starcoinorg/move", rev = "54a90b627e38875bda8b8b4809faa21e88df10a2" }
network-api = { path = "../../network/api", package = "network-api" }
starcoin-network-rpc-api = { path = "../../network-rpc/api" }
starcoin-abi-decoder = { path = "../../abi/decoder" }
starcoin-abi-resolver = { path = "../../abi/resolver" }
starcoin-abi-types = { path = "../../abi/types" }
move-command-line-common = { git = "https://github.com/starcoinorg/move", rev = "e2282776b8a6642a68e7ac1a0c819bda76d64d95" }
move-command-line-common = { git = "https://github.com/starcoinorg/move", rev = "54a90b627e38875bda8b8b4809faa21e88df10a2" }

[dev-dependencies]
test-helper = { path = "../../test-helper" }
Expand Down
2 changes: 1 addition & 1 deletion commons/proptest-helpers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ version = "1.12.5"

[dependencies]
crossbeam = "0.7.3"
diem-proptest-helpers = { package = "diem-proptest-helpers", git = "https://github.com/starcoinorg/move", rev = "e2282776b8a6642a68e7ac1a0c819bda76d64d95" }
diem-proptest-helpers = { package = "diem-proptest-helpers", git = "https://github.com/starcoinorg/move", rev = "54a90b627e38875bda8b8b4809faa21e88df10a2" }
proptest = "1.0.0"
proptest-derive = "0.3.0"
26 changes: 17 additions & 9 deletions config/src/genesis_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ use starcoin_vm_types::gas_schedule::{
use starcoin_vm_types::genesis_config::{ChainId, ConsensusStrategy, StdlibVersion};
use starcoin_vm_types::on_chain_config::{
instruction_gas_schedule_v1, instruction_gas_schedule_v2, instruction_table_v1,
move_stdlib_native_gas_schedule_v4, native_gas_schedule_v1, native_gas_schedule_v2,
native_table_v1, native_table_v2, txn_gas_schedule_test, txn_gas_schedule_v1,
txn_gas_schedule_v2, txn_gas_schedule_v3, ConsensusConfig, DaoConfig, TransactionPublishOption,
VMConfig, Version,
native_gas_schedule_v1, native_gas_schedule_v2, native_gas_schedule_v4, native_table_v1,
native_table_v2, txn_gas_schedule_test, txn_gas_schedule_v1, txn_gas_schedule_v2,
txn_gas_schedule_v3, ConsensusConfig, DaoConfig, TransactionPublishOption, VMConfig, Version,
};
use starcoin_vm_types::on_chain_resource::Epoch;
use starcoin_vm_types::token::stc::STCUnit;
Expand Down Expand Up @@ -592,7 +591,7 @@ pub enum GenesisBlockParameterConfig {
}

/// GenesisConfig is a config for initialize a chain genesis.
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub struct GenesisConfig {
/// Parameter for init genesis block
pub genesis_block_parameter: GenesisBlockParameterConfig,
Expand Down Expand Up @@ -787,7 +786,7 @@ pub static G_TEST_CONFIG: Lazy<GenesisConfig> = Lazy::new(|| {
pub static G_TEST_GAS_PARAMS: Lazy<StarcoinGasParameters> = Lazy::new(|| {
let params = concat_map(
instruction_gas_schedule_v2(),
move_stdlib_native_gas_schedule_v4(),
native_gas_schedule_v4(),
txn_gas_schedule_test(),
);
StarcoinGasParameters::from_on_chain_gas_schedule(&params).unwrap()
Expand Down Expand Up @@ -845,7 +844,7 @@ pub static G_DEV_CONFIG: Lazy<GenesisConfig> = Lazy::new(|| {
pub static G_DEV_GAS_PARAMS: Lazy<StarcoinGasParameters> = Lazy::new(|| {
let params = concat_map(
instruction_gas_schedule_v2(),
move_stdlib_native_gas_schedule_v4(),
native_gas_schedule_v4(),
txn_gas_schedule_test(),
);
StarcoinGasParameters::from_on_chain_gas_schedule(&params).unwrap()
Expand Down Expand Up @@ -910,7 +909,7 @@ pub static G_HALLEY_CONFIG: Lazy<GenesisConfig> = Lazy::new(|| {
pub static G_HALLEY_GAS_PARAMS: Lazy<StarcoinGasParameters> = Lazy::new(|| {
let params = concat_map(
instruction_gas_schedule_v2(),
move_stdlib_native_gas_schedule_v4(),
native_gas_schedule_v4(),
txn_gas_schedule_v3(),
);
StarcoinGasParameters::from_on_chain_gas_schedule(&params).unwrap()
Expand Down Expand Up @@ -975,7 +974,7 @@ pub static G_PROXIMA_CONFIG: Lazy<GenesisConfig> = Lazy::new(|| {
pub static G_PROXIMA_GAS_PARAMS: Lazy<StarcoinGasParameters> = Lazy::new(|| {
let params = concat_map(
instruction_gas_schedule_v2(),
move_stdlib_native_gas_schedule_v4(),
native_gas_schedule_v4(),
txn_gas_schedule_v3(),
);
StarcoinGasParameters::from_on_chain_gas_schedule(&params).unwrap()
Expand Down Expand Up @@ -1122,3 +1121,12 @@ pub static G_MAIN_GAS_PARAMS: Lazy<StarcoinGasParameters> = Lazy::new(|| {
);
StarcoinGasParameters::from_on_chain_gas_schedule(&params).unwrap()
});

pub static G_LATEST_GAS_PARASM: Lazy<StarcoinGasParameters> = Lazy::new(|| {
let params = concat_map(
instruction_gas_schedule_v2(),
native_gas_schedule_v4(),
txn_gas_schedule_v3(),
);
StarcoinGasParameters::from_on_chain_gas_schedule(&params).unwrap()
});
2 changes: 1 addition & 1 deletion rpc/api/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1914,7 +1914,7 @@ impl From<StateKey> for StateKeyView {
match state_key {
StateKey::AccessPath(access_path) => Self::AccessPath(access_path),
StateKey::TableItem(table_item) => Self::TableItem(TableItemView {
handle: table_item.handle.into(),
handle: table_item.handle,
key: table_item.key,
}),
}
Expand Down
2 changes: 1 addition & 1 deletion state/api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ merkle-tree = { package = "forkable-jellyfish-merkle", path = "../../commons/for
starcoin-state-tree = { path = "../state-tree" }
bcs-ext = { package = "bcs-ext", path = "../../commons/bcs_ext" }
starcoin-service-registry = { path = "../../commons/service-registry" }
move-table-extension = { git = "https://github.com/starcoinorg/move", rev = "e2282776b8a6642a68e7ac1a0c819bda76d64d95" }
move-table-extension = { git = "https://github.com/starcoinorg/move", rev = "54a90b627e38875bda8b8b4809faa21e88df10a2" }
once_cell = "1.12.0"
[dev-dependencies]
2 changes: 1 addition & 1 deletion state/statedb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ starcoin-state-tree = { path = "../state-tree" }
bcs-ext = { package = "bcs-ext", path = "../../commons/bcs_ext" }
serde = { version = "1.0.130" }
forkable-jellyfish-merkle = { path = "../../commons/forkable-jellyfish-merkle" }
move-table-extension = { git = "https://github.com/starcoinorg/move", rev = "e2282776b8a6642a68e7ac1a0c819bda76d64d95" }
move-table-extension = { git = "https://github.com/starcoinorg/move", rev = "54a90b627e38875bda8b8b4809faa21e88df10a2" }
once_cell = "1.12.0"
parking_lot = "0.12.1"
thiserror = "1.0"
6 changes: 2 additions & 4 deletions state/statedb/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -619,10 +619,8 @@ impl ChainStateWriter for ChainStateDB {
let table_handle_state_object = self.get_table_handle_state_object(handle)?;
table_handle_state_object.commit()?;
// put table_handle_state_object commit
self.state_tree_table_handles.put(
handle.clone(),
table_handle_state_object.root_hash().to_vec(),
);
self.state_tree_table_handles
.put(*handle, table_handle_state_object.root_hash().to_vec());
}
if len > 0 {
self.state_tree_table_handles.commit()?;
Expand Down
6 changes: 3 additions & 3 deletions vm/compiler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ regex = { version = "1.6.0", default-features = false, features = [
"std",
"perf",
] }
move-compiler = { package = "move-compiler", git = "https://github.com/starcoinorg/move", rev = "e2282776b8a6642a68e7ac1a0c819bda76d64d95" }
move-command-line-common = { git = "https://github.com/starcoinorg/move", rev = "e2282776b8a6642a68e7ac1a0c819bda76d64d95" }
move-binary-format = { git = "https://github.com/starcoinorg/move", rev = "e2282776b8a6642a68e7ac1a0c819bda76d64d95" }
move-compiler = { package = "move-compiler", git = "https://github.com/starcoinorg/move", rev = "54a90b627e38875bda8b8b4809faa21e88df10a2" }
move-command-line-common = { git = "https://github.com/starcoinorg/move", rev = "54a90b627e38875bda8b8b4809faa21e88df10a2" }
move-binary-format = { git = "https://github.com/starcoinorg/move", rev = "54a90b627e38875bda8b8b4809faa21e88df10a2" }
petgraph = "0.5.1"
starcoin-crypto = { git = "https://github.com/starcoinorg/starcoin-crypto", rev = "d871dfb4216f034ee334a575926c101574d9d6dc" }
starcoin-logger = { path = "../../commons/logger" }
Expand Down
9 changes: 5 additions & 4 deletions vm/gas-algebra-ext/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ publish = false
version = "1.12.5"

[dependencies]
move-core-types = { git = "https://github.com/starcoinorg/move", rev = "e2282776b8a6642a68e7ac1a0c819bda76d64d95" }
move-binary-format = { git = "https://github.com/starcoinorg/move", rev = "e2282776b8a6642a68e7ac1a0c819bda76d64d95" }
move-stdlib = { git = "https://github.com/starcoinorg/move", rev = "e2282776b8a6642a68e7ac1a0c819bda76d64d95" }
move-table-extension = { git = "https://github.com/starcoinorg/move", rev = "e2282776b8a6642a68e7ac1a0c819bda76d64d95" }
move-core-types = { git = "https://github.com/starcoinorg/move", rev = "54a90b627e38875bda8b8b4809faa21e88df10a2" }
move-binary-format = { git = "https://github.com/starcoinorg/move", rev = "54a90b627e38875bda8b8b4809faa21e88df10a2" }
move-stdlib = { git = "https://github.com/starcoinorg/move", rev = "54a90b627e38875bda8b8b4809faa21e88df10a2" }
move-table-extension = { git = "https://github.com/starcoinorg/move", rev = "54a90b627e38875bda8b8b4809faa21e88df10a2" }
move-vm-test-utils = { git = "https://github.com/starcoinorg/move", rev = "54a90b627e38875bda8b8b4809faa21e88df10a2" }
starcoin-natives = { path = "../natives" }
serde = { version = "1.0.130", default-features = false }
27 changes: 2 additions & 25 deletions vm/gas-algebra-ext/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use crate::algebra::GasScalingFactor;
use move_core_types::gas_algebra::{
Arg, GasQuantity, InternalGas, InternalGasPerByte, InternalGasUnit, NumBytes, UnitDiv,
};
pub use move_vm_test_utils::gas_schedule::GasCost;
use serde::{Deserialize, Serialize};
use std::{ops::Add, u64};

#[macro_use]
pub mod natives;
Expand All @@ -20,6 +20,7 @@ mod starcoin_framework;
//pub mod gen;
mod instr;
mod move_stdlib;
mod nursery;
mod table;
mod transaction;

Expand All @@ -37,30 +38,6 @@ pub type InternalGasPerAbstractValueUnit = GasQuantity<UnitDiv<InternalGasUnit,

pub type AbstractValueSizePerArg = GasQuantity<UnitDiv<AbstractValueUnit, Arg>>;

/// The `GasCost` tracks:
/// - instruction cost: how much time/computational power is needed to perform the instruction
/// - memory cost: how much memory is required for the instruction, and storage overhead
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
pub struct GasCost {
pub instruction_gas: u64,
pub memory_gas: u64,
}

impl GasCost {
pub fn new(instruction_gas: u64, memory_gas: u64) -> Self {
Self {
instruction_gas,
memory_gas,
}
}

/// Convert a GasCost to a total gas charge in `InternalGas`.
#[inline]
pub fn total(&self) -> u64 {
self.instruction_gas.add(self.memory_gas)
}
}

#[derive(Clone, Debug, Serialize, PartialEq, Eq, Deserialize)]
pub struct GasConstants {
/// The cost per-byte read from global storage.
Expand Down
30 changes: 19 additions & 11 deletions vm/gas-algebra-ext/src/move_stdlib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,39 @@ use move_stdlib::natives::GasParameters;

// see starcoin/vm/types/src/on_chain_config/genesis_gas_schedule.rs
// convert from https://github.com/starcoinorg/starcoin-framework/blob/main/sources/VMConfig.move#native_schedule
// XXX FIXME YSG diff native_gas_schedule
crate::natives::define_gas_parameters_for_natives!(GasParameters, "move_stdlib", [
[.bcs.to_bytes.per_byte_serialized, "bcs.to_bytes.per_byte_serialized", 10 * MUL],
[.bcs.to_bytes.failure, "bcs.to_bytes.failure", 1000 * MUL],


[.hash.sha2_256.base, "hash.sha2_256.base", 21 * MUL],
[.hash.sha2_256.per_byte, "hash.sha2_256.per_byte", MUL],
[.hash.sha3_256.base, "hash.sha3_256.base", 64 * MUL],
[.hash.sha3_256.per_byte, "hash.sha3_256.per_byte", MUL],

[.bcs.to_bytes.per_byte_serialized, "bcs.to_bytes.per_byte_serialized", 10 * MUL],
[.bcs.to_bytes.failure, "bcs.to_bytes.failure", 1000 * MUL],

[.vector.length.base, "vector.length.base", 98 * MUL],
[.vector.empty.base, "vector.empty.base", 84 * MUL],
[.vector.borrow.base, "vector.borrow.base", 1334 * MUL],
[.vector.push_back.base, "vector.push_back.base", 53 * MUL],
[.vector.pop_back.base, "vector.pop_back.base", 227 * MUL],
[.vector.destroy_empty.base, "vector.destroy_empty.base", 572 * MUL],
[.vector.swap.base, "vector.swap.base", 1436 * MUL],

// Note(Gas): this initial value is guesswork.
[.signer.borrow_address.base, "signer.borrow_address.base", 353 * MUL],

[.vector.append.base, "vector.append.base", 40 * MUL],
[.vector.remove.base, "vector.remove.base", 20 * MUL],
[.vector.reverse.base, "vector.reverse.base", 10 * MUL],

// Note(Gas): these initial values are guesswork.
[.string.check_utf8.base, "string.check_utf8.base", 4 * MUL],
[.string.check_utf8.per_byte, "string.check_utf8.per_byte", MUL],
[.string.is_char_boundary.base, "string.is_char_boundary.base", 4 * MUL],
[.string.sub_string.base, "string.sub_string.base", 4 * MUL],
[.string.sub_string.per_byte, "string.sub_string.per_byte", MUL],
[.string.index_of.base, "string.index_of.base", 4 * MUL],
[.string.index_of.per_byte_pattern, "string.index_of.per_byte_pattern", 1 * MUL],
[.string.index_of.per_byte_searched, "string.index_of.per_byte_searched", 1 * MUL],

// TODO(Gas): these should only be enabled when feature "testing" is present
// TODO(Gas): rename these in the move repo
[test_only .unit_test.create_signers_for_testing.base_cost, "unit_test.create_signers_for_testing.base", 1],
[test_only .unit_test.create_signers_for_testing.unit_cost, "unit_test.create_signers_for_testing.unit", 1]
], allow_unmapped = 1 /* bcs */ + 2 /* hash */ + 8 /* vector */);
[.string.index_of.per_byte_pattern, "string.index_of.per_byte_pattern", MUL],
[.string.index_of.per_byte_searched, "string.index_of.per_byte_searched", MUL],
]);
10 changes: 10 additions & 0 deletions vm/gas-algebra-ext/src/nursery.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use crate::gas_meter::EXECUTION_GAS_MULTIPLIER as MUL;
use move_stdlib::natives::NurseryGasParameters;

// see starcoin/vm/types/src/on_chain_config/genesis_gas_schedule.rs
// convert from https://github.com/starcoinorg/starcoin-framework/blob/main/sources/VMConfig.move#native_schedule
crate::natives::define_gas_parameters_for_natives!(NurseryGasParameters, "nursery", [
[.event.write_to_event_store.unit_cost, "event.write_to_event_store.unit_cost", 52 * MUL],
[.debug.print.base_cost, "debug.print.base_cost", MUL],
[.debug.print_stack_trace.base_cost, "debug.print_stack_trace.base_cost", MUL],
]);
19 changes: 11 additions & 8 deletions vm/gas-algebra-ext/src/starcoin_framework.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,26 @@ use starcoin_natives::GasParameters;
// see starcoin/vm/types/src/on_chain_config/genesis_gas_schedule.rs
// convert from https://github.com/starcoinorg/starcoin-framework/blob/main/sources/VMConfig.move#native_schedule
crate::natives::define_gas_parameters_for_natives!(GasParameters, "starcoin_natives", [
[.signature.ed25519_verify.base, "signature.ed25519_validate_key.base", 61 * MUL],
[.signature.ed25519_verify.per_byte, optional "signature.ed25519_validate_key.per_byte", MUL],
[.signature.ed25519_validate_key.base, "signature.ed25519_verify.base", 61 * MUL],
[.signature.ed25519_validate_key.per_byte, optional "signature.ed25519_verify.per_byte", MUL],

[.account.create_signer.base, "account.create_signer.base", 24 * MUL],
[.account.destroy_signer.base, "account.destroy_signer.base", 212* MUL],
[.hash.keccak256.base, "hash.keccak256.base", 64 * MUL],
[.hash.keccak256.per_byte, optional "hash.keccak256.per_byte", MUL],

[.hash.ripemd160.base, "hash.ripemd160.base", 64 * MUL],
[.hash.ripemd160.per_byte, optional "hash.ripemd160.per_byte", MUL],
[.signature.ed25519_validate_key.base, "signature.ed25519_validate_key.base", 26 * MUL],
[.signature.ed25519_validate_key.per_byte, optional "signature.ed25519_validate_key.per_byte", MUL],
[.signature.ed25519_verify.base, "signature.ed25519_verify.base", 61 * MUL],
[.signature.ed25519_verify.per_byte, optional "signature.ed25519_verify.per_byte", MUL],
[.signature.ec_recover.base, "signature.ec_recover.base", 128 * MUL],
[.hash.keccak256.base, "hash.keccak256.base", 64 * MUL],
[.hash.keccak256.per_byte, optional "hash.keccak256.per_byte", MUL],
[.hash.keccak256.base, "hash.ec_recover.base", 128 * MUL],
[.token.token_name_of.base, "token.token_name_of.base", 2002 * MUL],

[.u256.add.base, "u256.add.base", 4 * MUL],
[.u256.sub.base, "u256.sub.base", 4 * MUL],
[.u256.mul.base, "u256.mul.base", 4 * MUL],
[.u256.div.base, "u256.div.base", 4 * MUL],
[.u256.rem.base, "u256.rem.base", 4 * MUL],
[.u256.pow.base, "u256.pow.base", 4 * MUL],
[.u256.from_bytes.base, optional "u256.from_bytes.base", 4 * MUL],
[.u256.from_bytes.base, "u256.from_bytes.base", 4 * MUL],
]);
Loading

0 comments on commit 9f35588

Please sign in to comment.