Can Trie Extensions consume only one nibble?

The yellow paper includes (in Appendix D) two statements that are hard to reconcile: An extension "corresponds to a series of nibbles of size greater than one", but "no branch nodes may exist that contain only a single non-zero entry".

It's easy to come up with circumstances in which a tree will need to branch after accounting for a single unterminated nibble. Without restrictions, either a Branch or Extension could do the job, but it would be a one-nibble Extension or a single-nonzero-entry Branch, both of which are apparently forbidden.

Empirically, playing around with pyethereum, building a Trie with (key, values): ( [2,2], "twotwo" ), ( [2,3], "twothree" ) yields a root that is an extension which corresponds to the single nibble 2.

['\x12', '\xb7\x86\xd0x\x81\xdb\xba\x1c\x89\xf3\xabQ.R\x91\xdfS\x9b&Do\xd6\x10>\xb7\xc4\xe0,\xfb\x7fq-']

(The key printed is HP encoded, So '\x12' is just the nibble 2 encoded.)

Should the yellow paper be amended to permit single-nibble-eating Extensions?
Sign In or Register to comment.