| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Delete all blocks in received blocks array for avoiding using too
much memory space.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
| |
|
| |
|
|
|
|
| |
(#37)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
| |
|
|
|
| |
Force connection reuse and TCP keep alive by using the same http client for all reqeusts.
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
| |
This commit made acking module in core implicit for avoiding other
package to use. And fix underscore error messages.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
| |
|
| |
|
|
|
|
| |
- Add types.ByHeight to sort slice of blocks by their heights.
- Add test case for sorting methods of types.Block.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
| |
Ignore build in .gitignore.
|
|
|
| |
Use cache to do `dep ensure` faster in circleci.
|
|
|
| |
Verify the Total Ordering Algorithm in peerServer in tcp mode.
|
|
|
| |
Added rule "format" and "check-format" in GNUmakefile.
|
| |
|
|
|
|
|
|
| |
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
* Test GetByValidatorAndHeight after syncIndex
|
| |
|
|
|
|
|
|
| |
* simulation: fix tcp-local network simulation
* fixup
|
| |
|
|
|
| |
simulation: implement simulation on a real network
|
|
|
|
|
|
|
|
|
| |
* core: refactor acking relationship
Use AckBy only, and remove IndirectAcks.
Also fix the issue where validator is not filling Height when proposing
block.
|
| |
|
|
|
|
| |
* add README
|
|
|
|
|
| |
* Fix typos and add .gitignore
* Add more rule on .gitignore
|
|
|