Skip to content

Conversation

@jnewbery
Copy link
Contributor

@jnewbery jnewbery commented Apr 2, 2018

The new P2PDataStore class was sending full blocks in headers messages,
which meant that calls to send_blocks_and_test() would blow up memory if
called with a large number of blocks. Fix that by only sending headers
in headers messages.

This means that python should use just over 1GB for feature_block.py (with bitcoind also using just over 1GB). That's the same as before the feature_block.py refactor.

The new P2PDataStore class was sending full blocks in headers messages,
which meant that calls to send_blocks_and_test() would blow up memory if
called with a large number of blocks. Fix that by only sending headers
in headers messages.
@jnewbery
Copy link
Contributor Author

jnewbery commented Apr 2, 2018

Addresses #11771 (review) and fixes #11773 (comment)

@maflcko
Copy link
Member

maflcko commented Apr 2, 2018

Tested ACK 89fe5fe

@meshcollider
Copy link
Contributor

utACK 89fe5fe

1 similar comment
@jamesob
Copy link
Contributor

jamesob commented Apr 2, 2018

utACK 89fe5fe

@maflcko maflcko merged commit 89fe5fe into bitcoin:master Apr 2, 2018
maflcko pushed a commit that referenced this pull request Apr 2, 2018
89fe5fe [tests] Stop feature_block.py from blowing up memory. (John Newbery)

Pull request description:

  The new P2PDataStore class was sending full blocks in headers messages,
  which meant that calls to send_blocks_and_test() would blow up memory if
  called with a large number of blocks. Fix that by only sending headers
  in headers messages.

  This means that python should use just over 1GB for feature_block.py (with bitcoind also using just over 1GB). That's the same as before the feature_block.py refactor.

Tree-SHA512: 796ea35584748ceb7b8fa36c732a461fb924dafe0b4c52d3eccf21a00fbdb65aef41ce1d91f027aad50cde6df5d30e985aaef474cb743975c06762975469cbbb
@jnewbery jnewbery deleted the feature_block_memory branch April 2, 2018 21:44
@ajtowns
Copy link
Contributor

ajtowns commented Apr 2, 2018

Post-merge ACK 89fe5fe -- confirm that fixes the memory error I was seeing.

PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 27, 2020
…mory.

89fe5fe [tests] Stop feature_block.py from blowing up memory. (John Newbery)

Pull request description:

  The new P2PDataStore class was sending full blocks in headers messages,
  which meant that calls to send_blocks_and_test() would blow up memory if
  called with a large number of blocks. Fix that by only sending headers
  in headers messages.

  This means that python should use just over 1GB for feature_block.py (with bitcoind also using just over 1GB). That's the same as before the feature_block.py refactor.

Tree-SHA512: 796ea35584748ceb7b8fa36c732a461fb924dafe0b4c52d3eccf21a00fbdb65aef41ce1d91f027aad50cde6df5d30e985aaef474cb743975c06762975469cbbb
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants