Skip to content

Commit

Permalink
[verifier] allow &TxContext in entry functions
Browse files Browse the repository at this point in the history
This makes it possible to see whether an entry function may create new objects just by looking at the type signature.

Tweaked the verifier to alow this, and updated some framework and example code accordingly.
  • Loading branch information
sblackshear committed Jan 3, 2023
1 parent 3b2eb3e commit 8b49992
Show file tree
Hide file tree
Showing 26 changed files with 111 additions and 74 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ processed 2 tasks

task 1 'publish'. lines 5-24:
Error: Transaction Effects Status: Sui Move Bytecode Verification Error. Please run the Sui Move Verifier for more information.
Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: SuiMoveVerificationError, source: Some("Expected last (and at most second) parameter for _::M1::init to be &mut sui::tx_context::TxContext, but found &mut sui::tx_context::TxContext") } }
Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: SuiMoveVerificationError, source: Some("Expected last parameter for _::M1::init to be &mut sui::tx_context::TxContext or &sui::tx_context::TxContext, but found &mut sui::tx_context::TxContext") } }

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
---
source: crates/sui-cost/tests/empirical_transaction_cost.rs
assertion_line: 55
expression: common_costs_estimate
---
{
"MergeCoin": {
"computation_cost": 6671,
"storage_cost": 9556,
"computation_cost": 6679,
"storage_cost": 9567,
"storage_rebate": 0
},
"Publish": {
"computation_cost": 7464,
"storage_cost": 10660,
"computation_cost": 7471,
"storage_cost": 10672,
"storage_rebate": 0
},
"SharedCounterAssertValue": {
Expand All @@ -30,8 +29,8 @@ expression: common_costs_estimate
"storage_rebate": 0
},
"SplitCoin": {
"computation_cost": 6649,
"storage_cost": 9523,
"computation_cost": 6657,
"storage_cost": 9535,
"storage_rebate": 0
},
"TransferPortionSuiCoin": {
Expand Down
7 changes: 3 additions & 4 deletions crates/sui-framework/docs/devnet_nft.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Create a new devnet_nft
Update the <code>description</code> of <code>nft</code> to <code>new_description</code>


<pre><code><b>public</b> entry <b>fun</b> <a href="devnet_nft.md#0x2_devnet_nft_update_description">update_description</a>(nft: &<b>mut</b> <a href="devnet_nft.md#0x2_devnet_nft_DevNetNFT">devnet_nft::DevNetNFT</a>, new_description: <a href="">vector</a>&lt;u8&gt;, _: &<b>mut</b> <a href="tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>)
<pre><code><b>public</b> entry <b>fun</b> <a href="devnet_nft.md#0x2_devnet_nft_update_description">update_description</a>(nft: &<b>mut</b> <a href="devnet_nft.md#0x2_devnet_nft_DevNetNFT">devnet_nft::DevNetNFT</a>, new_description: <a href="">vector</a>&lt;u8&gt;)
</code></pre>


Expand All @@ -175,7 +175,6 @@ Update the <code>description</code> of <code>nft</code> to <code>new_description
<pre><code><b>public</b> entry <b>fun</b> <a href="devnet_nft.md#0x2_devnet_nft_update_description">update_description</a>(
nft: &<b>mut</b> <a href="devnet_nft.md#0x2_devnet_nft_DevNetNFT">DevNetNFT</a>,
new_description: <a href="">vector</a>&lt;u8&gt;,
_: &<b>mut</b> TxContext
) {
nft.description = <a href="_utf8">string::utf8</a>(new_description)
}
Expand All @@ -192,7 +191,7 @@ Update the <code>description</code> of <code>nft</code> to <code>new_description
Permanently delete <code>nft</code>


<pre><code><b>public</b> entry <b>fun</b> <a href="devnet_nft.md#0x2_devnet_nft_burn">burn</a>(nft: <a href="devnet_nft.md#0x2_devnet_nft_DevNetNFT">devnet_nft::DevNetNFT</a>, _: &<b>mut</b> <a href="tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>)
<pre><code><b>public</b> entry <b>fun</b> <a href="devnet_nft.md#0x2_devnet_nft_burn">burn</a>(nft: <a href="devnet_nft.md#0x2_devnet_nft_DevNetNFT">devnet_nft::DevNetNFT</a>)
</code></pre>


Expand All @@ -201,7 +200,7 @@ Permanently delete <code>nft</code>
<summary>Implementation</summary>


<pre><code><b>public</b> entry <b>fun</b> <a href="devnet_nft.md#0x2_devnet_nft_burn">burn</a>(nft: <a href="devnet_nft.md#0x2_devnet_nft_DevNetNFT">DevNetNFT</a>, _: &<b>mut</b> TxContext) {
<pre><code><b>public</b> entry <b>fun</b> <a href="devnet_nft.md#0x2_devnet_nft_burn">burn</a>(nft: <a href="devnet_nft.md#0x2_devnet_nft_DevNetNFT">DevNetNFT</a>) {
<b>let</b> <a href="devnet_nft.md#0x2_devnet_nft_DevNetNFT">DevNetNFT</a> { id, name: _, description: _, <a href="url.md#0x2_url">url</a>: _ } = nft;
<a href="object.md#0x2_object_delete">object::delete</a>(id)
}
Expand Down
8 changes: 4 additions & 4 deletions crates/sui-framework/docs/epoch_time_lock.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Attempt is made to unlock a lock that cannot be unlocked yet.
Create a new epoch time lock with <code>epoch</code>. Aborts if the current epoch is less than the input epoch.


<pre><code><b>public</b> <b>fun</b> <a href="epoch_time_lock.md#0x2_epoch_time_lock_new">new</a>(epoch: u64, ctx: &<b>mut</b> <a href="tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>): <a href="epoch_time_lock.md#0x2_epoch_time_lock_EpochTimeLock">epoch_time_lock::EpochTimeLock</a>
<pre><code><b>public</b> <b>fun</b> <a href="epoch_time_lock.md#0x2_epoch_time_lock_new">new</a>(epoch: u64, ctx: &<a href="tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>): <a href="epoch_time_lock.md#0x2_epoch_time_lock_EpochTimeLock">epoch_time_lock::EpochTimeLock</a>
</code></pre>


Expand All @@ -88,7 +88,7 @@ Create a new epoch time lock with <code>epoch</code>. Aborts if the current epoc
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="epoch_time_lock.md#0x2_epoch_time_lock_new">new</a>(epoch: u64, ctx: &<b>mut</b> TxContext) : <a href="epoch_time_lock.md#0x2_epoch_time_lock_EpochTimeLock">EpochTimeLock</a> {
<pre><code><b>public</b> <b>fun</b> <a href="epoch_time_lock.md#0x2_epoch_time_lock_new">new</a>(epoch: u64, ctx: &TxContext) : <a href="epoch_time_lock.md#0x2_epoch_time_lock_EpochTimeLock">EpochTimeLock</a> {
<b>assert</b>!(<a href="tx_context.md#0x2_tx_context_epoch">tx_context::epoch</a>(ctx) &lt; epoch, <a href="epoch_time_lock.md#0x2_epoch_time_lock_EEpochAlreadyPassed">EEpochAlreadyPassed</a>);
<a href="epoch_time_lock.md#0x2_epoch_time_lock_EpochTimeLock">EpochTimeLock</a> { epoch }
}
Expand All @@ -105,7 +105,7 @@ Create a new epoch time lock with <code>epoch</code>. Aborts if the current epoc
Destroys an epoch time lock. Aborts if the current epoch is less than the locked epoch.


<pre><code><b>public</b> <b>fun</b> <a href="epoch_time_lock.md#0x2_epoch_time_lock_destroy">destroy</a>(lock: <a href="epoch_time_lock.md#0x2_epoch_time_lock_EpochTimeLock">epoch_time_lock::EpochTimeLock</a>, ctx: &<b>mut</b> <a href="tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>)
<pre><code><b>public</b> <b>fun</b> <a href="epoch_time_lock.md#0x2_epoch_time_lock_destroy">destroy</a>(lock: <a href="epoch_time_lock.md#0x2_epoch_time_lock_EpochTimeLock">epoch_time_lock::EpochTimeLock</a>, ctx: &<a href="tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>)
</code></pre>


Expand All @@ -114,7 +114,7 @@ Destroys an epoch time lock. Aborts if the current epoch is less than the locked
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="epoch_time_lock.md#0x2_epoch_time_lock_destroy">destroy</a>(lock: <a href="epoch_time_lock.md#0x2_epoch_time_lock_EpochTimeLock">EpochTimeLock</a>, ctx: &<b>mut</b> TxContext) {
<pre><code><b>public</b> <b>fun</b> <a href="epoch_time_lock.md#0x2_epoch_time_lock_destroy">destroy</a>(lock: <a href="epoch_time_lock.md#0x2_epoch_time_lock_EpochTimeLock">EpochTimeLock</a>, ctx: &TxContext) {
<b>let</b> <a href="epoch_time_lock.md#0x2_epoch_time_lock_EpochTimeLock">EpochTimeLock</a> { epoch } = lock;
<b>assert</b>!(<a href="tx_context.md#0x2_tx_context_epoch">tx_context::epoch</a>(ctx) &gt;= epoch, <a href="epoch_time_lock.md#0x2_epoch_time_lock_EEpochNotYetEnded">EEpochNotYetEnded</a>);
}
Expand Down
8 changes: 4 additions & 4 deletions crates/sui-framework/docs/sui_system.md
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ Suceeds iff both the sender and the input <code>validator_addr</code> are active
and they are not the same address. This function is idempotent within an epoch.


<pre><code><b>public</b> entry <b>fun</b> <a href="sui_system.md#0x2_sui_system_report_validator">report_validator</a>(self: &<b>mut</b> <a href="sui_system.md#0x2_sui_system_SuiSystemState">sui_system::SuiSystemState</a>, validator_addr: <b>address</b>, ctx: &<b>mut</b> <a href="tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>)
<pre><code><b>public</b> entry <b>fun</b> <a href="sui_system.md#0x2_sui_system_report_validator">report_validator</a>(self: &<b>mut</b> <a href="sui_system.md#0x2_sui_system_SuiSystemState">sui_system::SuiSystemState</a>, validator_addr: <b>address</b>, ctx: &<a href="tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>)
</code></pre>


Expand All @@ -801,7 +801,7 @@ and they are not the same address. This function is idempotent within an epoch.
<pre><code><b>public</b> entry <b>fun</b> <a href="sui_system.md#0x2_sui_system_report_validator">report_validator</a>(
self: &<b>mut</b> <a href="sui_system.md#0x2_sui_system_SuiSystemState">SuiSystemState</a>,
validator_addr: <b>address</b>,
ctx: &<b>mut</b> TxContext,
ctx: &TxContext,
) {
<b>let</b> sender = <a href="tx_context.md#0x2_tx_context_sender">tx_context::sender</a>(ctx);
// Both the reporter and the reported have <b>to</b> be validators.
Expand Down Expand Up @@ -832,7 +832,7 @@ Undo a <code>report_validator</code> action. Aborts if the sender has not report
<code>validator_addr</code> within this epoch.


<pre><code><b>public</b> entry <b>fun</b> <a href="sui_system.md#0x2_sui_system_undo_report_validator">undo_report_validator</a>(self: &<b>mut</b> <a href="sui_system.md#0x2_sui_system_SuiSystemState">sui_system::SuiSystemState</a>, validator_addr: <b>address</b>, ctx: &<b>mut</b> <a href="tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>)
<pre><code><b>public</b> entry <b>fun</b> <a href="sui_system.md#0x2_sui_system_undo_report_validator">undo_report_validator</a>(self: &<b>mut</b> <a href="sui_system.md#0x2_sui_system_SuiSystemState">sui_system::SuiSystemState</a>, validator_addr: <b>address</b>, ctx: &<a href="tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>)
</code></pre>


Expand All @@ -844,7 +844,7 @@ Undo a <code>report_validator</code> action. Aborts if the sender has not report
<pre><code><b>public</b> entry <b>fun</b> <a href="sui_system.md#0x2_sui_system_undo_report_validator">undo_report_validator</a>(
self: &<b>mut</b> <a href="sui_system.md#0x2_sui_system_SuiSystemState">SuiSystemState</a>,
validator_addr: <b>address</b>,
ctx: &<b>mut</b> TxContext,
ctx: &TxContext,
) {
<b>let</b> sender = <a href="tx_context.md#0x2_tx_context_sender">tx_context::sender</a>(ctx);

Expand Down
8 changes: 4 additions & 4 deletions crates/sui-framework/docs/validator_set.md
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ process them in <code>advance_epoch</code> by calling <code>process_pending_dele



<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="validator_set.md#0x2_validator_set_request_set_gas_price">request_set_gas_price</a>(self: &<b>mut</b> <a href="validator_set.md#0x2_validator_set_ValidatorSet">validator_set::ValidatorSet</a>, new_gas_price: u64, ctx: &<b>mut</b> <a href="tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>)
<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="validator_set.md#0x2_validator_set_request_set_gas_price">request_set_gas_price</a>(self: &<b>mut</b> <a href="validator_set.md#0x2_validator_set_ValidatorSet">validator_set::ValidatorSet</a>, new_gas_price: u64, ctx: &<a href="tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>)
</code></pre>


Expand All @@ -525,7 +525,7 @@ process them in <code>advance_epoch</code> by calling <code>process_pending_dele
<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="validator_set.md#0x2_validator_set_request_set_gas_price">request_set_gas_price</a>(
self: &<b>mut</b> <a href="validator_set.md#0x2_validator_set_ValidatorSet">ValidatorSet</a>,
new_gas_price: u64,
ctx: &<b>mut</b> TxContext,
ctx: &TxContext,
) {
<b>let</b> validator_address = <a href="tx_context.md#0x2_tx_context_sender">tx_context::sender</a>(ctx);
<b>let</b> <a href="validator.md#0x2_validator">validator</a> = <a href="validator_set.md#0x2_validator_set_get_validator_mut">get_validator_mut</a>(&<b>mut</b> self.active_validators, validator_address);
Expand All @@ -543,7 +543,7 @@ process them in <code>advance_epoch</code> by calling <code>process_pending_dele



<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="validator_set.md#0x2_validator_set_request_set_commission_rate">request_set_commission_rate</a>(self: &<b>mut</b> <a href="validator_set.md#0x2_validator_set_ValidatorSet">validator_set::ValidatorSet</a>, new_commission_rate: u64, ctx: &<b>mut</b> <a href="tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>)
<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="validator_set.md#0x2_validator_set_request_set_commission_rate">request_set_commission_rate</a>(self: &<b>mut</b> <a href="validator_set.md#0x2_validator_set_ValidatorSet">validator_set::ValidatorSet</a>, new_commission_rate: u64, ctx: &<a href="tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>)
</code></pre>


Expand All @@ -555,7 +555,7 @@ process them in <code>advance_epoch</code> by calling <code>process_pending_dele
<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="validator_set.md#0x2_validator_set_request_set_commission_rate">request_set_commission_rate</a>(
self: &<b>mut</b> <a href="validator_set.md#0x2_validator_set_ValidatorSet">ValidatorSet</a>,
new_commission_rate: u64,
ctx: &<b>mut</b> TxContext,
ctx: &TxContext,
) {
<b>let</b> validator_address = <a href="tx_context.md#0x2_tx_context_sender">tx_context::sender</a>(ctx);
<b>let</b> <a href="validator.md#0x2_validator">validator</a> = <a href="validator_set.md#0x2_validator_set_get_validator_mut">get_validator_mut</a>(&<b>mut</b> self.active_validators, validator_address);
Expand Down
7 changes: 3 additions & 4 deletions crates/sui-framework/sources/devnet_nft.move
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,12 @@ module sui::devnet_nft {
public entry fun update_description(
nft: &mut DevNetNFT,
new_description: vector<u8>,
_: &mut TxContext
) {
nft.description = string::utf8(new_description)
}

/// Permanently delete `nft`
public entry fun burn(nft: DevNetNFT, _: &mut TxContext) {
public entry fun burn(nft: DevNetNFT) {
let DevNetNFT { id, name: _, description: _, url: _ } = nft;
object::delete(id)
}
Expand Down Expand Up @@ -113,15 +112,15 @@ module sui::devnet_nftTests {
ts::next_tx(&mut scenario, addr2);
{
let nft = ts::take_from_sender<DevNetNFT>(&mut scenario);
devnet_nft::update_description(&mut nft, b"a new description", ts::ctx(&mut scenario)) ;
devnet_nft::update_description(&mut nft, b"a new description") ;
assert!(*string::bytes(devnet_nft::description(&nft)) == b"a new description", 0);
ts::return_to_sender(&mut scenario, nft);
};
// burn it
ts::next_tx(&mut scenario, addr2);
{
let nft = ts::take_from_sender<DevNetNFT>(&mut scenario);
devnet_nft::burn(nft, ts::ctx(&mut scenario))
devnet_nft::burn(nft)
};
ts::end(scenario);
}
Expand Down
4 changes: 2 additions & 2 deletions crates/sui-framework/sources/epoch_time_lock.move
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ module sui::epoch_time_lock {
}

/// Create a new epoch time lock with `epoch`. Aborts if the current epoch is less than the input epoch.
public fun new(epoch: u64, ctx: &mut TxContext) : EpochTimeLock {
public fun new(epoch: u64, ctx: &TxContext) : EpochTimeLock {
assert!(tx_context::epoch(ctx) < epoch, EEpochAlreadyPassed);
EpochTimeLock { epoch }
}

/// Destroys an epoch time lock. Aborts if the current epoch is less than the locked epoch.
public fun destroy(lock: EpochTimeLock, ctx: &mut TxContext) {
public fun destroy(lock: EpochTimeLock, ctx: &TxContext) {
let EpochTimeLock { epoch } = lock;
assert!(tx_context::epoch(ctx) >= epoch, EEpochNotYetEnded);
}
Expand Down
4 changes: 2 additions & 2 deletions crates/sui-framework/sources/governance/sui_system.move
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ module sui::sui_system {
public entry fun report_validator(
self: &mut SuiSystemState,
validator_addr: address,
ctx: &mut TxContext,
ctx: &TxContext,
) {
let sender = tx_context::sender(ctx);
// Both the reporter and the reported have to be validators.
Expand All @@ -375,7 +375,7 @@ module sui::sui_system {
public entry fun undo_report_validator(
self: &mut SuiSystemState,
validator_addr: address,
ctx: &mut TxContext,
ctx: &TxContext,
) {
let sender = tx_context::sender(ctx);

Expand Down
4 changes: 2 additions & 2 deletions crates/sui-framework/sources/governance/validator_set.move
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ module sui::validator_set {
public(friend) fun request_set_gas_price(
self: &mut ValidatorSet,
new_gas_price: u64,
ctx: &mut TxContext,
ctx: &TxContext,
) {
let validator_address = tx_context::sender(ctx);
let validator = get_validator_mut(&mut self.active_validators, validator_address);
Expand All @@ -249,7 +249,7 @@ module sui::validator_set {
public(friend) fun request_set_commission_rate(
self: &mut ValidatorSet,
new_commission_rate: u64,
ctx: &mut TxContext,
ctx: &TxContext,
) {
let validator_address = tx_context::sender(ctx);
let validator = get_validator_mut(&mut self.active_validators, validator_address);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
processed 2 tasks

task 0 'publish'. lines 4-11:
created: object(103)
written: object(102)

task 1 'publish'. lines 13-20:
created: object(105)
written: object(104)
20 changes: 20 additions & 0 deletions crates/sui-verifier-transactional-tests/tests/entry_points/ok.mvir
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

//# publish
module 0x0.m {
import 0x2.tx_context;
public entry t(arg: &tx_context.TxContext) {
label l0:
abort 0;
}
}

//# publish
module 0x0.m {
import 0x2.tx_context;
public entry t(arg: &mut tx_context.TxContext) {
label l0:
abort 0;
}
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
processed 4 tasks
processed 3 tasks

task 0 'publish'. lines 4-11:
Error: Transaction Effects Status: Sui Move Bytecode Verification Error. Please run the Sui Move Verifier for more information.
Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: SuiMoveVerificationError, source: Some("Expected last (and at most second) parameter for _::m::init to be &mut sui::tx_context::TxContext, but found u64") } }
Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: SuiMoveVerificationError, source: Some("Expected last parameter for _::m::init to be &mut sui::tx_context::TxContext or &sui::tx_context::TxContext, but found u64") } }

task 1 'publish'. lines 13-20:
Error: Transaction Effects Status: Sui Move Bytecode Verification Error. Please run the Sui Move Verifier for more information.
Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: SuiMoveVerificationError, source: Some("Expected last (and at most second) parameter for _::tx_context::init to be &mut sui::tx_context::TxContext, but found _::tx_context::TxContext") } }
Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: SuiMoveVerificationError, source: Some("Expected last parameter for _::tx_context::init to be &mut sui::tx_context::TxContext or &sui::tx_context::TxContext, but found _::tx_context::TxContext") } }

task 2 'publish'. lines 22-29:
Error: Transaction Effects Status: Sui Move Bytecode Verification Error. Please run the Sui Move Verifier for more information.
Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: SuiMoveVerificationError, source: Some("Expected last (and at most second) parameter for _::m::init to be &mut sui::tx_context::TxContext, but found &sui::tx_context::TxContext") } }

task 3 'publish'. lines 32-39:
Error: Transaction Effects Status: Sui Move Bytecode Verification Error. Please run the Sui Move Verifier for more information.
Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: SuiMoveVerificationError, source: Some("Expected last (and at most second) parameter for _::m::init to be &mut sui::tx_context::TxContext, but found sui::tx_context::TxContext") } }
Execution Error: ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: SuiMoveVerificationError, source: Some("Expected last parameter for _::m::init to be &mut sui::tx_context::TxContext or &sui::tx_context::TxContext, but found sui::tx_context::TxContext") } }
Loading

1 comment on commit 8b49992

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Owned Transactions Benchmark Results

Benchmark Report:
+-------------+-----+--------+-----+-----+-----+-----+-----+-----+-------+-----+
| duration(s) | tps | error% | min | p25 | p50 | p75 | p90 | p99 | p99.9 | max |
+==============================================================================+
| 60          | 100 | 0      | 11  | 56  | 57  | 61  | 95  | 101 | 103   | 105 |

Shared Transactions Benchmark Results

Benchmark Report:
+-------------+-----+--------+-----+-----+-----+-----+-----+-----+-------+-----+
| duration(s) | tps | error% | min | p25 | p50 | p75 | p90 | p99 | p99.9 | max |
+==============================================================================+
| 60          | 99  | 0      | 12  | 353 | 436 | 504 | 566 | 711 | 809   | 887 |

Narwhal Benchmark Results

 SUMMARY:
-----------------------------------------
 + CONFIG:
 Faults: 0 node(s)
 Committee size: 4 node(s)
 Worker(s) per node: 1 worker(s)
 Collocate primary and workers: True
 Input rate: 50,000 tx/s
 Transaction size: 512 B
 Execution time: 57 s

 Header number of batches threshold: 32 digests
 Header maximum number of batches: 1,000 digests
 Max header delay: 2,000 ms
 GC depth: 50 round(s)
 Sync retry delay: 10,000 ms
 Sync retry nodes: 3 node(s)
 batch size: 500,000 B
 Max batch delay: 200 ms
 Max concurrent requests: 500,000 

 + RESULTS:
 Batch creation avg latency: 77 ms
 Header creation avg latency: 1,841 ms
 	Batch to header avg latency: 1,032 ms
 Header to certificate avg latency: 7 ms
 	Request vote outbound avg latency: 3 ms
 Certificate commit avg latency: 3,470 ms

 Consensus TPS: 49,469 tx/s
 Consensus BPS: 25,328,004 B/s
 Consensus latency: 3,582 ms

 End-to-end TPS: 47,773 tx/s
 End-to-end BPS: 24,459,695 B/s
 End-to-end latency: 4,574 ms
-----------------------------------------

Please sign in to comment.