stacks-network / stacks-core

The Stacks blockchain implementation
https://docs.stacks.co
GNU General Public License v3.0
3.01k stars 671 forks source link

fix: limit number of UTXOs retrieved with `listunspent` #5201

Closed obycode closed 2 months ago

obycode commented 2 months ago

This prevents the response from being too large and exceeding the 16MB limit that we support.

obycode commented 2 months ago

I was going to make this configurable so we could test it in an integration test

Ah okay. Yeah, I can do that.

obycode commented 2 months ago

@jcnelson the config option and test have been added.

jcnelson commented 2 months ago

Ah, then it's fine where it is in burnchain

On Tue, Sep 17, 2024, 5:21 PM Brice Dobry @.***> wrote:

@.**** commented on this pull request.

In testnet/stacks-node/src/config.rs https://github.com/stacks-network/stacks-core/pull/5201#discussion_r1764031021 :

@@ -1446,6 +1446,10 @@ pub struct BurnchainConfig { /// fault injection to simulate a slow burnchain peer. /// Delay burnchain block downloads by the given number of millseconds pub fault_injection_burnchain_block_delay: u64,

  • /// The maximum number of unspent UTXOs to request from the bitcoin node.
  • /// This value is passed as the maximumCount query option to the
  • /// listunspent RPC call.
  • pub max_unspent_utxos: Option,

All of the other miner-specific burnchain options are also in BurnchainConfig, e.g. rbf_fee_increment, max_rbf, etc.

— Reply to this email directly, view it on GitHub https://github.com/stacks-network/stacks-core/pull/5201#discussion_r1764031021, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADQJK6V6IWBPPWIUH5SM2DZXCMNRAVCNFSM6AAAAABOL2BZBCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGMJRGA4TGMBZGY . You are receiving this because you were mentioned.Message ID: @.***>

blockstack-devops commented 3 weeks ago

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.