aboutsummaryrefslogtreecommitdiffstats
path: root/simulation/app.go
Commit message (Collapse)AuthorAgeFilesLines
* core: update governance interface to consider genesis state (#136)Wei-Ning Huang2018-09-251-1/+1
|
* Fix naming of methods (#134)Mission Liao2018-09-251-8/+8
| | | | | | - BlockDeliver -> BlockDelivered - TotalOrderingDeliver -> TotalOrderingDelivered - WitnessAckDeliver -> WitnessAckDelivered - VerifyPayload -> VerifyPayloads
* core: add debug (#133)Mission Liao2018-09-251-64/+19
| | | | | | | | | | | | | | | | | | | | | * Split interface * Rename nonblocking-application to nonblocking Parts needs nonblocking gets more. * Implement core.nonBlocking based on interface split * Fix: the witness parent hash could be parent on compaction chain. * Rename Application.DeliverBlock to BlockDeliver To sync with naming of other methods. * Change methods' fingerprint - BlockConfirmed provides block hash only. - BlockDeliver provde a whole block.
* core: refactor witness data processing flow (#124)Wei-Ning Huang2018-09-201-0/+15
| | | | | | | | | | | Since witness data need to include data from application after it processed a block (e.g. stateRoot). We should make the process of witness data asynchronous. An interface `BlockProcessedChan()` is added to the application interface to return a channel for notifying the consensus core when a block is processed. The notification object includes a byte slice (witenss data) which will be include in the final witness data object.
* Rename validator* to node* (#120)Mission Liao2018-09-201-11/+11
|
* core: rename Notary (Acks) to Witness (#118)Wei-Ning Huang2018-09-191-2/+2
|
* core: fix VerifyPayload argument (#103)Wei-Ning Huang2018-09-131-1/+1
| | | | Since we are using a byte slice for storing payload. VerifyPayload() should also accepts a byte slice.
* core: replace acks with slice (#102)Mission Liao2018-09-121-1/+1
|
* core: types: use []byte for block Payload type (#101)Wei-Ning Huang2018-09-121-3/+3
| | | | | Change payload type to []byte instead of [][]byte to make it more generic. The user of the consensus core should marshal the payload into a byte slice by themselves.
* simulation: integrate test.Transport (#99)Mission Liao2018-09-111-12/+12
| | | | | - Add marshaller for simulation by encoding/json - Implement peer server based on test.TranportServer - Remove network models, they are replaced with test.LatencyModel
* core: timestamp (#98)Jimmy Hu2018-09-111-1/+1
|
* core: BA-based consensus core. (#93)Jimmy Hu2018-09-041-1/+1
|
* core: Add a new structure `Position` and move `ShardID`, `ChainID` and ↵Jimmy Hu2018-09-031-2/+2
| | | | `Height` from `Block` (#89)
* Add methods to Application interface. (#86)Jimmy Hu2018-08-311-2/+7
|
* core: Add PreparePayloads to Application and Remove blockConverter ↵Jimmy Hu2018-08-301-0/+5
| | | | interface. (#84)
* 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: Notary ack (#69)Jimmy Hu2018-08-211-2/+2
|
* core: NotaryAck interfaces. (#67)Jimmy Hu2018-08-201-0/+4
|
* Use RLock for simulation.simApp.blockByHash (#53)Jimmy Hu2018-08-131-4/+3
|
* simulation: fix concurrent map write (#52)Wei-Ning Huang2018-08-131-0/+9
| | | Fix concurrent map write and also change k8s settings.
* core: update governance interface and move K into config (#40)Wei-Ning Huang2018-08-101-10/+10
|
* core: Deliver only Hash to Application. (#43)Jimmy Hu2018-08-101-9/+15
|
* core: Add Consensus to replace core.Blocklattice (#35)Mission Liao2018-08-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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: Show internal and external timestamp latency. (#30)Jimmy Hu2018-08-071-3/+94
|
* core: refine Application interface and add Governance interface (#24)Wei-Ning Huang2018-07-311-7/+7
| | | | | | | 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.
* Print block confirm latency when Peer Server stopped. (#23)Jimmy Hu2018-07-311-1/+16
|
* Verify the Total Ordering Algorithm in peerServer in tcp mode (#11)Jimmy Hu2018-07-261-1/+12
| | | Verify the Total Ordering Algorithm in peerServer in tcp mode.
* Initial implementation of DEXON consensus algorithmWei-Ning Huang2018-07-161-0/+50