aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* crypto: Add SigToPub. (#48)Jimmy Hu2018-08-132-5/+35
| | | | * Add SigToPub function in crypto
* core: Hash block in Consensus.PrepareBlock. (#46)Jimmy Hu2018-08-128-70/+162
| | | | | | | | * Add hash to block * Check block hash in Consensus.sanityCheck * Add hashBlockFn in block generator.go
* core: reliable-broadcast: delete old blocks (#47)Haoping Ku2018-08-102-3/+13
| | | | Delete all blocks in received blocks array for avoiding using too much memory space.
* core: Modify Consensus interface (#45)Jimmy Hu2018-08-106-19/+47
|
* core: update governance interface and move K into config (#40)Wei-Ning Huang2018-08-1014-140/+233
|
* Add genesis block to simulation app. (#44)Jimmy Hu2018-08-101-0/+1
|
* Fix the bug preventing us from testing large group when using TCP-Local (#42)Mission Liao2018-08-104-29/+25
| | | | | | | | | | | | | | | | | | | | * Fix the issue that processing genesis block twice. - Restore the mechanism to avoid sending block to proposer. * Fix the 'keep-alive' not working Quote from comments of net/http/request For client requests, setting this field prevents re-use of TCP connections between requests to the same hosts, as if Transport.DisableKeepAlives were set. * Remove useless field * Fix the test bug: I should provide '3' when test K=3 * Fixup: the parent hash of genesis block should be zero
* core: Deliver only Hash to Application. (#43)Jimmy Hu2018-08-105-20/+26
|
* core: Add block hash signature functions in core/ctypto.go. (#39)Jimmy Hu2018-08-104-10/+174
|
* Add -race to go test (#38)Jimmy Hu2018-08-091-1/+1
|
* core: Add Block.IsGenesis() and set Block.ParentHash to 0 in genesis block. ↵Jimmy Hu2018-08-099-113/+109
| | | | (#37)
* Gopkg: fixup importsWei-Ning Huang2018-08-091-1/+21
|
* simulation: Fix k8s simulation issues. (#36)Jimmy Hu2018-08-093-9/+41
| | | | | | | | | | | | * Refine peer server * k8s ignore * Keep peer server alive on k8s * Stop validators from accepting new blocks after peer server has shut down. * Add comment
* core: Add Consensus to replace core.Blocklattice (#35)Mission Liao2018-08-0821-1237/+1039
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make Sequencer return slice of blocks. * Fix naming issue The function 'getHeightVecto' would return ackingStatusVector. * Fix comment error. * Add methods to collect info when proposing blocks. * Add test.App * Add test.Gov * Move this type to core.types to avoid cyclic import. * Add core.Consensus * Move getMedianTime, interpoTime to util These functions are not depending on members of core.consensusTimestamp and is required when testing core.Consensus. * Make sure types.Block.Clone would copy critical fields. * Remove core.blocklattice * Define 'infinity' in core/total-ordering This definition is defined in core/blocklattice originally. * Fix a bug when processing the same block twice. * Integrate simulation with core.Consensus core.Consensus is a replacement of core.Blocklattice * Fix the comment to use sigular form. * Move lock mechanism to sub modules. * phi should be 2*fmax+1 * Fixup: should aborting when the validator is added * Fix for new block fields * Fix the bug that the total ordering sequence is wrong.
* crypto: Add crypto module. (#34)Jimmy Hu2018-08-0815-17/+534
|
* simulation: Show internal and external timestamp latency. (#30)Jimmy Hu2018-08-075-17/+204
|
* simulation: tcp-network: force http.Client to reuse connection (#33)Wei-Ning Huang2018-08-061-15/+22
| | | Force connection reuse and TCP keep alive by using the same http client for all reqeusts.
* Rename names of struct and filesMission Liao2018-08-066-392/+392
| | | | | | | | | | | Rename these files: - core/sequencer[_test].go -> core/total-ordering[_test].go - core/acking[_test].go -> core/reliable-broadcast[_test].go - core/timestamp[_test].go -> core/consensus-timestamp[_test].go Rename these structs: - core.sequencer -> core.totalOrdering - core.acking -> core.reliableBroadcast - core.timestamp -> core.consensusTimestamp
* simulation: free resource after use and misc fix for k8s mode (#31)Wei-Ning Huang2018-08-069-17/+66
|
* Gopkg: update importsWei-Ning Huang2018-08-052-36/+10
|
* test: random blocks generator (#26)Mission Liao2018-08-0310-6/+975
| | | | | | | | | | | | | | | | | | | | | | * Add blocks generator. This helper would randomly generate blocks that forms valid DAGs. * Add revealer Revealer is an extension of blockdb.BlockIterator. The block sequence from 'Next' method would be either randomly (see RandomRevealer) or meeting some specific condition (ex. forming a DAG, see RandomDAGRevealer). * Add test for sequencer based on random blocks. * core: refine Application interface and add Governance interface (#24) Add a new Governance interface for interaction with the governance contract. Also remove the ValidateBlock call in application interface as the application should validate it before putting it into the consensus module. A new BlockConverter interface is also added. The consensus module should accept the BlockConverter interface in future implementation, and use the Block() function to get the underlying block info.
* core: DEXON Consensus Timestamp Algorithm. (#29)Jimmy Hu2018-08-034-10/+377
|
* core: make acking module implicit (#28)Haoping Ku2018-08-012-46/+46
| | | | This commit made acking module in core implicit for avoiding other package to use. And fix underscore error messages.
* core: fix decimal package import (#27)Wei-Ning Huang2018-08-011-1/+1
|
* Remove timestamp generating function in validator (#25)Jimmy Hu2018-08-012-25/+9
|
* core: refine Application interface and add Governance interface (#24)Wei-Ning Huang2018-07-316-16/+84
| | | | | | | Add a new Governance interface for interaction with the governance contract. Also remove the ValidateBlock call in application interface as the application should validate it before putting it into the consensus module. A new BlockConverter interface is also added. The consensus module should accept the BlockConverter interface in future implementation, and use the Block() function to get the underlying block info.
* blockdb: allow to dump blocks to json-encoded fileMission Liao2018-07-318-147/+294
| | | | | | | | | | | | - Allow to dump blockdb to a json file - Compared to leveldb, a json file is easier to trace. - Add interfaces block database: - Close would be required by database that needs cleanup. - BlockIterator is required when we need to access 'all' blocks, adding a new method 'GetAll' as the constructor for iterators. - Remove GetByValidatorAndHeight from blockdb.Reader - This function is not used anywhere, to make interface minimum, remove it. - Fix typo: backend -> backed
* Print block confirm latency when Peer Server stopped. (#23)Jimmy Hu2018-07-318-26/+67
|
* Print confirmed blocks per second when Peer Server stopped. (#22)Jimmy Hu2018-07-312-0/+47
|
* Add new sorting method for blocksMission Liao2018-07-312-0/+65
| | | | - Add types.ByHeight to sort slice of blocks by their heights. - Add test case for sorting methods of types.Block.
* Implement DEXON total ordering algorithm (#16)Mission Liao2018-07-302-0/+1396
| | | | | | | | | | | | | | Implement K-Level Total ordering algorithm Besides algorithm implementation, these concepts are also included: The candidate set and ackingStatusVector of each candidate won't be recalculated upon receiving each block. Make the component to calculate total ordering more self-contained. The access to block status is only required when receiving a new block.
* Add acking module (#13)Haoping Ku2018-07-306-27/+762
| | | | | | | * Refactor and add acking module Extract acking module for unit testing. This commit splits functions into small pieces for better understanding and easy unit testing.
* Add a config that PeerServer can shutdown after receiving enough of block. (#19)Jimmy Hu2018-07-3010-22/+264
|
* Ignore build in .gitignore. (#18)Jimmy Hu2018-07-261-0/+2
| | | Ignore build in .gitignore.
* Use cache to do `dep ensure` faster in circleci (#17)Jimmy Hu2018-07-262-4/+74
| | | Use cache to do `dep ensure` faster in circleci.
* Verify the Total Ordering Algorithm in peerServer in tcp mode (#11)Jimmy Hu2018-07-269-17/+294
| | | Verify the Total Ordering Algorithm in peerServer in tcp mode.
* Add make format (#12)Haoping Ku2018-07-252-1/+12
| | | Added rule "format" and "check-format" in GNUmakefile.
* Add API Token to CircleCI badge (#14)Jimmy Hu2018-07-251-1/+1
|
* Fix blocklattice_test.go's ordering check (#15)Haoping Ku2018-07-242-2/+14
| | | | | | Outputs of total ordering are sorted by hash value in blocklattice.go, but was checked orderly in test, which the order might change due to random hash. Added common.Hashes.
* Add test to cover blockdb.syncIndex.Jimmy Hu2018-07-241-0/+48
| | | | | | * Add test to cover blockdb.syncIndex * Test GetByValidatorAndHeight after syncIndex
* Remove test db after test (#9)Jimmy Hu2018-07-231-4/+6
|
* simulation: fix tcp-local network simulation (#8)Wei-Ning Huang2018-07-233-2/+13
| | | | | | * simulation: fix tcp-local network simulation * fixup
* Implement blockdb levelDB backend (#6)Mission Liao2018-07-225-12/+305
|
* Implement simulation on a real network (#5)Wei-Ning Huang2018-07-2022-211/+848
| | | simulation: implement simulation on a real network
* core: refactor acking relationship (#3)Wei-Ning Huang2018-07-184-167/+136
| | | | | | | | | * core: refactor acking relationship Use AckBy only, and remove IndirectAcks. Also fix the issue where validator is not filling Height when proposing block.
* project: setup circle CIWei-Ning Huang2018-07-182-2/+22
|
* add README (#1)Kordan Ou2018-07-183-23/+65
| | | | * add README
* Fix typos and add .gitignore (#2)Haoping Ku2018-07-179-17/+32
| | | | | * Fix typos and add .gitignore * Add more rule on .gitignore
* Initial implementation of DEXON consensus algorithmWei-Ning Huang2018-07-1624-0/+2321