plugeth/swarm/pss/testdata/snapshot_16.json
Felix Lange 30cd5c1854
all: new p2p node representation (#17643)
Package p2p/enode provides a generalized representation of p2p nodes
which can contain arbitrary information in key/value pairs. It is also
the new home for the node database. The "v4" identity scheme is also
moved here from p2p/enr to remove the dependency on Ethereum crypto from
that package.

Record signature handling is changed significantly. The identity scheme
registry is removed and acceptable schemes must be passed to any method
that needs identity. This means records must now be validated explicitly
after decoding.

The enode API is designed to make signature handling easy and safe: most
APIs around the codebase work with enode.Node, which is a wrapper around
a valid record. Going from enr.Record to enode.Node requires a valid
signature.

* p2p/discover: port to p2p/enode

This ports the discovery code to the new node representation in
p2p/enode. The wire protocol is unchanged, this can be considered a
refactoring change. The Kademlia table can now deal with nodes using an
arbitrary identity scheme. This requires a few incompatible API changes:

  - Table.Lookup is not available anymore. It used to take a public key
    as argument because v4 protocol requires one. Its replacement is
    LookupRandom.
  - Table.Resolve takes *enode.Node instead of NodeID. This is also for
    v4 protocol compatibility because nodes cannot be looked up by ID
    alone.
  - Types Node and NodeID are gone. Further commits in the series will be
    fixes all over the the codebase to deal with those removals.

* p2p: port to p2p/enode and discovery changes

This adapts package p2p to the changes in p2p/discover. All uses of
discover.Node and discover.NodeID are replaced by their equivalents from
p2p/enode.

New API is added to retrieve the enode.Node instance of a peer. The
behavior of Server.Self with discovery disabled is improved. It now
tries much harder to report a working IP address, falling back to
127.0.0.1 if no suitable address can be determined through other means.
These changes were needed for tests of other packages later in the
series.

* p2p/simulations, p2p/testing: port to p2p/enode

No surprises here, mostly replacements of discover.Node, discover.NodeID
with their new equivalents. The 'interesting' API changes are:

 - testing.ProtocolSession tracks complete nodes, not just their IDs.
 - adapters.NodeConfig has a new method to create a complete node.

These changes were needed to make swarm tests work.

Note that the NodeID change makes the code incompatible with old
simulation snapshots.

* whisper/whisperv5, whisper/whisperv6: port to p2p/enode

This port was easy because whisper uses []byte for node IDs and
URL strings in the API.

* eth: port to p2p/enode

Again, easy to port because eth uses strings for node IDs and doesn't
care about node information in any way.

* les: port to p2p/enode

Apart from replacing discover.NodeID with enode.ID, most changes are in
the server pool code. It now deals with complete nodes instead
of (Pubkey, IP, Port) triples. The database format is unchanged for now,
but we should probably change it to use the node database later.

* node: port to p2p/enode

This change simply replaces discover.Node and discover.NodeID with their
new equivalents.

* swarm/network: port to p2p/enode

Swarm has its own node address representation, BzzAddr, containing both
an overlay address (the hash of a secp256k1 public key) and an underlay
address (enode:// URL).

There are no changes to the BzzAddr format in this commit, but certain
operations such as creating a BzzAddr from a node ID are now impossible
because node IDs aren't public keys anymore.

Most swarm-related changes in the series remove uses of
NewAddrFromNodeID, replacing it with NewAddr which takes a complete node
as argument. ToOverlayAddr is removed because we can just use the node
ID directly.
2018-09-25 00:59:00 +02:00

1 line
12 KiB
JSON

{"nodes":[{"node":{"config":{"id":"88621610b5fdbf3e584724e2268a24dc41562da5cdba92357b97edc42d79ec4e","private_key":"2c268d9cf0ca43f4b0ad80f8980f4fe019e0294819f881d505e02382b472b98b","name":"node01","services":["pss","bzz"],"enable_msg_events":false,"port":0},"up":true}},{"node":{"config":{"id":"d9b0b57a237a8386cf6cf611779d8df3f5b0f9c01719e97230c3b23bf0ab04ae","private_key":"69ac59cce230e49f10c769fc8f2b717bdadc5ffa5dcf7fae19d8cb15315fa177","name":"node02","services":["pss","bzz"],"enable_msg_events":false,"port":0},"up":true}},{"node":{"config":{"id":"c553ca20b4f7f1b1e3b71b261829c27eb1cfe6710aa0999f655a42670e6d8813","private_key":"b793f9ace49ecce16c0c86b49495093f7f4c5fa0003675c9eb6efa802c8daafe","name":"node03","services":["pss","bzz"],"enable_msg_events":false,"port":0},"up":true}},{"node":{"config":{"id":"c651a0c924fc01e9d6cd30aba6864cd93631d5d4e21ceeda7db1922f105c5ca8","private_key":"9fecef44b474621ce2ddd57cf67df319bd0e13c27f0f6e9d060c34ef813675ea","name":"node04","services":["pss","bzz"],"enable_msg_events":false,"port":0},"up":true}},{"node":{"config":{"id":"4b6e068e84fecde2bb6a48698233f0c2ae5e66b15a8bad2e0b5d499c31d48b98","private_key":"c8f4336f88c90242744e9c04fba1a55027d9ad4295b7a2b0ad99e8dae12463d3","name":"node05","services":["pss","bzz"],"enable_msg_events":false,"port":0},"up":true}},{"node":{"config":{"id":"6629ec867229b28221a6118eb0e097861eb784b624578f55c3811cdf5026c1c7","private_key":"0ca52c3e4781fc413a13448abaae042dae52e2bab5772c52440bc4b2c6a5bda3","name":"node06","services":["pss","bzz"],"enable_msg_events":false,"port":0},"up":true}},{"node":{"config":{"id":"9cd2b6b17d2954c0a0d4a340707c71215a08c3c27b5b5b294e96ad20263ba600","private_key":"447c97a6c211160f0fb7990812c637bd346003a484cf05c3d92816007ab3745a","name":"node07","services":["pss","bzz"],"enable_msg_events":false,"port":0},"up":true}},{"node":{"config":{"id":"c0f23df25018045ddc4035268a9e7468f386ecad306b9ed9053cf66e2f1ab0a2","private_key":"8fa6ac35409a6df21ee32da8c36f61cd007a3515d23bb350351c263c241b851a","name":"node08","services":["pss","bzz"],"enable_msg_events":false,"port":0},"up":true}},{"node":{"config":{"id":"69d329853a0624dba12949e6be7db093143976d9a5d514b80d72a9bf7fbc568c","private_key":"e4143bd79f4a55f463b623afc397fe0166a144f45c41fd8b58f816e208212819","name":"node09","services":["pss","bzz"],"enable_msg_events":false,"port":0},"up":true}},{"node":{"config":{"id":"d33e4e6af5ba13ae448a16a4a8183ab1050fa3f983cdbf03dec5c21a5e9dd146","private_key":"6a2a32adb2b5cbc66adf29d5da1123b6e345e73ed42916e9535df3058801cb92","name":"node10","services":["pss","bzz"],"enable_msg_events":false,"port":0},"up":true}},{"node":{"config":{"id":"8c92cb1fcda5b67a4b928c200e2e5e324599c997202d9ea98f703239ee3fc3b1","private_key":"ae486490233b1b16e6a35461a3b90573f59362b9bbf0b8c46b65c715b0506bd7","name":"node11","services":["pss","bzz"],"enable_msg_events":false,"port":0},"up":true}},{"node":{"config":{"id":"5989492b2703336b42f59b2be1653a0bce76e801ef262121f627a476581af5e1","private_key":"cbf9da4b4f44f44c0bcf69bb2134e33ddfdda7742d7f5609db74bdf4fb683cfb","name":"node12","services":["pss","bzz"],"enable_msg_events":false,"port":0},"up":true}},{"node":{"config":{"id":"c7a2bf651f59149716235fa7bfb4cee835aa4bdd402ccab8c52959aa74dc6af4","private_key":"180ee0110d87d330dd416568e300cacfd4d52f8c08875ada1a6d5b4a11142b1d","name":"node13","services":["pss","bzz"],"enable_msg_events":false,"port":0},"up":true}},{"node":{"config":{"id":"6e8c4a5d6e54dda7c633ff469e8f935935250f4d0034c9058048dc643a4f811e","private_key":"d7a364b77d55a53453e94e10d235edf4ceb248653247bded6c1df31fc88ecbca","name":"node14","services":["pss","bzz"],"enable_msg_events":false,"port":0},"up":true}},{"node":{"config":{"id":"1ffdd4692bd4fd272ac6b5c2e039354869df92c0d4247abedcd8a8932b057574","private_key":"7eaec2f68f3b0e562a5438324aa30b9c22746af6e8139b05b21e89103f508c5a","name":"node15","services":["pss","bzz"],"enable_msg_events":false,"port":0},"up":true}},{"node":{"config":{"id":"55ce5ea5772c31de27b337f1e2cf767663c03a61b2f47b71921def1cfc3270ea","private_key":"b130fa04ab1f60d0713b9260156457f9139e819cb2f70bd87a2ea409f135f881","name":"node16","services":["pss","bzz"],"enable_msg_events":false,"port":0},"up":true}}],"conns":[{"one":"55ce5ea5772c31de27b337f1e2cf767663c03a61b2f47b71921def1cfc3270ea","other":"88621610b5fdbf3e584724e2268a24dc41562da5cdba92357b97edc42d79ec4e","up":true},{"one":"88621610b5fdbf3e584724e2268a24dc41562da5cdba92357b97edc42d79ec4e","other":"d9b0b57a237a8386cf6cf611779d8df3f5b0f9c01719e97230c3b23bf0ab04ae","up":true},{"one":"d9b0b57a237a8386cf6cf611779d8df3f5b0f9c01719e97230c3b23bf0ab04ae","other":"c553ca20b4f7f1b1e3b71b261829c27eb1cfe6710aa0999f655a42670e6d8813","up":true},{"one":"c553ca20b4f7f1b1e3b71b261829c27eb1cfe6710aa0999f655a42670e6d8813","other":"c651a0c924fc01e9d6cd30aba6864cd93631d5d4e21ceeda7db1922f105c5ca8","up":true},{"one":"c651a0c924fc01e9d6cd30aba6864cd93631d5d4e21ceeda7db1922f105c5ca8","other":"4b6e068e84fecde2bb6a48698233f0c2ae5e66b15a8bad2e0b5d499c31d48b98","up":true},{"one":"4b6e068e84fecde2bb6a48698233f0c2ae5e66b15a8bad2e0b5d499c31d48b98","other":"6629ec867229b28221a6118eb0e097861eb784b624578f55c3811cdf5026c1c7","up":true},{"one":"6629ec867229b28221a6118eb0e097861eb784b624578f55c3811cdf5026c1c7","other":"9cd2b6b17d2954c0a0d4a340707c71215a08c3c27b5b5b294e96ad20263ba600","up":true},{"one":"9cd2b6b17d2954c0a0d4a340707c71215a08c3c27b5b5b294e96ad20263ba600","other":"c0f23df25018045ddc4035268a9e7468f386ecad306b9ed9053cf66e2f1ab0a2","up":true},{"one":"c0f23df25018045ddc4035268a9e7468f386ecad306b9ed9053cf66e2f1ab0a2","other":"69d329853a0624dba12949e6be7db093143976d9a5d514b80d72a9bf7fbc568c","up":true},{"one":"69d329853a0624dba12949e6be7db093143976d9a5d514b80d72a9bf7fbc568c","other":"d33e4e6af5ba13ae448a16a4a8183ab1050fa3f983cdbf03dec5c21a5e9dd146","up":true},{"one":"d33e4e6af5ba13ae448a16a4a8183ab1050fa3f983cdbf03dec5c21a5e9dd146","other":"8c92cb1fcda5b67a4b928c200e2e5e324599c997202d9ea98f703239ee3fc3b1","up":true},{"one":"8c92cb1fcda5b67a4b928c200e2e5e324599c997202d9ea98f703239ee3fc3b1","other":"5989492b2703336b42f59b2be1653a0bce76e801ef262121f627a476581af5e1","up":true},{"one":"5989492b2703336b42f59b2be1653a0bce76e801ef262121f627a476581af5e1","other":"c7a2bf651f59149716235fa7bfb4cee835aa4bdd402ccab8c52959aa74dc6af4","up":true},{"one":"c7a2bf651f59149716235fa7bfb4cee835aa4bdd402ccab8c52959aa74dc6af4","other":"6e8c4a5d6e54dda7c633ff469e8f935935250f4d0034c9058048dc643a4f811e","up":true},{"one":"6e8c4a5d6e54dda7c633ff469e8f935935250f4d0034c9058048dc643a4f811e","other":"1ffdd4692bd4fd272ac6b5c2e039354869df92c0d4247abedcd8a8932b057574","up":true},{"one":"1ffdd4692bd4fd272ac6b5c2e039354869df92c0d4247abedcd8a8932b057574","other":"55ce5ea5772c31de27b337f1e2cf767663c03a61b2f47b71921def1cfc3270ea","up":true},{"one":"88621610b5fdbf3e584724e2268a24dc41562da5cdba92357b97edc42d79ec4e","other":"8c92cb1fcda5b67a4b928c200e2e5e324599c997202d9ea98f703239ee3fc3b1","up":true},{"one":"c651a0c924fc01e9d6cd30aba6864cd93631d5d4e21ceeda7db1922f105c5ca8","other":"d9b0b57a237a8386cf6cf611779d8df3f5b0f9c01719e97230c3b23bf0ab04ae","up":true},{"one":"4b6e068e84fecde2bb6a48698233f0c2ae5e66b15a8bad2e0b5d499c31d48b98","other":"6e8c4a5d6e54dda7c633ff469e8f935935250f4d0034c9058048dc643a4f811e","up":true},{"one":"9cd2b6b17d2954c0a0d4a340707c71215a08c3c27b5b5b294e96ad20263ba600","other":"8c92cb1fcda5b67a4b928c200e2e5e324599c997202d9ea98f703239ee3fc3b1","up":true},{"one":"6629ec867229b28221a6118eb0e097861eb784b624578f55c3811cdf5026c1c7","other":"6e8c4a5d6e54dda7c633ff469e8f935935250f4d0034c9058048dc643a4f811e","up":true},{"one":"6e8c4a5d6e54dda7c633ff469e8f935935250f4d0034c9058048dc643a4f811e","other":"5989492b2703336b42f59b2be1653a0bce76e801ef262121f627a476581af5e1","up":true},{"one":"69d329853a0624dba12949e6be7db093143976d9a5d514b80d72a9bf7fbc568c","other":"6e8c4a5d6e54dda7c633ff469e8f935935250f4d0034c9058048dc643a4f811e","up":true},{"one":"d33e4e6af5ba13ae448a16a4a8183ab1050fa3f983cdbf03dec5c21a5e9dd146","other":"6e8c4a5d6e54dda7c633ff469e8f935935250f4d0034c9058048dc643a4f811e","up":true},{"one":"c7a2bf651f59149716235fa7bfb4cee835aa4bdd402ccab8c52959aa74dc6af4","other":"d33e4e6af5ba13ae448a16a4a8183ab1050fa3f983cdbf03dec5c21a5e9dd146","up":true},{"one":"55ce5ea5772c31de27b337f1e2cf767663c03a61b2f47b71921def1cfc3270ea","other":"6e8c4a5d6e54dda7c633ff469e8f935935250f4d0034c9058048dc643a4f811e","up":true},{"one":"5989492b2703336b42f59b2be1653a0bce76e801ef262121f627a476581af5e1","other":"1ffdd4692bd4fd272ac6b5c2e039354869df92c0d4247abedcd8a8932b057574","up":true},{"one":"c0f23df25018045ddc4035268a9e7468f386ecad306b9ed9053cf66e2f1ab0a2","other":"d33e4e6af5ba13ae448a16a4a8183ab1050fa3f983cdbf03dec5c21a5e9dd146","up":true},{"one":"1ffdd4692bd4fd272ac6b5c2e039354869df92c0d4247abedcd8a8932b057574","other":"4b6e068e84fecde2bb6a48698233f0c2ae5e66b15a8bad2e0b5d499c31d48b98","up":true},{"one":"c553ca20b4f7f1b1e3b71b261829c27eb1cfe6710aa0999f655a42670e6d8813","other":"c7a2bf651f59149716235fa7bfb4cee835aa4bdd402ccab8c52959aa74dc6af4","up":true},{"one":"d9b0b57a237a8386cf6cf611779d8df3f5b0f9c01719e97230c3b23bf0ab04ae","other":"c7a2bf651f59149716235fa7bfb4cee835aa4bdd402ccab8c52959aa74dc6af4","up":true},{"one":"88621610b5fdbf3e584724e2268a24dc41562da5cdba92357b97edc42d79ec4e","other":"9cd2b6b17d2954c0a0d4a340707c71215a08c3c27b5b5b294e96ad20263ba600","up":true},{"one":"d9b0b57a237a8386cf6cf611779d8df3f5b0f9c01719e97230c3b23bf0ab04ae","other":"c0f23df25018045ddc4035268a9e7468f386ecad306b9ed9053cf66e2f1ab0a2","up":true},{"one":"c553ca20b4f7f1b1e3b71b261829c27eb1cfe6710aa0999f655a42670e6d8813","other":"5989492b2703336b42f59b2be1653a0bce76e801ef262121f627a476581af5e1","up":true},{"one":"c651a0c924fc01e9d6cd30aba6864cd93631d5d4e21ceeda7db1922f105c5ca8","other":"c7a2bf651f59149716235fa7bfb4cee835aa4bdd402ccab8c52959aa74dc6af4","up":true},{"one":"4b6e068e84fecde2bb6a48698233f0c2ae5e66b15a8bad2e0b5d499c31d48b98","other":"55ce5ea5772c31de27b337f1e2cf767663c03a61b2f47b71921def1cfc3270ea","up":true},{"one":"6629ec867229b28221a6118eb0e097861eb784b624578f55c3811cdf5026c1c7","other":"69d329853a0624dba12949e6be7db093143976d9a5d514b80d72a9bf7fbc568c","up":true},{"one":"9cd2b6b17d2954c0a0d4a340707c71215a08c3c27b5b5b294e96ad20263ba600","other":"c553ca20b4f7f1b1e3b71b261829c27eb1cfe6710aa0999f655a42670e6d8813","up":true},{"one":"c0f23df25018045ddc4035268a9e7468f386ecad306b9ed9053cf66e2f1ab0a2","other":"c7a2bf651f59149716235fa7bfb4cee835aa4bdd402ccab8c52959aa74dc6af4","up":true},{"one":"1ffdd4692bd4fd272ac6b5c2e039354869df92c0d4247abedcd8a8932b057574","other":"6629ec867229b28221a6118eb0e097861eb784b624578f55c3811cdf5026c1c7","up":true},{"one":"55ce5ea5772c31de27b337f1e2cf767663c03a61b2f47b71921def1cfc3270ea","other":"5989492b2703336b42f59b2be1653a0bce76e801ef262121f627a476581af5e1","up":true},{"one":"d33e4e6af5ba13ae448a16a4a8183ab1050fa3f983cdbf03dec5c21a5e9dd146","other":"d9b0b57a237a8386cf6cf611779d8df3f5b0f9c01719e97230c3b23bf0ab04ae","up":true},{"one":"5989492b2703336b42f59b2be1653a0bce76e801ef262121f627a476581af5e1","other":"4b6e068e84fecde2bb6a48698233f0c2ae5e66b15a8bad2e0b5d499c31d48b98","up":true},{"one":"c7a2bf651f59149716235fa7bfb4cee835aa4bdd402ccab8c52959aa74dc6af4","other":"9cd2b6b17d2954c0a0d4a340707c71215a08c3c27b5b5b294e96ad20263ba600","up":true},{"one":"69d329853a0624dba12949e6be7db093143976d9a5d514b80d72a9bf7fbc568c","other":"5989492b2703336b42f59b2be1653a0bce76e801ef262121f627a476581af5e1","up":true},{"one":"d9b0b57a237a8386cf6cf611779d8df3f5b0f9c01719e97230c3b23bf0ab04ae","other":"55ce5ea5772c31de27b337f1e2cf767663c03a61b2f47b71921def1cfc3270ea","up":true},{"one":"c553ca20b4f7f1b1e3b71b261829c27eb1cfe6710aa0999f655a42670e6d8813","other":"d33e4e6af5ba13ae448a16a4a8183ab1050fa3f983cdbf03dec5c21a5e9dd146","up":true},{"one":"c651a0c924fc01e9d6cd30aba6864cd93631d5d4e21ceeda7db1922f105c5ca8","other":"8c92cb1fcda5b67a4b928c200e2e5e324599c997202d9ea98f703239ee3fc3b1","up":true},{"one":"c0f23df25018045ddc4035268a9e7468f386ecad306b9ed9053cf66e2f1ab0a2","other":"c651a0c924fc01e9d6cd30aba6864cd93631d5d4e21ceeda7db1922f105c5ca8","up":true},{"one":"69d329853a0624dba12949e6be7db093143976d9a5d514b80d72a9bf7fbc568c","other":"1ffdd4692bd4fd272ac6b5c2e039354869df92c0d4247abedcd8a8932b057574","up":true},{"one":"d33e4e6af5ba13ae448a16a4a8183ab1050fa3f983cdbf03dec5c21a5e9dd146","other":"c651a0c924fc01e9d6cd30aba6864cd93631d5d4e21ceeda7db1922f105c5ca8","up":true},{"one":"1ffdd4692bd4fd272ac6b5c2e039354869df92c0d4247abedcd8a8932b057574","other":"9cd2b6b17d2954c0a0d4a340707c71215a08c3c27b5b5b294e96ad20263ba600","up":true},{"one":"c0f23df25018045ddc4035268a9e7468f386ecad306b9ed9053cf66e2f1ab0a2","other":"c553ca20b4f7f1b1e3b71b261829c27eb1cfe6710aa0999f655a42670e6d8813","up":true}]}