Fork of plugeth with any needed changes for statediff plugin
Go to file
subtly 7473c93668 UDP Interop. Limit datagrams to 1280bytes.
We don't have a UDP which specifies any messages that will be 4KB. Aside from being implemented for months and a necessity for encryption and piggy-backing packets, 1280bytes is ideal, and, means this TODO can be completed!

Why 1280 bytes?
* It's less than the default MTU for most WAN/LAN networks. That means fewer fragmented datagrams (esp on well-connected networks).
* Fragmented datagrams and dropped packets suck and add latency while OS waits for a dropped fragment to never arrive (blocking readLoop())
* Most of our packets are < 1280 bytes.
* 1280 bytes is minimum datagram size and MTU for IPv6 -- on IPv6, a datagram < 1280bytes will *never* be fragmented.

UDP datagrams are dropped. A lot! And fragmented datagrams are worse. If a datagram has a 30% chance of being dropped, then a fragmented datagram has a 60% chance of being dropped. More importantly, we have signed packets and can't do anything with a packet unless we receive the entire datagram because the signature can't be verified. The same is true when we have encrypted packets.

So the solution here to picking an ideal buffer size for receiving datagrams is a number under 1400bytes. And the lower-bound value for IPv6 of 1280 bytes make's it a non-decision. On IPv4 most ISPs and 3g/4g/let networks have an MTU just over 1400 -- and *never* over 1500. Never -- that means packets over 1500 (in reality: ~1450) bytes are fragmented. And probably dropped a lot.

Just to prove the point, here are pings sending non-fragmented packets over wifi/ISP, and a second set of pings via cell-phone tethering. It's important to note that, if *any* router between my system and the EC2 node has a lower MTU, the message would not go through:

On wifi w/normal ISP:
localhost:Debug $ ping -D -s 1450 52.6.250.242
PING 52.6.250.242 (52.6.250.242): 1450 data bytes
1458 bytes from 52.6.250.242: icmp_seq=0 ttl=42 time=104.831 ms
1458 bytes from 52.6.250.242: icmp_seq=1 ttl=42 time=119.004 ms
^C
--- 52.6.250.242 ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 104.831/111.918/119.004/7.087 ms
localhost:Debug $ ping -D -s 1480 52.6.250.242
PING 52.6.250.242 (52.6.250.242): 1480 data bytes
ping: sendto: Message too long
ping: sendto: Message too long
Request timeout for icmp_seq 0
ping: sendto: Message too long
Request timeout for icmp_seq 1


Tethering to O2:
localhost:Debug $ ping -D -s 1480 52.6.250.242
PING 52.6.250.242 (52.6.250.242): 1480 data bytes
ping: sendto: Message too long
ping: sendto: Message too long
Request timeout for icmp_seq 0
^C
--- 52.6.250.242 ping statistics ---
2 packets transmitted, 0 packets received, 100.0% packet loss
localhost:Debug $ ping -D -s 1450 52.6.250.242
PING 52.6.250.242 (52.6.250.242): 1450 data bytes
1458 bytes from 52.6.250.242: icmp_seq=0 ttl=42 time=107.844 ms
1458 bytes from 52.6.250.242: icmp_seq=1 ttl=42 time=105.127 ms
1458 bytes from 52.6.250.242: icmp_seq=2 ttl=42 time=120.483 ms
1458 bytes from 52.6.250.242: icmp_seq=3 ttl=42 time=102.136 ms
2015-05-13 19:03:00 +02:00
_data Chain tests 2014-12-30 15:42:26 +01:00
accounts Use common.Address type for accounts.Address 2015-05-12 17:19:39 +02:00
build Use Makefile for Travis tests 2015-04-29 02:13:37 +02:00
cmd Fix hex conversion in --unlock and log when successful 2015-05-13 01:11:17 +02:00
common Change default keystore dir 2015-05-12 18:33:04 +02:00
compression/rle update imports order per goimports 2014-11-15 20:21:55 -06:00
core removed redundant newlines in import block 2015-05-12 15:20:53 +02:00
crypto Change default keystore dir 2015-05-12 18:33:04 +02:00
docker Revert "Revert "refactor Dockerfile"" 2015-04-22 21:35:46 +02:00
errs blockpool stability fixes: 2015-04-13 13:13:55 +01:00
eth eth/downloader: fix nil panic caused by wrong variable use 2015-05-13 17:25:01 +03:00
ethdb removed redundant newlines in import block 2015-05-12 15:20:53 +02:00
event xeth, core, event/filter, rpc: new block and transaction filters 2015-05-07 14:44:32 +02:00
generators replaced several path.* with filepath.* which is platform independent 2015-05-12 14:24:11 +02:00
Godeps Merge pull request #863 from karalabe/ordered-block-download 2015-05-08 08:19:53 -07:00
jsre Merge branch 'develop' of github.com:ethereum/go-ethereum into develop 2015-05-08 17:55:53 +02:00
logger miner: moved bad uncle logging to ridiculous log level. Closes #720 2015-04-15 12:12:20 +02:00
miner Update key store to new spec but keep address field for now 2015-05-12 17:22:17 +02:00
p2p UDP Interop. Limit datagrams to 1280bytes. 2015-05-13 19:03:00 +02:00
params Read most protocol params from common/params.json 2015-04-02 06:22:32 +02:00
pow Integrate new ethash API and change geth makedag cmd 2015-05-05 08:24:15 +02:00
rlp rlp: fix list bounds check overflow (found by go-fuzz) 2015-04-28 10:28:15 +02:00
rpc fix hex conversion bug in RPC for byte slices 2015-05-12 17:22:17 +02:00
tests Change default keystore dir 2015-05-12 18:33:04 +02:00
trie Secure trie shakey / key matching 2015-03-24 15:14:03 +01:00
ui ui/qt/qwhisper, whisper, xeth: polish topic filter, fix wildcards 2015-04-28 10:49:04 +03:00
whisper p2p, whisper: use glog for peer-level logging 2015-05-06 23:19:14 +02:00
xeth Update key store to new spec but keep address field for now 2015-05-12 17:22:17 +02:00
.gitignore updated ignore 2015-05-07 00:03:11 +02:00
.gitmodules cmd/geth, jsre: updated ethereum.js => web3.js 2015-04-24 11:37:58 +02:00
.mailmap General repo cleanup 2015-03-30 09:18:22 +02:00
.travis.yml Use Makefile for Travis tests 2015-04-29 02:13:37 +02:00
LICENSE MIT -> LGPL 2014-08-21 15:43:14 +02:00
Makefile Use Makefile for Travis tests 2015-04-29 02:13:37 +02:00
README.md README: simplify build instructions 2015-04-29 02:13:35 +02:00
update-license.go fixed identing 2015-05-12 15:23:19 +02:00

Ethereum Go

Ethereum Go Client © 2014 Jeffrey Wilcke.

      | Linux   | OSX | Windows | Tests

----------|---------|-----|---------|------ develop | Build+Status | Build+Status | Build+Status | Buildr+Status Coverage Status master | Build+Status | Build+Status | Build+Status | Buildr+Status Coverage Status

Bugs Stories in Ready ![Stories in Progress](https://badge.waffle.io/ethereum/go-ethereum.svg?label=in%20progress&title=In Progress) Gitter

Automated (dev) builds

Building the source

For prerequisites and detailed build instructions please read the Installation Instructions on the wiki.

Building geth requires two external dependencies, Go and GMP. You can install them using your favourite package manager. Once the dependencies are installed, run

make geth

Executables

Go Ethereum comes with several wrappers/executables found in the cmd directory:

  • mist Official Ethereum Browser (ethereum GUI client)
  • geth Ethereum CLI (ethereum command line interface client)
  • bootnode runs a bootstrap node for the Discovery Protocol
  • ethtest test tool which runs with the tests suite: cat file | ethtest.
  • evm is a generic Ethereum Virtual Machine: evm -code 60ff60ff -gas 10000 -price 0 -dump. See -h for a detailed description.
  • disasm disassembles EVM code: echo "6001" | disasm
  • rlpdump prints RLP structures

Command line options

Both mist and geth can be configured via command line options, environment variables and config files.

To get the options available:

geth --help

For further details on options, see the wiki

Contribution

If you'd like to contribute to go-ethereum please fork, fix, commit and send a pull request. Commits who do not comply with the coding standards are ignored (use gofmt!). If you send pull requests make absolute sure that you commit on the develop branch and that you do not merge to master. Commits that are directly based on master are simply ignored.

See Developers' Guide for more details on configuring your environment, testing, and dependency management.