From 92f9a3e5fa29e0f05c81b348b87cab4f7a94f0c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Tue, 1 Sep 2015 17:35:14 +0300 Subject: cmd, eth: support switching client modes of operation --- eth/protocol.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'eth/protocol.go') diff --git a/eth/protocol.go b/eth/protocol.go index 49f096a3b..0d2b5128d 100644 --- a/eth/protocol.go +++ b/eth/protocol.go @@ -26,6 +26,15 @@ import ( "github.com/ethereum/go-ethereum/rlp" ) +// Mode represents the mode of operation of the eth client. +type Mode int + +const ( + ArchiveMode Mode = iota // Maintain the entire blockchain history + FullMode // Maintain only a recent view of the blockchain + LightMode // Don't maintain any history, rather fetch on demand +) + // Constants to match up protocol versions and messages const ( eth61 = 61 @@ -34,6 +43,14 @@ const ( eth64 = 64 ) +// minimumProtocolVersion is the minimum version of the protocol eth must run to +// support the desired mode of operation. +var minimumProtocolVersion = map[Mode]uint{ + ArchiveMode: eth61, + FullMode: eth63, + LightMode: eth64, +} + // Supported versions of the eth protocol (first is primary). var ProtocolVersions = []uint{eth64, eth63, eth62, eth61} -- cgit v1.2.3 From 832b37c8221e330896c36eb419d92af6b1fdc9dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Wed, 30 Sep 2015 19:23:31 +0300 Subject: core, eth: receipt chain reconstruction --- eth/protocol.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'eth/protocol.go') diff --git a/eth/protocol.go b/eth/protocol.go index 0d2b5128d..f2b98a8b1 100644 --- a/eth/protocol.go +++ b/eth/protocol.go @@ -55,7 +55,7 @@ var minimumProtocolVersion = map[Mode]uint{ var ProtocolVersions = []uint{eth64, eth63, eth62, eth61} // Number of implemented message corresponding to different protocol versions. -var ProtocolLengths = []uint64{15, 12, 8, 9} +var ProtocolLengths = []uint64{19, 17, 8, 9} const ( NetworkId = 1 -- cgit v1.2.3 From aa0538db0b5de2bb2c609d629b65d083649f9171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Fri, 9 Oct 2015 18:36:31 +0300 Subject: eth: clean out light node notions from eth --- eth/protocol.go | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) (limited to 'eth/protocol.go') diff --git a/eth/protocol.go b/eth/protocol.go index f2b98a8b1..410347ed3 100644 --- a/eth/protocol.go +++ b/eth/protocol.go @@ -26,36 +26,18 @@ import ( "github.com/ethereum/go-ethereum/rlp" ) -// Mode represents the mode of operation of the eth client. -type Mode int - -const ( - ArchiveMode Mode = iota // Maintain the entire blockchain history - FullMode // Maintain only a recent view of the blockchain - LightMode // Don't maintain any history, rather fetch on demand -) - // Constants to match up protocol versions and messages const ( eth61 = 61 eth62 = 62 eth63 = 63 - eth64 = 64 ) -// minimumProtocolVersion is the minimum version of the protocol eth must run to -// support the desired mode of operation. -var minimumProtocolVersion = map[Mode]uint{ - ArchiveMode: eth61, - FullMode: eth63, - LightMode: eth64, -} - // Supported versions of the eth protocol (first is primary). -var ProtocolVersions = []uint{eth64, eth63, eth62, eth61} +var ProtocolVersions = []uint{eth63, eth62, eth61} // Number of implemented message corresponding to different protocol versions. -var ProtocolLengths = []uint64{19, 17, 8, 9} +var ProtocolLengths = []uint64{17, 8, 9} const ( NetworkId = 1 @@ -90,11 +72,6 @@ const ( NodeDataMsg = 0x0e GetReceiptsMsg = 0x0f ReceiptsMsg = 0x10 - - // Protocol messages belonging to eth/64 - GetAcctProofMsg = 0x11 - GetStorageDataProof = 0x12 - Proof = 0x13 ) type errCode int -- cgit v1.2.3