Skip to content

Commit

Permalink
Merge bitcoin#30494: fuzz: reduce keypool size in scriptpubkeyman t…
Browse files Browse the repository at this point in the history
…arget

dcb4ec9 fuzz: reduce keypool size in scriptpubkeyman target (brunoerg)

Pull request description:

  Fixes bitcoin#30476

  This PR reduces keypool size in scriptpubkeyman fuzz target to avoid spend a lot of time in `TopUp` (which is obviously called by many spkm functions).

  For reference:

  This PR:
  ```
  INFO: Running with entropic power schedule (0xFF, 100).
  INFO: Seed: 1845055748
  INFO: Loaded 1 modules   (1225616 inline 8-bit counters): 1225616 [0x106346fe0, 0x106472370),
  INFO: Loaded 1 PC tables (1225616 PCs): 1225616 [0x106472370,0x107725c70),
  ./src/test/fuzz/fuzz: Running 1 inputs 10 time(s) each.
  Running: ./qa-assets/fuzz_seed_corpus/scriptpubkeyman/c9b8928cecb1edc192fb2d5816b4b7878cdfcf50
  Executed ./qa-assets/fuzz_seed_corpus/scriptpubkeyman/c9b8928cecb1edc192fb2d5816b4b7878cdfcf50 in 250 ms
  ```

  Master:
  ```
  INFO: Running with entropic power schedule (0xFF, 100).
  INFO: Seed: 2004906948
  INFO: Loaded 1 modules   (1225603 inline 8-bit counters): 1225603 [0x104196f80, 0x1042c2303),
  INFO: Loaded 1 PC tables (1225603 PCs): 1225603 [0x1042c2308,0x105575b38),
  ./src/test/fuzz/fuzz: Running 1 inputs 10 time(s) each.
  Running: ./qa-assets/fuzz_seed_corpus/scriptpubkeyman/c9b8928cecb1edc192fb2d5816b4b7878cdfcf50
  Executed ./qa-assets/fuzz_seed_corpus/scriptpubkeyman/c9b8928cecb1edc192fb2d5816b4b7878cdfcf50 in 21016 ms
  ```

ACKs for top commit:
  maflcko:
    review ACK dcb4ec9
  dergoegge:
    utACK dcb4ec9

Tree-SHA512: d818b228d5f1dd0d5c665d8e54cf5dd8e378604039eaac114fc34366ece4420b9b2519d898f2dc2410960b873f0b91bbad4a534a35658477aed6ef48f3458137
  • Loading branch information
fanquake committed Jul 22, 2024
2 parents b927a39 + dcb4ec9 commit 8754d05
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/wallet/test/fuzz/scriptpubkeyman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ FUZZ_TARGET(scriptpubkeyman, .init = initialize_spkm)
LOCK(wallet.cs_wallet);
wallet.SetWalletFlag(WALLET_FLAG_DESCRIPTORS);
wallet.SetLastBlockProcessed(chainstate.m_chain.Height(), chainstate.m_chain.Tip()->GetBlockHash());
wallet.m_keypool_size = 10;
}

auto wallet_desc{CreateWalletDescriptor(fuzzed_data_provider)};
Expand Down

0 comments on commit 8754d05

Please sign in to comment.