Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add some logs and stuff
  • Loading branch information
kianenigma committed May 19, 2022
commit 152d6b3f5c3f282e8258a5bcc4b7d2f7cf87917c
4 changes: 2 additions & 2 deletions client/allocator/src/freeing_bump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ impl Link {
/// | 0 | next element link |
/// +--------------+-------------------+
/// ```
///
///
/// ## Occupied header
/// ```ignore
/// 64 32 0
Expand Down Expand Up @@ -414,7 +414,7 @@ impl FreeingBumpHeapAllocator {
Header::Occupied(order).write_into(mem, header_ptr)?;
self.total_size += order.size() + HEADER_SIZE;

if order.size() + HEADER_SIZE > 8 * 1024 * 1024 {
if order.size() + HEADER_SIZE > 2 * 1024 * 1024 {
log::warn!(
target: LOG_TARGET,
"large allocation of {} detected, after allocation, total_size = {}, bumper = {}.",
Expand Down
3 changes: 3 additions & 0 deletions frame/election-provider-multi-phase/src/unsigned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ impl<T: Config> Pallet<T> {
let RoundSnapshot { voters, targets } =
Self::read_snapshot_with_preallocate().map_err(|_| MinerError::SnapshotUnAvailable)?;
let desired_targets = Self::desired_targets().ok_or(MinerError::SnapshotUnAvailable)?;
log!(debug, "read-snapshot");
let (solution, score, size) = Miner::<T::MinerConfig>::mine_solution_with_snapshot::<
T::Solver,
>(voters, targets, desired_targets)?;
Expand Down Expand Up @@ -405,6 +406,7 @@ impl<T: MinerConfig> Miner<T> {
where
S: NposSolver<AccountId = T::AccountId>,
{
log_no_system!(debug, "solving..");
S::solve(desired_targets as usize, targets.clone(), voters.clone())
.map_err(|e| {
log_no_system!(error, "solver error: {:?}", e);
Expand All @@ -430,6 +432,7 @@ impl<T: MinerConfig> Miner<T> {
targets: Vec<T::AccountId>,
desired_targets: u32,
) -> Result<(SolutionOf<T>, ElectionScore, SolutionOrSnapshotSize), MinerError> {
log_no_system!(debug, "preparing..");
// now make some helper closures.
let cache = helpers::generate_voter_cache::<T>(&voters);
let voter_index = helpers::voter_index_fn::<T>(&cache);
Expand Down
5 changes: 5 additions & 0 deletions utils/frame/try-runtime/cli/src/commands/execute_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ where
.overwrite_online_at(parent_hash.to_owned());

let builder = if command.overwrite_wasm_code {
log::info!(
target: LOG_TARGET,
"replacing the in-storage :code: with the local code from {}'s chain_spec (your local repo)",
config.chain_spec.name(),
);
let (code_key, code) = extract_code(&config.chain_spec)?;
builder.inject_hashed_key_value(&[(code_key, code)])
} else {
Expand Down