-
Notifications
You must be signed in to change notification settings - Fork 17
/
Ethereum-Wire-Protocol-0.1.EBNF
37 lines (29 loc) · 1.42 KB
/
Ethereum-Wire-Protocol-0.1.EBNF
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
request = request-line, lf, headers, body ;
response = response-line, lf, headers, [ body ] ;
request-line = magic , sp , version , sp , command , sp , compression-preference , sp , compression-preferences , sp , headers-len , sp , body-len , [ sp , head-only-indicator ];
response-line = response-status , sp , compression-preference , sp , headers-len , sp , body-len;
response-status = digit , { digit } ;
magic = 'EWP' ;
version = '0.1' ;
headers-len = digit , { digit } ;
body-len = digit , { digit } ;
command = command-character , { command-character } ;
command-character = uppercase-letter | digit | "_" ;
compression-preferences = compression-preference , { ",", compression-preference } ;
compression-preference = compression-preference-character , { compression-preference-character } ;
compression-preference-character = lowercase-letter | digit | "_" ;
uppercase-letter = "A" | "B" | "C" | "D" | "E" | "F" | "G"
| "H" | "I" | "J" | "K" | "L" | "M" | "N"
| "O" | "P" | "Q" | "R" | "S" | "T" | "U"
| "V" | "W" | "X" | "Y" | "Z" ;
lowercase-letter = "a" | "b"
| "c" | "d" | "e" | "f" | "g" | "h" | "i"
| "j" | "k" | "l" | "m" | "n" | "o" | "p"
| "q" | "r" | "s" | "t" | "u" | "v" | "w"
| "x" | "y" | "z" ;
digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
sp = " " ;
head-only-indicator = "H" ;
lf = "\n" ;
headers = ? BSON ? ;
body = ? COMMAND-DEFINED ENTITY ? ;