aboutsummaryrefslogtreecommitdiffstats
path: root/simulation/validator.go
Commit message (Collapse)AuthorAgeFilesLines
* Rename validator* to node* (#120)Mission Liao2018-09-201-138/+0
|
* core:DKG and TSIG protocol (#115)Jimmy Hu2018-09-191-1/+6
|
* core: remove ticker parameter from NewConsensusMission Liao2018-09-181-14/+2
| | | | | | | | | - remove BlockProposingInterval, it's replaced by lambda. - remove ticker parameter of NewConsensus, ticker would be derived from governance. - leave a backdoor to hook the construction of ticker. - move 'Lambda' config from to consensus.
* core: move blockdb into core package and minor change on governance ↵Wei-Ning Huang2018-09-171-1/+1
| | | | | | | interface (#110) Since third party apps will possibly implement their only blockdb class, it make sense for the interface to be in core. Also add GetNumShards into the governance interface.
* cleanup (#109)Mission Liao2018-09-171-18/+15
| | | | | | - With context, we don't need stopChan - Remove core.BlockChain. - Remove unused variable.
* simulation: integrate test.Transport (#99)Mission Liao2018-09-111-53/+49
| | | | | - Add marshaller for simulation by encoding/json - Implement peer server based on test.TranportServer - Remove network models, they are replaced with test.LatencyModel
* misc: Polish BA. (#94)Jimmy Hu2018-09-051-8/+18
|
* Add methods to Application interface. (#86)Jimmy Hu2018-08-311-90/+4
|
* Use Network in Consensus core (#85)Jimmy Hu2018-08-311-1/+4
|
* core: Add PreparePayloads to Application and Remove blockConverter ↵Jimmy Hu2018-08-301-2/+3
| | | | interface. (#84)
* core: Change the lattice key from validatorID to chainID. (#83)Jimmy Hu2018-08-301-0/+13
| | | | | * Add chainID in simulation.Validator * Change validatorid to chainID in rbModule
* core: tune performance (#73)Mission Liao2018-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | - Avoid using recursive function in critical path. - Do not write through when using levelDB. Things put to levelDB would be safe from panic even we didn't force to write through every time. - Dump count of confirmed blocks proposed by self. - Avoid allocating variables in loop. - Return length of acking node set, we only need that when total ordering. - Fix potential bug: make sure win records updated when acking height vectors of candidates are changed. - Keep dirty validators in slice. - Add cache for objects to ease the pressure to garbage collector. - Cache global acking status when total ordering. - Add method to recycle blocks. - Marshal JSON should be called once for each broadcast. - Make updateWinRecord called in parallel. - Log average / deviation of latencies when simulation finished.
* core: Add vote type and add field to block. (#76)Jimmy Hu2018-08-281-0/+4
|
* core: Notary ack application. (#70)Jimmy Hu2018-08-221-0/+4
|
* core: Prepare Genesis block. (#54)Jimmy Hu2018-08-141-7/+4
|
* simulation: Create Consensus core after Join. (#51)Jimmy Hu2018-08-131-32/+12
|
* core: Sign block in Consensus.PrepareBlock. (#50)Jimmy Hu2018-08-131-2/+7
|
* core: ValidatorID.Hash is the hash of public key. (#49)Jimmy Hu2018-08-131-1/+5
|
* core: Modify Consensus interface (#45)Jimmy Hu2018-08-101-1/+1
|
* core: update governance interface and move K into config (#40)Wei-Ning Huang2018-08-101-4/+4
|
* 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-101-20/+21
| | | | | | | | | | | | | | | | | | | | * 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-101-0/+2
|
* core: Add Block.IsGenesis() and set Block.ParentHash to 0 in genesis block. ↵Jimmy Hu2018-08-091-4/+3
| | | | (#37)
* simulation: Fix k8s simulation issues. (#36)Jimmy Hu2018-08-091-4/+10
| | | | | | | | | | | | * 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-081-36/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* simulation: free resource after use and misc fix for k8s mode (#31)Wei-Ning Huang2018-08-061-1/+1
|
* Remove timestamp generating function in validator (#25)Jimmy Hu2018-08-011-8/+0
|
* blockdb: allow to dump blocks to json-encoded fileMission Liao2018-07-311-7/+6
| | | | | | | | | | | | - 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-311-0/+8
|
* Add a config that PeerServer can shutdown after receiving enough of block. (#19)Jimmy Hu2018-07-301-11/+50
|
* Verify the Total Ordering Algorithm in peerServer in tcp mode (#11)Jimmy Hu2018-07-261-3/+3
| | | Verify the Total Ordering Algorithm in peerServer in tcp mode.
* Implement simulation on a real network (#5)Wei-Ning Huang2018-07-201-23/+32
| | | simulation: implement simulation on a real network
* core: refactor acking relationship (#3)Wei-Ning Huang2018-07-181-1/+1
| | | | | | | | | * core: refactor acking relationship Use AckBy only, and remove IndirectAcks. Also fix the issue where validator is not filling Height when proposing block.
* Initial implementation of DEXON consensus algorithmWei-Ning Huang2018-07-161-0/+139