| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
* Generate correct hash/signature when generating blocks.
* Refine naming, types.
- type of chainNum should be uint32 by default
- rename blockCount to blockNum
- rename nodeCount to chainNum
|
|
|
|
|
|
| |
core.blockPool is used to cache blocks arrived
out-of-order. Our consensus should retry
those blocks after their acking blocks added
to lattice.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
blocklattice is used to replace reliable broadcast.
Aiming to fix these problems:
- The mechanism related to strong ack is no
longer required.
- The sanity-check of one block would be passed
even if its acking block doesn't exist.
This commit doesn't include logic to handle
out-of-order blocks. It should be done in
another PR.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
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.
|
|
|
| |
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.
|
|
|