-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1928 from radixdlt/feature/lower-min-rounds-per-e…
…poch Change the min rounds per epoch
- Loading branch information
Showing
15 changed files
with
273 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
radix-engine-tests/assets/serialized_receipts/basic_subintents/create-accounts.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"kind": "CommitSuccess", | ||
"state_updates_summary": { | ||
"new_entities": [ | ||
"account_sim1cxfcgpnu3kcax77255p6mfcnsrmnyqe7vsghqxm397r9fg64nxzuja", | ||
"account_sim1cxe8weyfw9efyag5qs50rq3f7h8g9qc08v72yxg6hck8ctmh2h4z5u" | ||
], | ||
"metadata_updates": {}, | ||
"non_fungible_data_updates": {}, | ||
"newly_minted_non_fungibles": [] | ||
}, | ||
"worktop_changes": { | ||
"3": [ | ||
{ | ||
"kind": "Put", | ||
"value": { | ||
"kind": "Amount", | ||
"resource_address": "resource_sim1tknxxxxxxxxxradxrdxxxxxxxxx009923554798xxxxxxxxxakj8n3", | ||
"amount": "10000" | ||
} | ||
} | ||
], | ||
"4": [ | ||
{ | ||
"kind": "Take", | ||
"value": { | ||
"kind": "Amount", | ||
"resource_address": "resource_sim1tknxxxxxxxxxradxrdxxxxxxxxx009923554798xxxxxxxxxakj8n3", | ||
"amount": "10000" | ||
} | ||
} | ||
] | ||
}, | ||
"fee_summary": { | ||
"execution_fees_in_xrd": "0.3370283", | ||
"finalization_fees_in_xrd": "0.0812626", | ||
"storage_fees_in_xrd": "0.24166106762", | ||
"royalty_fees_in_xrd": "0" | ||
}, | ||
"locked_fees": { | ||
"contingent": "0", | ||
"non_contingent": "5000" | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
radix-engine-tests/assets/serialized_receipts/basic_subintents/trivial_subintent.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"kind": "CommitSuccess", | ||
"state_updates_summary": { | ||
"new_entities": [], | ||
"metadata_updates": {}, | ||
"non_fungible_data_updates": {}, | ||
"newly_minted_non_fungibles": [] | ||
}, | ||
"worktop_changes": {}, | ||
"fee_summary": { | ||
"execution_fees_in_xrd": "0.0838967", | ||
"finalization_fees_in_xrd": "0.0052508", | ||
"storage_fees_in_xrd": "0.05140304477", | ||
"royalty_fees_in_xrd": "0" | ||
}, | ||
"locked_fees": { | ||
"contingent": "0", | ||
"non_contingent": "5000" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
use scrypto_test::prelude::*; | ||
|
||
#[test] | ||
fn consensus_manager_min_rounds_per_epoch_is_100_in_cuttlefish() { | ||
// Arrange | ||
let ledger = LedgerSimulatorBuilder::new() | ||
.with_custom_protocol(|builder| { | ||
builder | ||
.configure_cuttlefish(|mut creator| { | ||
creator.update_number_of_min_rounds_per_epoch = | ||
UpdateSetting::Enabled(UpdateNumberOfMinRoundsPerEpochSettings::Set { | ||
value: 100, | ||
}); | ||
creator | ||
}) | ||
.from_bootstrap_to(ProtocolVersion::Cuttlefish) | ||
}) | ||
.build(); | ||
let database = ledger.substate_db(); | ||
|
||
// Act | ||
let config = database | ||
.get_existing_substate::<FieldSubstate<VersionedConsensusManagerConfiguration>>( | ||
CONSENSUS_MANAGER, | ||
MAIN_BASE_PARTITION, | ||
ConsensusManagerField::Configuration, | ||
) | ||
.into_payload() | ||
.fully_update_and_into_latest_version(); | ||
|
||
// Assert | ||
assert_eq!(config.config.epoch_change_condition.min_round_count, 100); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
// We used to use automod, but it breaks various tools | ||
// such as cargo fmt, so let's just list them explicitly. | ||
mod always_visible_global_nodes; | ||
mod consensus_manager; | ||
mod cuttlefish_transaction_changes; | ||
mod protocol_updates; | ||
mod transaction; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.