Skip to content

Conversation

@jgarzik
Copy link
Contributor

@jgarzik jgarzik commented Nov 18, 2014

Continues Johnathan Corgan's work. Supercedes #4594

Continues Johnathan Corgan's work.
@hoffmabc
Copy link

This is great work and I'm very excited to see this being contributed.

@sipa
Copy link
Member

sipa commented Nov 18, 2014

@jgarzik what is the intended meaning of a block being relayed here?

Just triggering on AcceptBlock isn't particularly interesting - it just means that it passes preliminary checks and is accepted into the block tree. I think the most interesting meaning is "is accepted as new tip of the chain", which already has a NotifyBlockTip signal.

@theuni
Copy link
Member

theuni commented Nov 18, 2014

@jgarzik note that the code wasn't actually compiled/tested by travis here because libzmq doesn't exist. In fact, the error handling in configure is broken. Libs like this usually default to "auto" or so, so that an explicit --enable-zmq would cause an error if the lib wasn't found.

I commented in #5303 about adding the dependency, please have a look there. Also, please consider fixing up configure and adding an explicit "--enable-zmq" to the travis tests as necessary.

Copy link

Choose a reason for hiding this comment

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

Is there a default you could list here?

@jtimon
Copy link
Contributor

jtimon commented Nov 19, 2014

As in #4594, idea ACK

Copy link
Member

Choose a reason for hiding this comment

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

This should use $enableval, or it will disable it with --enable-zmq

Minor nit: prefer --disable-zeromq as the name.

@laanwj laanwj added the Feature label Dec 10, 2014
@hyperwang
Copy link

Johnathan Corgan has given a guidiance about how to configure in PR#4594 like this
$ bitcoind -zmqpub=tcp://127.0.0.1/28332
I'm afraid that it should be like this
$ bitcoind -zmqpub=tcp://127.0.0.1:28332

@luke-jr
Copy link
Member

luke-jr commented Dec 24, 2014

This should probably setup depends/ so binaries get ZeroMQ support...

@theuni
Copy link
Member

theuni commented Dec 24, 2014

@luke-jr See my comment above. I have an old branch where it's hooked up: https://github.com/theuni/bitcoin/commits/zmq-test . That'll need a bit of adapting since depends have changed somewhat, but should come pretty close.

@jmcorgan
Copy link
Contributor

jmcorgan commented Jan 8, 2015

Just a quick note of thanks to Jeff Garzik for picking this up. I've been away from bitcoin development for a while but hope to return at some point.

@jonasschnelli
Copy link
Contributor

Would def. nice to have this in 0.11.
Needs rebase.
@jgarzik i'm willing to continue this, depends if you have more uncommited/unpushed work.

Copy link

Choose a reason for hiding this comment

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

I think ZMQ_SNDHWM should be set here to configurable value (at least through configure.ac) this provides the option to the user on when to start dropping messages. the default value of zero means a queue as large as the available memory which is dangerous because networks could be slow or the production of messages is faster than the network I/O output -- a precursor to a memory overflow crash.

ZMQ_LINGER is another important socket property to set here, the default value of -1 (infinite linger period on socket shutdown when there are queued messages to be sent) will prevent the application from shutting down gracefully. A configurable value (or a reasonable one) should be set to prevent this scenario. The linger period starts after a call to zmq_close on a socket or zmq_ctx_term on a context, once it expires all queued messages will be dropped.

@jtimon
Copy link
Contributor

jtimon commented Apr 8, 2015

Yes, it would be nice to have this in 0.11.

@btcdrak
Copy link
Contributor

btcdrak commented May 14, 2015

#6103 says it has superceded this PR, of so, this PR should be closed.

@laanwj
Copy link
Member

laanwj commented May 15, 2015

Closing in favor of #6103

@laanwj laanwj closed this May 15, 2015
@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.