Commit graph

931 commits

Author SHA1 Message Date
Ignotus Peverell
715cc44d93
Use proper target when mining in test. 2016-11-29 20:07:08 -08:00
Ignotus Peverell
55f5771a2a
Avoid unecessary move of the previous block header to build a block. 2016-11-29 20:05:35 -08:00
Ignotus Peverell
2e52b13c35
Date format uses year since 1900. 2016-11-29 20:04:13 -08:00
Ignotus Peverell
1ab9001338
Target needs to be truncated after next target calculation, given that serialization in the block header does it anyway. 2016-11-29 20:03:43 -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
309cb497f8
Configurable host and port for p2p server. Utility for client connection. 2016-11-29 18:49:03 -08:00
Ignotus Peverell
2e361fb2a4
Cleaned spurious debug. 2016-11-29 18:47:00 -08:00
Ignotus Peverell
11b8a6222a
Any size pow accesible to tests. 2016-11-29 18:46:28 -08:00
Ignotus Peverell
08f2f38098
Configurable path for chain db. Lowered test cuckoo size. 2016-11-29 18:45:39 -08:00
Ignotus Peverell
d11c85dae1
Fixed missing previous in block header. 2016-11-29 18:42:43 -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
Ignotus Peverell
1e5ff0eeff
Integration of target calculation with header validation and pow. Enforce strictly progessing time. 2016-11-16 17:03:23 -08:00
Ignotus Peverell
ca26f0c3f7
Block header needs its own deserialization. Fixed pow verify to use the block target. 2016-11-16 14:08:46 -08:00
Ignotus Peverell
1d2b23a4a5
Several simple fixes to reflect changes from core (Result instead of Option for errors, consensus module, etc.) 2016-11-15 17:29:42 -08:00
Ignotus Peverell
3c5e2b2958
Block now uses the new Target type. Consensus next_target calculation adjusting every block based on deviation and increasing Cuckoo size gradually. Block time of a minute until we learn more from mining ecosystem, so enough PoW attempts can be made even on CPUs. 2016-11-15 14:41:16 -08:00
Ignotus Peverell
44545525f4
Target addition and subtraction. A little more doc. 2016-11-15 14:41:16 -08:00
Ignotus Peverell
3a54df15f3 Merge pull request #17 from romanz/patch-1
Fix a small typo in documentation
2016-11-14 11:41:27 -08:00
Roman Zeyde
151a0150b9 Fix a small typo in documentation 2016-11-14 21:21:18 +02:00
Ignotus Peverell
f7b31dc5f3
Bitcoin-style target implementation. Large 32 byte number that can be compared and serializes truncated. 2016-11-13 21:04:01 -08:00
Ignotus Peverell
0440302e73 Merge pull request #16 from GarrickOllivander/fix_file_headers
Fix file headers: Developer -> Grin Developer
2016-11-13 09:48:10 -08:00
Garrick Ollivander
956dd6b816
fix file headers: Developer -> Grin Developer 2016-11-13 12:47:09 +01:00
Ignotus Peverell
2b8faf8709
A few more consensus values. 2016-11-10 17:19:03 -08:00
Ignotus Peverell
d710301833
Missing consensus file. 2016-11-10 16:02:47 -08:00
Ignotus Peverell
d2110f5b46
Web IRC link to make it easier for newcomers to connect. 2016-11-10 16:02:33 -08:00
Ignotus Peverell
712cf78e8a Merge pull request #14 from ignopeverell/topic/fees-in-sig
Slight changes to transaction signature. The transaction fee gets signed (instead of the empty string) and the fee amount is attached to the transaction proof in blocks.
2016-11-10 15:55:49 -08:00
Ignotus Peverell
baeae7d1a5
Merged master. 2016-11-10 15:54:47 -08:00
Ignotus Peverell
4ade3ec1b8
Moved consensus related constants to their own core module. 2016-11-09 15:51:24 -08:00
Ignotus Peverell
6e2a232ca3
Cleaned up total fees from block header. Unnecessary now. 2016-11-09 13:25:40 -08:00
Ignotus Peverell
ba5479841e
Small doc adjustment to add IRC. 2016-11-09 11:17:58 -08:00
Ignotus Peverell
4e9aad639e
Formatting fixes. 2016-11-09 11:10:02 -08:00
Ignotus Peverell
8317854b70
Slight changes to transaction signature. The transaction fee gets signed (instead of the empty string) and the fee amount is attached to the transaction proof in blocks. This allows fee accounting and the tracking of fees within a block. 2016-11-09 11:05:44 -08:00
Ignotus Peverell
2e23c64448
Intro to pruning doc, just some facts and size data. 2016-11-08 09:50:13 -08:00
Ignotus Peverell
632e3af8ee
Test for sending tx from one peer to another. Common tests module. 2016-11-07 14:02:45 -08:00
Ignotus Peverell
a47006a75d Merge pull request #12 from merope07/merkle-doc
Add design document for Merkle tree structures
2016-11-07 11:19:54 -08:00
Merope Riddle
7b3095ac12 Add design document for Merkle tree structures 2016-11-07 17:58:54 +00:00
Ignotus Peverell
ea425dc614
Protocol cleanup. Tests cleanup. Additional test for transaction broadcast. 2016-11-05 16:31:45 -07:00
Ignotus Peverell
28f007240e
Usefuly read and write implementations to limit and count bytes. 2016-11-04 08:59:49 -07:00
Ignotus Peverell
098d17ee42
Added limited and counting readers for protocol to maintain its stats. Added primitive error count. Cleaned up protocol. 2016-11-02 14:19:40 -07:00
Ignotus Peverell
edc6c62577
Fixed message serialization following changes in core. Sending of block and transaction. 2016-11-01 10:42:33 -07:00
Ignotus Peverell
1008539048 Merge pull request #11 from merope07/option-t
core: Clean up serialization and hashing
2016-11-01 10:25:35 -07:00
Merope Riddle
33ccfe3b65 core: remove several unused imports 2016-11-01 13:19:38 +00:00
Merope Riddle
ca89dae7e1 core: unify Hashed and Writeable to simplify things and remove allocations 2016-11-01 13:19:28 +00:00
Merope Riddle
245f0a8b56 core/ser: add default implementations for most methods of Writer 2016-11-01 13:14:26 +00:00
Merope Riddle
565374bac7 p2p: fix for changes in core serialization API 2016-11-01 02:16:57 +00:00
Merope Riddle
630c4eb6fb core/ser: replace write_vec with write_bytes, drop a bunch of clones 2016-11-01 02:14:52 +00:00
Merope Riddle
bc38016385 core/ser: change serialization trait to use Result<(), Error> in place of Option<Error> 2016-11-01 02:14:52 +00:00
Ignotus Peverell
3ffc2f5d8c
Tests improvement. Protocol also measures bytes received (at least for pings). 2016-10-31 12:30:48 -07:00
Ignotus Peverell
d1bb114b18 Merge pull request #9 from GarrickOllivander/nicer_messagetype
Nicer message types const list.
2016-10-31 09:13:08 -07:00