Skip to content

Commit

Permalink
fixup! [libra-framework] Refactor writeset prologue and epilogue
Browse files Browse the repository at this point in the history
  • Loading branch information
Runtian Zhou committed Sep 20, 2020
1 parent f367e15 commit 47221b9
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 85 deletions.
30 changes: 15 additions & 15 deletions json-rpc/tests/integration_test.rs
Expand Up @@ -39,35 +39,35 @@ fn create_test_cases() -> Vec<Test> {
resp.result.unwrap(),
json!([
{
"burn_events_key": "04000000000000000000000000000000000000000a550c18",
"cancel_burn_events_key": "06000000000000000000000000000000000000000a550c18",
"burn_events_key": "05000000000000000000000000000000000000000a550c18",
"cancel_burn_events_key": "07000000000000000000000000000000000000000a550c18",
"code": "Coin1",
"exchange_rate_update_events_key": "07000000000000000000000000000000000000000a550c18",
"exchange_rate_update_events_key": "08000000000000000000000000000000000000000a550c18",
"fractional_part": 100,
"mint_events_key": "03000000000000000000000000000000000000000a550c18",
"preburn_events_key": "05000000000000000000000000000000000000000a550c18",
"mint_events_key": "04000000000000000000000000000000000000000a550c18",
"preburn_events_key": "06000000000000000000000000000000000000000a550c18",
"scaling_factor": 1000000,
"to_lbr_exchange_rate": 0.5
},
{
"burn_events_key": "09000000000000000000000000000000000000000a550c18",
"cancel_burn_events_key": "0b000000000000000000000000000000000000000a550c18",
"burn_events_key": "0a000000000000000000000000000000000000000a550c18",
"cancel_burn_events_key": "0c000000000000000000000000000000000000000a550c18",
"code": "Coin2",
"exchange_rate_update_events_key": "0c000000000000000000000000000000000000000a550c18",
"exchange_rate_update_events_key": "0d000000000000000000000000000000000000000a550c18",
"fractional_part": 100,
"mint_events_key": "08000000000000000000000000000000000000000a550c18",
"preburn_events_key": "0a000000000000000000000000000000000000000a550c18",
"mint_events_key": "09000000000000000000000000000000000000000a550c18",
"preburn_events_key": "0b000000000000000000000000000000000000000a550c18",
"scaling_factor": 1000000,
"to_lbr_exchange_rate": 0.5
},
{
"burn_events_key": "0e000000000000000000000000000000000000000a550c18",
"cancel_burn_events_key": "10000000000000000000000000000000000000000a550c18",
"burn_events_key": "0f000000000000000000000000000000000000000a550c18",
"cancel_burn_events_key": "11000000000000000000000000000000000000000a550c18",
"code": "LBR",
"exchange_rate_update_events_key": "11000000000000000000000000000000000000000a550c18",
"exchange_rate_update_events_key": "12000000000000000000000000000000000000000a550c18",
"fractional_part": 1000,
"mint_events_key": "0d000000000000000000000000000000000000000a550c18",
"preburn_events_key": "0f000000000000000000000000000000000000000a550c18",
"mint_events_key": "0e000000000000000000000000000000000000000a550c18",
"preburn_events_key": "10000000000000000000000000000000000000000a550c18",
"scaling_factor": 1000000,
"to_lbr_exchange_rate": 1.0
}
Expand Down
Expand Up @@ -4,7 +4,7 @@
//! proposer: vivian
//! block-time: 1000000

// check: EventKey([20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 85, 12, 24])
// check: EventKey([21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 85, 12, 24])
// check: NewBlockEvent
// check: 1000000

Expand Down
Binary file modified language/stdlib/compiled/stdlib/036_LibraAccount.mv
Binary file not shown.
Binary file modified language/stdlib/compiled/stdlib/037_Genesis.mv
Binary file not shown.
1 change: 0 additions & 1 deletion language/stdlib/modules/Genesis.move
Expand Up @@ -71,7 +71,6 @@ module Genesis {
lr_account,
);
LibraBlock::initialize_block_metadata(lr_account);
LibraAccount::initialize_writeset_manager(lr_account);

let lr_rotate_key_cap = LibraAccount::extract_key_rotation_capability(lr_account);
LibraAccount::rotate_authentication_key(&lr_rotate_key_cap, lr_auth_key);
Expand Down
10 changes: 1 addition & 9 deletions language/stdlib/modules/LibraAccount.move
Expand Up @@ -209,14 +209,6 @@ module LibraAccount {
limits_cap: AccountLimits::grant_mutation_capability(lr_account),
}
);
}

public fun initialize_writeset_manager(
lr_account: &signer,
) {
LibraTimestamp::assert_genesis();
// Operational constraint, not a privilege constraint.
CoreAddresses::assert_libra_root(lr_account);

assert(
!exists<LibraWriteSetManager>(CoreAddresses::LIBRA_ROOT_ADDRESS()),
Expand All @@ -230,7 +222,7 @@ module LibraAccount {
);
}

spec fun initialize_writeset_manager {
spec fun initialize {
include LibraTimestamp::AbortsIfNotGenesis;
include CoreAddresses::AbortsIfNotLibraRoot{account: lr_account};

Expand Down
1 change: 0 additions & 1 deletion language/stdlib/modules/doc/Genesis.md
Expand Up @@ -76,7 +76,6 @@
lr_account,
);
<a href="LibraBlock.md#0x1_LibraBlock_initialize_block_metadata">LibraBlock::initialize_block_metadata</a>(lr_account);
<a href="LibraAccount.md#0x1_LibraAccount_initialize_writeset_manager">LibraAccount::initialize_writeset_manager</a>(lr_account);

<b>let</b> lr_rotate_key_cap = <a href="LibraAccount.md#0x1_LibraAccount_extract_key_rotation_capability">LibraAccount::extract_key_rotation_capability</a>(lr_account);
<a href="LibraAccount.md#0x1_LibraAccount_rotate_authentication_key">LibraAccount::rotate_authentication_key</a>(&lr_rotate_key_cap, lr_auth_key);
Expand Down
83 changes: 27 additions & 56 deletions language/stdlib/modules/doc/LibraAccount.md
Expand Up @@ -46,7 +46,6 @@
- [Const `PROLOGUE_EMODULE_NOT_ALLOWED`](#0x1_LibraAccount_PROLOGUE_EMODULE_NOT_ALLOWED)
- [Const `PROLOGUE_INVALID_WRITESET_SENDER`](#0x1_LibraAccount_PROLOGUE_INVALID_WRITESET_SENDER)
- [Function `initialize`](#0x1_LibraAccount_initialize)
- [Function `initialize_writeset_manager`](#0x1_LibraAccount_initialize_writeset_manager)
- [Function `has_published_account_limits`](#0x1_LibraAccount_has_published_account_limits)
- [Function `should_track_limits_for_account`](#0x1_LibraAccount_should_track_limits_for_account)
- [Function `staple_lbr`](#0x1_LibraAccount_staple_lbr)
Expand Down Expand Up @@ -93,7 +92,7 @@
- [Function `create_validator_account`](#0x1_LibraAccount_create_validator_account)
- [Function `create_validator_operator_account`](#0x1_LibraAccount_create_validator_operator_account)
- [Specification](#0x1_LibraAccount_Specification)
- [Function `initialize_writeset_manager`](#0x1_LibraAccount_Specification_initialize_writeset_manager)
- [Function `initialize`](#0x1_LibraAccount_Specification_initialize)
- [Function `should_track_limits_for_account`](#0x1_LibraAccount_Specification_should_track_limits_for_account)
- [Function `staple_lbr`](#0x1_LibraAccount_Specification_staple_lbr)
- [Function `unstaple_lbr`](#0x1_LibraAccount_Specification_unstaple_lbr)
Expand Down Expand Up @@ -855,34 +854,6 @@ Initialize this module. This is only callable from genesis.
limits_cap: <a href="AccountLimits.md#0x1_AccountLimits_grant_mutation_capability">AccountLimits::grant_mutation_capability</a>(lr_account),
}
);
}
</code></pre>



</details>

<a name="0x1_LibraAccount_initialize_writeset_manager"></a>

## Function `initialize_writeset_manager`



<pre><code><b>public</b> <b>fun</b> <a href="#0x1_LibraAccount_initialize_writeset_manager">initialize_writeset_manager</a>(lr_account: &signer)
</code></pre>



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="#0x1_LibraAccount_initialize_writeset_manager">initialize_writeset_manager</a>(
lr_account: &signer,
) {
<a href="LibraTimestamp.md#0x1_LibraTimestamp_assert_genesis">LibraTimestamp::assert_genesis</a>();
// Operational constraint, not a privilege constraint.
<a href="CoreAddresses.md#0x1_CoreAddresses_assert_libra_root">CoreAddresses::assert_libra_root</a>(lr_account);

<b>assert</b>(
!exists&lt;<a href="#0x1_LibraAccount_LibraWriteSetManager">LibraWriteSetManager</a>&gt;(<a href="CoreAddresses.md#0x1_CoreAddresses_LIBRA_ROOT_ADDRESS">CoreAddresses::LIBRA_ROOT_ADDRESS</a>()),
Expand Down Expand Up @@ -2596,12 +2567,12 @@ After genesis, the <code><a href="#0x1_LibraAccount_LibraWriteSetManager">LibraW



<a name="0x1_LibraAccount_Specification_initialize_writeset_manager"></a>
<a name="0x1_LibraAccount_Specification_initialize"></a>

### Function `initialize_writeset_manager`
### Function `initialize`


<pre><code><b>public</b> <b>fun</b> <a href="#0x1_LibraAccount_initialize_writeset_manager">initialize_writeset_manager</a>(lr_account: &signer)
<pre><code><b>public</b> <b>fun</b> <a href="#0x1_LibraAccount_initialize">initialize</a>(lr_account: &signer, dummy_auth_key_prefix: vector&lt;u8&gt;)
</code></pre>


Expand Down Expand Up @@ -2694,11 +2665,11 @@ pragma verify_duration_estimate = 100;
<pre><code><b>schema</b> <a href="#0x1_LibraAccount_StapleLBRAbortsIf">StapleLBRAbortsIf</a> {
cap: <a href="#0x1_LibraAccount_WithdrawCapability">WithdrawCapability</a>;
amount_lbr: u64;
<a name="0x1_LibraAccount_reserve$61"></a>
<a name="0x1_LibraAccount_reserve$60"></a>
<b>let</b> reserve = <b>global</b>&lt;<a href="LBR.md#0x1_LBR_Reserve">LBR::Reserve</a>&gt;(<a href="CoreAddresses.md#0x1_CoreAddresses_LIBRA_ROOT_ADDRESS">CoreAddresses::LIBRA_ROOT_ADDRESS</a>());
<a name="0x1_LibraAccount_amount_coin1$62"></a>
<a name="0x1_LibraAccount_amount_coin1$61"></a>
<b>let</b> amount_coin1 = <a href="FixedPoint32.md#0x1_FixedPoint32_spec_multiply_u64">FixedPoint32::spec_multiply_u64</a>(amount_lbr, reserve.coin1.ratio) + 1;
<a name="0x1_LibraAccount_amount_coin2$63"></a>
<a name="0x1_LibraAccount_amount_coin2$62"></a>
<b>let</b> amount_coin2 = <a href="FixedPoint32.md#0x1_FixedPoint32_spec_multiply_u64">FixedPoint32::spec_multiply_u64</a>(amount_lbr, reserve.coin2.ratio) + 1;
<b>aborts_if</b> amount_lbr == 0 with <a href="Errors.md#0x1_Errors_INVALID_ARGUMENT">Errors::INVALID_ARGUMENT</a>;
<b>aborts_if</b> reserve.coin1.backing.value + amount_coin1 &gt; <a href="#0x1_LibraAccount_MAX_U64">MAX_U64</a> with <a href="Errors.md#0x1_Errors_LIMIT_EXCEEDED">Errors::LIMIT_EXCEEDED</a>;
Expand Down Expand Up @@ -2729,17 +2700,17 @@ pragma verify_duration_estimate = 100;
<pre><code><b>schema</b> <a href="#0x1_LibraAccount_StapleLBREnsures">StapleLBREnsures</a> {
cap: <a href="#0x1_LibraAccount_WithdrawCapability">WithdrawCapability</a>;
amount_lbr: u64;
<a name="0x1_LibraAccount_reserve$64"></a>
<a name="0x1_LibraAccount_reserve$63"></a>
<b>let</b> reserve = <b>global</b>&lt;<a href="LBR.md#0x1_LBR_Reserve">LBR::Reserve</a>&gt;(<a href="CoreAddresses.md#0x1_CoreAddresses_LIBRA_ROOT_ADDRESS">CoreAddresses::LIBRA_ROOT_ADDRESS</a>());
<a name="0x1_LibraAccount_amount_coin1$65"></a>
<a name="0x1_LibraAccount_amount_coin1$64"></a>
<b>let</b> amount_coin1 = <a href="FixedPoint32.md#0x1_FixedPoint32_spec_multiply_u64">FixedPoint32::spec_multiply_u64</a>(amount_lbr, reserve.coin1.ratio) + 1;
<a name="0x1_LibraAccount_amount_coin2$66"></a>
<a name="0x1_LibraAccount_amount_coin2$65"></a>
<b>let</b> amount_coin2 = <a href="FixedPoint32.md#0x1_FixedPoint32_spec_multiply_u64">FixedPoint32::spec_multiply_u64</a>(amount_lbr, reserve.coin2.ratio) + 1;
<a name="0x1_LibraAccount_total_value_coin1$67"></a>
<a name="0x1_LibraAccount_total_value_coin1$66"></a>
<b>let</b> total_value_coin1 = <b>global</b>&lt;<a href="Libra.md#0x1_Libra_CurrencyInfo">Libra::CurrencyInfo</a>&lt;<a href="Coin1.md#0x1_Coin1">Coin1</a>&gt;&gt;(<a href="CoreAddresses.md#0x1_CoreAddresses_CURRENCY_INFO_ADDRESS">CoreAddresses::CURRENCY_INFO_ADDRESS</a>()).total_value;
<a name="0x1_LibraAccount_total_value_coin2$68"></a>
<a name="0x1_LibraAccount_total_value_coin2$67"></a>
<b>let</b> total_value_coin2 = <b>global</b>&lt;<a href="Libra.md#0x1_Libra_CurrencyInfo">Libra::CurrencyInfo</a>&lt;<a href="Coin2.md#0x1_Coin2">Coin2</a>&gt;&gt;(<a href="CoreAddresses.md#0x1_CoreAddresses_CURRENCY_INFO_ADDRESS">CoreAddresses::CURRENCY_INFO_ADDRESS</a>()).total_value;
<a name="0x1_LibraAccount_total_value_lbr$69"></a>
<a name="0x1_LibraAccount_total_value_lbr$68"></a>
<b>let</b> total_value_lbr = <b>global</b>&lt;<a href="Libra.md#0x1_Libra_CurrencyInfo">Libra::CurrencyInfo</a>&lt;<a href="LBR.md#0x1_LBR">LBR</a>&gt;&gt;(<a href="CoreAddresses.md#0x1_CoreAddresses_CURRENCY_INFO_ADDRESS">CoreAddresses::CURRENCY_INFO_ADDRESS</a>()).total_value;
<b>ensures</b> <b>global</b>&lt;<a href="#0x1_LibraAccount_Balance">Balance</a>&lt;<a href="Coin1.md#0x1_Coin1">Coin1</a>&gt;&gt;(cap.account_address).coin.value
== <b>old</b>(<b>global</b>&lt;<a href="#0x1_LibraAccount_Balance">Balance</a>&lt;<a href="Coin1.md#0x1_Coin1">Coin1</a>&gt;&gt;(cap.account_address).coin.value) - amount_coin1;
Expand Down Expand Up @@ -2891,9 +2862,9 @@ pragma verify_duration_estimate = 100;
<pre><code><b>schema</b> <a href="#0x1_LibraAccount_TieredMintEnsures">TieredMintEnsures</a>&lt;Token&gt; {
designated_dealer_address: address;
mint_amount: u64;
<a name="0x1_LibraAccount_dealer_balance$70"></a>
<a name="0x1_LibraAccount_dealer_balance$69"></a>
<b>let</b> dealer_balance = <b>global</b>&lt;<a href="#0x1_LibraAccount_Balance">Balance</a>&lt;Token&gt;&gt;(designated_dealer_address).coin.value;
<a name="0x1_LibraAccount_currency_info$71"></a>
<a name="0x1_LibraAccount_currency_info$70"></a>
<b>let</b> currency_info = <b>global</b>&lt;<a href="Libra.md#0x1_Libra_CurrencyInfo">Libra::CurrencyInfo</a>&lt;Token&gt;&gt;(<a href="CoreAddresses.md#0x1_CoreAddresses_CURRENCY_INFO_ADDRESS">CoreAddresses::CURRENCY_INFO_ADDRESS</a>());
}
</code></pre>
Expand Down Expand Up @@ -3001,7 +2972,7 @@ Can only withdraw from the balances of cap.account_address [B27].


<pre><code>pragma opaque;
<a name="0x1_LibraAccount_payer$75"></a>
<a name="0x1_LibraAccount_payer$74"></a>
<b>let</b> payer = cap.account_address;
<b>modifies</b> <b>global</b>&lt;<a href="#0x1_LibraAccount_Balance">Balance</a>&lt;Token&gt;&gt;(payer);
<b>modifies</b> <b>global</b>&lt;<a href="#0x1_LibraAccount">LibraAccount</a>&gt;(payer);
Expand All @@ -3023,7 +2994,7 @@ Can only withdraw from the balances of cap.account_address [B27].
cap: <a href="#0x1_LibraAccount_WithdrawCapability">WithdrawCapability</a>;
payee: address;
amount: u64;
<a name="0x1_LibraAccount_payer$58"></a>
<a name="0x1_LibraAccount_payer$57"></a>
<b>let</b> payer = cap.account_address;
<b>include</b> <a href="LibraTimestamp.md#0x1_LibraTimestamp_AbortsIfNotOperating">LibraTimestamp::AbortsIfNotOperating</a>;
<b>include</b> <a href="Libra.md#0x1_Libra_AbortsIfNoCurrency">Libra::AbortsIfNoCurrency</a>&lt;Token&gt;;
Expand All @@ -3047,9 +3018,9 @@ Can only withdraw from the balances of cap.account_address [B27].


<pre><code>pragma opaque;
<a name="0x1_LibraAccount_dd_addr$76"></a>
<a name="0x1_LibraAccount_dd_addr$75"></a>
<b>let</b> dd_addr = <a href="Signer.md#0x1_Signer_spec_address_of">Signer::spec_address_of</a>(dd);
<a name="0x1_LibraAccount_payer$77"></a>
<a name="0x1_LibraAccount_payer$76"></a>
<b>let</b> payer = cap.account_address;
<b>modifies</b> <b>global</b>&lt;<a href="#0x1_LibraAccount">LibraAccount</a>&gt;(payer);
<b>ensures</b> exists&lt;<a href="#0x1_LibraAccount">LibraAccount</a>&gt;(payer);
Expand Down Expand Up @@ -3084,9 +3055,9 @@ Can only withdraw from the balances of cap.account_address [B27].
<pre><code><b>schema</b> <a href="#0x1_LibraAccount_PreburnEnsures">PreburnEnsures</a>&lt;Token&gt; {
dd_addr: address;
payer: address;
<a name="0x1_LibraAccount_payer_balance$59"></a>
<a name="0x1_LibraAccount_payer_balance$58"></a>
<b>let</b> payer_balance = <b>global</b>&lt;<a href="#0x1_LibraAccount_Balance">Balance</a>&lt;Token&gt;&gt;(payer).coin.value;
<a name="0x1_LibraAccount_preburn$60"></a>
<a name="0x1_LibraAccount_preburn$59"></a>
<b>let</b> preburn = <b>global</b>&lt;<a href="Libra.md#0x1_Libra_Preburn">Libra::Preburn</a>&lt;Token&gt;&gt;(dd_addr);
}
</code></pre>
Expand Down Expand Up @@ -3123,7 +3094,7 @@ The value of preburn at <code>dd_addr</code> increases by <code>amount</code>;


<pre><code>pragma opaque;
<a name="0x1_LibraAccount_sender_addr$78"></a>
<a name="0x1_LibraAccount_sender_addr$77"></a>
<b>let</b> sender_addr = <a href="Signer.md#0x1_Signer_spec_address_of">Signer::spec_address_of</a>(sender);
<b>modifies</b> <b>global</b>&lt;<a href="#0x1_LibraAccount">LibraAccount</a>&gt;(sender_addr);
<b>include</b> <a href="#0x1_LibraAccount_ExtractWithdrawCapAbortsIf">ExtractWithdrawCapAbortsIf</a>{sender_addr};
Expand Down Expand Up @@ -3161,7 +3132,7 @@ The value of preburn at <code>dd_addr</code> increases by <code>amount</code>;


<pre><code>pragma opaque;
<a name="0x1_LibraAccount_cap_addr$79"></a>
<a name="0x1_LibraAccount_cap_addr$78"></a>
<b>let</b> cap_addr = cap.account_address;
<b>modifies</b> <b>global</b>&lt;<a href="#0x1_LibraAccount">LibraAccount</a>&gt;(cap_addr);
<b>aborts_if</b> !<a href="#0x1_LibraAccount_exists_at">exists_at</a>(cap_addr) with <a href="Errors.md#0x1_Errors_NOT_PUBLISHED">Errors::NOT_PUBLISHED</a>;
Expand Down Expand Up @@ -3246,7 +3217,7 @@ Can only rotate the authentication_key of cap.account_address [B26].

<pre><code><b>schema</b> <a href="#0x1_LibraAccount_ExtractKeyRotationCapabilityAbortsIf">ExtractKeyRotationCapabilityAbortsIf</a> {
account: signer;
<a name="0x1_LibraAccount_account_addr$72"></a>
<a name="0x1_LibraAccount_account_addr$71"></a>
<b>let</b> account_addr = <a href="Signer.md#0x1_Signer_spec_address_of">Signer::spec_address_of</a>(account);
<b>aborts_if</b> !<a href="#0x1_LibraAccount_exists_at">exists_at</a>(account_addr) with <a href="Errors.md#0x1_Errors_NOT_PUBLISHED">Errors::NOT_PUBLISHED</a>;
<b>aborts_if</b> <a href="#0x1_LibraAccount_delegated_key_rotation_capability">delegated_key_rotation_capability</a>(account_addr) with <a href="Errors.md#0x1_Errors_INVALID_STATE">Errors::INVALID_STATE</a>;
Expand Down Expand Up @@ -3322,7 +3293,7 @@ Can only rotate the authentication_key of cap.account_address [B26].
Needed to prove invariant


<a name="0x1_LibraAccount_new_account_addr$80"></a>
<a name="0x1_LibraAccount_new_account_addr$79"></a>


<pre><code><b>let</b> new_account_addr = <a href="Signer.md#0x1_Signer_address_of">Signer::address_of</a>(new_account);
Expand Down Expand Up @@ -3502,7 +3473,7 @@ Returns true if the LibraAccount at <code>addr</code> holds <code><a href="#0x1_

<pre><code><b>schema</b> <a href="#0x1_LibraAccount_EnsuresHasKeyRotationCap">EnsuresHasKeyRotationCap</a> {
account: signer;
<a name="0x1_LibraAccount_addr$73"></a>
<a name="0x1_LibraAccount_addr$72"></a>
<b>let</b> addr = <a href="Signer.md#0x1_Signer_spec_address_of">Signer::spec_address_of</a>(account);
<b>ensures</b> <a href="#0x1_LibraAccount_spec_holds_own_key_rotation_cap">spec_holds_own_key_rotation_cap</a>(addr);
}
Expand Down Expand Up @@ -3559,7 +3530,7 @@ or the key rotation capability for addr itself [B26].

<pre><code><b>schema</b> <a href="#0x1_LibraAccount_EnsuresWithdrawalCap">EnsuresWithdrawalCap</a> {
account: signer;
<a name="0x1_LibraAccount_addr$74"></a>
<a name="0x1_LibraAccount_addr$73"></a>
<b>let</b> addr = <a href="Signer.md#0x1_Signer_spec_address_of">Signer::spec_address_of</a>(account);
<b>ensures</b> <a href="#0x1_LibraAccount_spec_holds_own_withdraw_cap">spec_holds_own_withdraw_cap</a>(addr);
}
Expand Down
2 changes: 1 addition & 1 deletion types/src/block_metadata.rs
Expand Up @@ -69,7 +69,7 @@ impl BlockMetadata {
}

pub fn new_block_event_key() -> EventKey {
EventKey::new_from_address(&libra_root_address(), 20)
EventKey::new_from_address(&libra_root_address(), 21)
}

/// The path to the new block event handle under a LibraBlock::BlockMetadata resource.
Expand Down

0 comments on commit 47221b9

Please sign in to comment.