Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'mempool' P2P command, and extend 'getdata' behavior #1641

Merged
merged 1 commit into from
Aug 20, 2012

Conversation

jgarzik
Copy link
Contributor

@jgarzik jgarzik commented Jul 31, 2012

Add 'mempool' P2P command, and extend 'getdata' behavior to permit downloading of mempool transactions from the remote peer.

to permit downloading of mempool transactions from the remote peer.
@jgarzik
Copy link
Contributor Author

jgarzik commented Aug 1, 2012

@gmaxwell was asking about testing. This was tested successfully with a one-line pynode patch (pynode HEAD deb07f51435cd0d18596bddfee28e337a5a6454e). pynode issues 'mempool' at startup, and fills its own mempool with the returned results.

--- a/node.py
+++ b/node.py
@@ -238,6 +238,7 @@ class NodeConn(asyncore.dispatcher):
                        self.send_message(msg_verack(self.ver_send))
                        if self.ver_send >= CADDR_TIME_VERSION:
                                self.send_message(msg_getaddr(self.ver_send))
+                       self.send_message(msg_mempool())
                        self.send_getblocks()

@jgarzik
Copy link
Contributor Author

jgarzik commented Aug 2, 2012

Random thought: miners may want this, to "prime the pump" after restarting their bitcoind. There is the incentive to capture every fee-paying transactions, after all.

@BitcoinPullTester
Copy link

Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/05a85b2b38d516a8701f684fcd2ab99f3e5b462d for binaries and test log.

@sipa
Copy link
Member

sipa commented Aug 13, 2012

ACK on the changes, but maybe there must at least be some discussion about adding this, and the protocol version change involved. An alternative would be using a service bit (I don't personally think that is preferable), but people may have other opinions.

I would expect the startup sequence to also send a mempool command to another node, in case it reports protocol version 60002 or higher?

@BitcoinPullTester
Copy link

Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/05f891636199c36e1639fb95f5e92445eea9e97f for binaries and test log.

@jgarzik
Copy link
Contributor Author

jgarzik commented Aug 17, 2012

Specification: https://en.bitcoin.it/wiki/BIP_0035

@sipa
Copy link
Member

sipa commented Aug 20, 2012

ACK

1 similar comment
@gavinandresen
Copy link
Contributor

ACK

jgarzik pushed a commit that referenced this pull request Aug 20, 2012
Add 'mempool' P2P command, and extend 'getdata' behavior
@jgarzik jgarzik merged commit b3a570d into bitcoin:master Aug 20, 2012
suprnurd pushed a commit to chaincoin-legacy/chaincoin that referenced this pull request Dec 5, 2017
suprnurd pushed a commit to chaincoin-legacy/chaincoin that referenced this pull request Dec 5, 2017
This reverts commit d3829e5.

Reverting and postponing the fix till later. Probably should write a DIP and explore different options first.
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1989

@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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants