public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Amir Taaki <zgenjix@yahoo•com>
To: "bitcoin-development@lists•sourceforge.net"
	<bitcoin-development@lists•sourceforge.net>
Subject: [Bitcoin-development] My thoughts on DoS code
Date: Sun, 2 Oct 2011 16:32:33 -0700 (PDT)	[thread overview]
Message-ID: <1317598353.90764.YahooMailNeo@web121015.mail.ne1.yahoo.com> (raw)

Hey,

The Zen of Python is relevant here: http://www.python.org/dev/peps/pep-0020/

"In the face of ambiguity, refuse the temptation to guess."

If a node incorrectly implements the standard then it should be shunned immediately. Not only is this more secure, but it will ensure long term compatibility between different implementations. Gavin argues that being a bit lenient makes it easier for people working on other implementations.

I'd argue the opposite being the only person that's working on a full node implementation. Lucky I know my way around the code, so I don't have to guess. But if I did not things would be much harder. Imagine you're trying to interact with this protocol and then randomly it will suddenly disconnect you because of accumulated errors that have been building up.

Everything should be strict, explicit, unambiguous and loud.

I propose a new message type: "error" Payload is a uint64_t error_code and var_str reason.

Before disconnecting a node you can send it an error message. The error_code is the main class of error- i.e version_sent_twice. Reason is just an implementation specific string that can add context.

Other possible fields:
uint8_t seriousness (debug, info, warning, error, fatal)
uint8_t action_taken (disconnect, blacklist, .etc)




                 reply	other threads:[~2011-10-02 23:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1317598353.90764.YahooMailNeo@web121015.mail.ne1.yahoo.com \
    --to=zgenjix@yahoo$(echo .)com \
    --cc=bitcoin-development@lists$(echo .)sourceforge.net \
    /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