Commit Graph

25 Commits

Author SHA1 Message Date
Ivan Martinez
4976461e62 Implement GenesisBlock() to Grab the Block from Memory DB (#373)
* Fix odd placement of import

* Puts all of NewGenesisBlock() into GenesisBlock() 

Also removes the unneeded TODO

* Add error check for db retrieval

* Add missing bazel imports

* Add back NewGenesisBlock and create GenesisBlock in NewBeaconChian

* Fix GenesisBlock() to grab the block from memory db

* Fix according to requested changes

Fix GenesisBlock() to grab the block from memory db
Fix odd placement of import


Properly add ParentHash to Block


Remove no longer needed if statement condition


Puts all of NewGenesisBlock() into GenesisBlock() 

Also removes the unneeded TODO
Add error check for db retrieval


Add case for if the beaconChain is missing a genesisBlock


Add missing bazel imports


Add back NewGenesisBlock and create GenesisBlock in NewBeaconChian


Remove duplicate code


Change genesis block timestamp to unix 0


Adds info log when a genesis block isn't found

* Provide fakeClock to pass tests with a mocked genesisBlock

* Fix unexpected log in test from addition of genesis block

* Add tests for clock
2018-08-12 22:07:37 -04:00
Ivan Martinez
390ac62ed8 Update docs client/beacon-chain wide (#386) 2018-08-09 11:25:48 -07:00
terence tsao
bfaa248b39
Refactor Proto Struct to Be More Semantic (#381) 2018-08-05 16:23:31 -07:00
terence tsao
87d5fbfd2b
Move Get Cutoff Algo to Utils Package (#370) 2018-08-02 14:20:54 -07:00
terence tsao
0a5e091ad3
Fixed Deficiency in Apply Reward & Refactored Blockchain Functions (#367) 2018-08-02 10:47:49 -07:00
terence tsao
c9f1bfc19c
Simulate Epoch Transition (#361) 2018-08-01 08:24:55 -07:00
Raul Jordan
13a011ce5f
proto: Structure Protos for Beacon and for Sharding (#359) 2018-07-31 13:54:45 -05:00
Yutaro Mori
f3b3712916 Quick Test Helper for Creating Blocks (#356) 2018-07-31 07:37:20 -07:00
Sina Mahmoodi
8c0e9d231c beacon: Check parent hash in block processing (#340)
Signed-off-by: Sina Mahmoodi <itz.s1na@gmail.com>
2018-07-31 18:06:44 +09:00
Raul Jordan
cccd675a84
beacon: Initial Sync Network Simulator (#341) 2018-07-30 23:41:27 -05:00
terence tsao
9b1966374a
Part 2 of State Sync - Active State Proto Struct (#355) 2018-07-30 18:13:25 -07:00
terence tsao
33c56092ad beacon: Part 1 of State Sync - Crystallized State Proto Struct (#354) 2018-07-30 19:29:40 -05:00
Yutaro Mori
9c9aef8194
Eliminate test only methods on types.Block (#350) 2018-07-31 00:45:44 +09:00
Yutaro Mori
f9d23da2dd Decouple Database From the ServiceRegistry (#335) 2018-07-29 23:14:50 -07:00
terence tsao
1cb300565d
Implement Validator Cutoff Algorithm (#339) 2018-07-29 10:03:03 -07:00
Nishant Das
d7a88dffa4
Implemeting Validator Rewards and Penalties (#323)
* Adding Validator Rewards

* Addressing review comments

* Adding Penalties

* Adding changes

* Breaking up functions

* Cleaning up

* Adding slashing conditions

* Adding slashing condition boiler plate

* Adding tests

* Adding comments

* Adding comments

* Add in Pubkey

* Adding more tests

* Adding more unit tests and making name changes

* Add beacon chain test helper and fix references to it

* Adding rewards test

* Adding all tests

* Addressing review comments

* Remove slashing conditions

* fix lint

* Fixing merge issues

* removing commented function

* removing newline

* fix golint
2018-07-30 00:22:15 +08:00
Raul Jordan
9ab02849b6
beacon: Initial Beacon P2P Protobufs, Subscriptions (#327) 2018-07-28 15:53:02 -04:00
terence tsao
b1c47ab83a
Implement Validator Clean Up for Dynasty Transition (#329) 2018-07-26 11:20:55 -07:00
terence tsao
c0b4503d5f beacon: Check State Hashes while Processing Incoming Blocks (#319) 2018-07-24 16:09:04 -05:00
Raul Jordan
d46f1f6502
beacon: Block Processing Validity Conditions (#310) 2018-07-23 12:54:41 -04:00
terence tsao
3abfb77b87
Outline for Active State Transition Function (#309) 2018-07-22 13:00:10 -04:00
Raul Jordan
59fc2e13e7 client: Fix P2P Linter Error (#307)
Former-commit-id: 5f673dffed4267c1aca8ebfb4fe182798b9b2d2a [formerly 3fd494231ba5a350ab59a86fcf60ae9f56f1da00]
Former-commit-id: 1506dd418121884a8c7a727f8cf03c12e4c93cc3
2018-07-21 12:20:00 -05:00
Raul Jordan
92af8bc351 Rename Entire Project to Repo, Change Import Paths and Readmes (#298)
Former-commit-id: b7b8bbd10777012ae6f7d30eb6b05c3b1c3ec5d3 [formerly 06e1112fa0e1092a7137186d3a386972daa2effe]
Former-commit-id: ff2bc760c9dafb6250f056606eb2cbf96b6afa5b
2018-07-20 16:31:26 -05:00
Raul Jordan
abed3dcb6d update to GPLv3 (#297)
Former-commit-id: cc6b67b7391c407d2f830ae46e6765e097c50c57 [formerly cb2dc8a0ea96b92897dd8f797eb632c941d9f653]
Former-commit-id: 600e28af6901b19b8d191cf3153343d94670f9d0
2018-07-20 10:23:48 -05:00
Raul Jordan
4d5d229f0f beacon: Define a Core Blockchain Package and Persisted Structure for Beacon (#278)
Former-commit-id: bbd5b46e7f64f762350d6fb496492207e70d7130 [formerly 43a37f7139b7d1d90f0c27a7406b63bdf390ad96]
Former-commit-id: bb7a2ff0a7619f8de0bd38cd2c9eb0de7c189edb
2018-07-19 11:31:50 -05:00