Commit Graph

28 Commits

Author SHA1 Message Date
Ignotus Peverell 1b78a73328 Variety of small p2p fixes to block sync
Adds a couple utility function to p2p server to check whether
we're already connected to a peer before trying again. Other
very minor fixes and logging improvements.
2017-04-27 22:05:12 -07:00
Ignotus Peverell 96ea9a7d9f Minor fixes and URL for web static file seeds 2017-04-24 18:53:42 -07:00
Ignotus Peverell 3fe28b0f03 Server types cleanup and serde for configuration types
Moved error and configuration types from server.rs to types.rs
where they should have been from the start. Configuration types
for the server and p2p modules now derive serde Serialize and
Deserialize so we can have a simple JSON configuration file.
2017-04-24 18:49:57 -07:00
Merope Riddle 39ddeb0a2a core: various cleanups, improvements, code comments (#38)
* core: cleanup slicing impls for Hash
* core: clean up Readable trait, implement Readable/Writeable for various integers
* core: change Hash debug output to hex
* core: correct warnings in all modules
2017-04-09 23:17:23 -07:00
Ignotus Peverell f16c4ac59b Fix for hyper interface change 2017-04-05 23:28:53 -07:00
Ignotus Peverell fd26ec9753 Fix Hyper URL to URI ref 2017-03-23 18:04:49 -07:00
Ignotus Peverell f64d20749f Framework to define services as RESTful HTTP API services. Serde implementations for some core types. 2017-03-07 17:00:34 -08:00
Ignotus Peverell d900f0b934 P2P server cleanup of disconnected peers. Mark those that don't respect the protocol as banned. 2017-02-27 14:17:53 -08:00
Ignotus Peverell 7c72ccec7c Cleaned up error handling in p2p module. Setting peer status on disconnect. 2017-02-26 20:08:40 -08:00
Ignotus Peverell eb024e91d2 Discovery and seeding of other peers. Relies either on a gist with IP addresses or a static list. Connects to a first list, sending peer request messages to discover more. Monitor the server to make sure there's always enough peer connections. 2017-02-18 18:42:34 -08:00
Ignotus Peverell 510feadce6 Minor compilation errors due to moving store Error. 2017-02-10 11:02:21 -08:00
Ignotus Peverell 4af049a887 Added full node sync mode. Follows closely the bitcoin header-first sync. Related p2p messages and protocol. 2017-02-07 13:52:17 -08:00
Ignotus Peverell 2d81abc16c Added height as part of handshake to inform syncing. 2017-02-02 15:51:48 -08:00
Ignotus Peverell fc2697e7d8 When the cuckoo size is reduced for tests, pow needs to be recomputed for the genesis block. 2017-01-23 14:34:02 -08:00
Ignotus Peverell dda223f25b Chain logic to support multiple forks, select the most worked fork as the head. Significantly simplified from the original direction as it doesn't seem that explicitly materializing forks is necessary. Simple total difficulty accounting in block headers helping a lot there. 2017-01-09 15:16:44 -08:00
Ignotus Peverell ce23dda6cb Block headers maintain total difficulty up to previous. Changed all references of target to difficulty to stay consistent. Ported retargeting algo to use difficulty as well. 2016-12-26 15:39:31 -08:00
Ignotus Peverell 0cc786a1e5 Refactored server to share the same struct whether futures are exposed or not. Multi-server test now properly waits for a block instead of a timer. 2016-12-23 12:15:36 -08:00
Ignotus Peverell f067e18644 Adapters between the chain and the network for block broadcast. First working test that spins up 5 servers, connects them all together, mine a block on one and watch it getting added to all the other servers chains. Some improvements still needed to automate the test properly. 2016-12-20 17:39:02 -08:00
Ignotus Peverell 17104977de Several bug fixes to the miner loop. Now builds the block properly and updates the shared head state. 2016-12-20 17:36:48 -08:00
Ignotus Peverell e688ff99e6 Started putting in place the adapter between the chain and p2p modules to forward blocks and transactions. Cleaned up chain store references. 2016-12-18 15:51:54 -08:00
Ignotus Peverell d395b3d128 Added another server implementation for when the client needs to stay in control of the event loop (i.e. multiple servers for tests). Test to spin up 5 servers and connect them all together. 2016-12-14 16:10:39 -08:00
Ignotus Peverell 8a255c0218 Formatting. 2016-12-13 19:21:49 -08:00
Ignotus Peverell 0c52665f17 Server abstraction aggregating underlying modules (p2p, chain, etc.). Beginning of a test to start multiple servers, connect them and mine. 2016-11-29 18:51:36 -08:00
Ignotus Peverell 3aeacf647b Module grin is better as a lib to be testable. Will introduce a slim binary module later. 2016-11-29 18:41:00 -08:00
Ignotus Peverell 5a82acd199 fmt 2016-11-27 13:14:41 -08:00
Ignotus Peverell 9795d9e452 Miner facility, using the current chain state to build on top of. 2016-11-27 12:31:15 -08:00
Merope Riddle 9644fb6a73 Add apache 2.0 license header to all source files 2016-10-23 13:20:39 +00:00
Ignotus Peverell f73a308bf3 Initial import. 2016-10-20 20:06:12 -04:00