public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Wladimir <laanwj@gmail•com>
To: sirk390@gmail•com
Cc: bitcoin-development@lists•sourceforge.net
Subject: Re: [Bitcoin-development] Adding request/reply id in messages
Date: Fri, 13 Apr 2012 08:30:49 +0200	[thread overview]
Message-ID: <CA+s+GJD4PFh1Xh+goVi3iqmYYQ+2e-L8D6_Q5_JD5gUDn0PaRQ@mail.gmail.com> (raw)
In-Reply-To: <CA+XhJbp8+ngso0esDAA415eoBVEZ3NGvuVY7G-hUU72K5wFstw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]

>
>
> I don't understand why you say my proposal would make the protocol more
> stateful. I think it doesn't.
> Each reply is only  the result of the current request only, and there is
> no new session information.
>

I also wondered this. My first thought was that it's basically the same as
the PING message, a nonce that is repeated immediately on reply. This makes
it easier to multiplex operations over a single channel. I'm not against
this basic idea, and it is easy to ignore for clients that don't want to
use it.

I think the state comes in here:

      - inv sends back the requestid given in getblocks or a special value
in case of a notification.
      - addr sends back the requestid given in getaddr or a special value
in case of a notification.

"*command1* sends back the requestid given in *command2*".

This requires keeping state on the connection between command1 and
command2. Arguably, this state already exists in the current protocol, but
I'd rather see it reduced than extended.

Also... Many of the described commands don't need this as they already have
a natural "nonce". For example, the id of the requested block header. If
this is passed in the reply, and the caller can correlate the request and
reply without a special nonce administration.

Wladimir

[-- Attachment #2: Type: text/html, Size: 1897 bytes --]

      reply	other threads:[~2012-04-13  6:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-11 18:39 Christian Bodt
2012-04-12 15:41 ` Gavin Andresen
2012-04-12 16:01   ` Pieter Wuille
2012-04-12 16:33     ` Amir Taaki
     [not found]     ` <CA+XhJbq01knW4XizF3DjaaXnzChvixsxwgFMzWiPPehYuvVk1w@mail.gmail.com>
2012-04-12 16:54       ` Christian Bodt
2012-04-12 17:12 ` Jeff Garzik
2012-04-12 17:24   ` Amir Taaki
2012-04-12 18:04     ` Peter Vessenes
2012-04-12 20:53     ` Christian Bodt
2012-04-13  6:30       ` Wladimir [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+s+GJD4PFh1Xh+goVi3iqmYYQ+2e-L8D6_Q5_JD5gUDn0PaRQ@mail.gmail.com \
    --to=laanwj@gmail$(echo .)com \
    --cc=bitcoin-development@lists$(echo .)sourceforge.net \
    --cc=sirk390@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox