Commit Graph

782 Commits

Author SHA1 Message Date
terence tsao
1598ae8605
Part 3 of Aligning Beacon Chain with Latest 2.1 - Processing Attestations (#423) 2018-08-24 09:07:23 -07:00
Preston Van Loon
2ee9ec2120 fix visibility script after rename from client to validator (#431) 2018-08-24 11:15:12 -04:00
Raul Jordan
4a1b5db07b
beacon: Store Incoming Blocks and Calculated States in DAG (#422)
* begin with a block/state dag approach in prep for fork choice

* add TODOs for fork choice items, add data structure for forks

* remove syncing and processing states for incoming block sync

* simulator only broadcasts blocks now, no more state simulation

* fix sim tests, no more state sim

* bazel rerun

* naive fork choice

* split update head routine

* pesky race conditions

* fork choice rule works

* dag + fork choice working

* canonical head storage across sessions

* todo: save dag

* no more stalling after 10 blocks, using event feeds

* address review

* sync instead uses event feed

* refactored pure funcs into casper package

* tests pass

* fix lint

* refactor get blockhash

* refactor blockhashforslot

* event feed for incoming blocks in chainservice

* use config

* addressed all comments

* fix typo

* address yutaro comment

* using db interface

* check if parent hash in previous slot DAG

* works

* tests

* drop ffg suffix

* bazel gazelle

* full cov validators by height shard

* gazelle

* state tests

* all state tests

* 100% cov types and 99% cover casper

* cov up

* 80% blockchain cov

* fix lint
2018-08-23 22:09:59 -06:00
terence tsao
7c8331e9d3
Renamed Client to Validator (#428) 2018-08-22 12:15:21 -07:00
terence tsao
56ba92ac93
Updated Docker Rules (#424) 2018-08-21 19:59:36 -07:00
Yutaro Mori
7cfda8a149 Extract Initial Sync Into its Own Package (#404)
* Initial commit to extract initial sync code

* Add stop/resume of sync/intialsync

* bazel run

* gometalinter

* add tests

* cleanup

* build fixes

* use infof rather than errorf if sync is not in correct state

* Add TODO comment detailing eventual completion of transition from initial sync to sync

* fix build

* pr comments

* fix tests

* bump
2018-08-22 09:52:03 +08:00
Yutaro Mori
920a9a874d
fix race condition in rpc tests (#425) 2018-08-21 20:45:47 -04:00
Raul Jordan
bc8cc1743e Update Documentation With Specific Build Rules (#417) 2018-08-21 08:57:05 -07:00
terence tsao
e1f727cbb2
Implement Beacon Node Validator and Observer Entry Points (#414) 2018-08-20 08:50:11 -07:00
terence tsao
5356bda411 beacon: Use Blake2b Sum512 Instead of 256 (#419)
* Revert "Add Skip Coverage Condition in Coverage.sh (#416)"

This reverts commit 72a5dd1cf4.

* use blake2b512

* messed up on coverage.sh
2018-08-19 18:01:19 -06:00
terence tsao
72a5dd1cf4
Add Skip Coverage Condition in Coverage.sh (#416) 2018-08-19 08:31:52 -07:00
terence tsao
09824428e8 beacon: Improve Utils Coverage to 100% (#415) 2018-08-18 20:24:42 -06:00
Raul Jordan
d3b5a7c67b
beacon: Implement Beacon Node gRPC Server Streams (#400)
* remove client helper in internal

* tidying up the sharding client project

* update all docs

* implementing beacon rpc server methods

* address prs

* begin coverage

* regen proto

* include announcement chans

* tests pass, announcing as canonical only after block has passed all processing

* system functioning yay

* tests pass

* bootstrap validators

* default balance params

* fix lint

* fix all tests

* increasing cov

* 100% test cov rpc

* build file for internal

* typo

* graceful stop

* merge with Terence's PR

* address review comments

* fixed blockchain tests and lint

* added ethdb

* persists last simulated session

* cov

* ready

* fix lint

* fix cov tests

* fix lint

* config options for args

* fix lint

* lint fix
2018-08-17 21:34:56 -06:00
terence tsao
72282a90ba
Part 2 of Aligning Core Package with Latest 2.1 - Helper Functions (#403) 2018-08-17 18:54:34 -07:00
Mr Fox
090f37352e update readme.md (#407)
fix command mistake and enable geth websocket server for beacon node
2018-08-16 19:40:17 -04:00
Mr Fox
74b5f2e537 fix port mismatching (#410) 2018-08-16 16:20:52 -07:00
Mr Fox
ab4f903ef3 fix bazel deployVRC command (#408) 2018-08-16 15:11:48 -07:00
terence tsao
b7bf48bc3e Fixed NewSimulatedBackend (#405)
* sync functions for active and crystallized states

* make pb structure more semantic

* use run func to consolidate to one main routine

* remove mainchain package

* remove smc. yay!

* fixed NewSimulatedBackend

* added smc tests back

* race = off

* used latest commit from bazel-go-ethereum

* changed testoutput to all

* output test.log after failure

* disable race

* restore travis config to original state, add race=off to blockchain workspace

* added issue number and fixed typo
2018-08-16 15:37:53 -06:00
terence tsao
06ca8e758f beacon: Improve Test Coverage for Beacon Chain Package (#402) 2018-08-14 22:49:59 -06:00
Raul Jordan
f3fad7339d
client: Clean Up Client Project, Update Docs, Eliminate Unnecessary Items (#399) 2018-08-14 19:21:49 -06:00
Preston Van Loon
9c764555eb k8s: Kubernetes - Part 2 of ?? (#401) 2018-08-14 11:16:21 -05:00
terence tsao
1f56c4304d
Part 1 of Aligning Core Blockchain Package with Latest 2.1 Spec (#371) 2018-08-13 17:58:37 -07:00
terence tsao
846c1fef3d
Removed Old Configs in Client (#398) 2018-08-13 14:04:03 -07:00
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
terence tsao
b680094e22
Remove Contract Package from Client (#396) 2018-08-12 15:50:42 -07:00
Raul Jordan
d0e863dcc3
client: remove mainchain and syncer package (#395) 2018-08-12 17:32:58 -05:00
Federico Gimenez
dd29481abe Fix beacon-chain/sync Test Race (#390)
* fix beacon-chain/sync test race

* address review comments

* remove unused file

* gazelle

* disable race for client/contracts

* address review comments

* fix conflict

* remove duplicated deps, embed

* remove unneeded file
2018-08-12 16:27:21 -04:00
Raul Jordan
2060d2934e
beacon: Fix Beacon Block Response in Simulator (#394) 2018-08-12 13:20:30 -05:00
Raul Jordan
11397ba9a1
client: Update Proposer to Use Beacon RPC, Remove SMC Dependency (#393) 2018-08-12 12:58:02 -05:00
Raul Jordan
733429ffa1
client: Remove Observer Package from Client (#391) 2018-08-09 18:54:44 -05:00
Raul Jordan
cd90598a90
client: Update Attester to Use Beacon Node RPC, Replacing SMC Completely (#365) 2018-08-09 17:54:59 -05:00
Ivan Martinez
390ac62ed8 Update docs client/beacon-chain wide (#386) 2018-08-09 11:25:48 -07:00
Ivan Martinez
0d0626a101 Add support to pass in TLS key/crt to use gRPC securely (#384) 2018-08-08 15:43:25 -07:00
terence tsao
7aae67a92c Add Join Discord Link in Main Readme (#387)
* sync functions for active and crystallized states

* make pb structure more semantic

* use run func to consolidate to one main routine

* add discord join link

* extra line

* fixed sentnce

* use discord badge
2018-08-08 20:01:24 +08:00
Ivan Martinez
956e040739 Moves flags.go to types and removes utils (#385) 2018-08-07 18:55:04 -07:00
Raul Jordan
2c88b4770f
Added Travis Discord Bot (#383) 2018-08-07 13:46:11 -05:00
terence tsao
7841c53db0 Each Service Should Run a Single Main Routine (#382) 2018-08-07 12:56:28 -05:00
Nishant Das
2cf7fa0174
Check Last Finalized Epoch (#357)
* Adding proto topics

* Adding crystallized state request

* Reverting shanges to proto

* Adding db checks

* get crystallised state

* Finalize epoch for mapping

* more changes

* cleaning up main routine

* adding tests

* fix test

* Adding ability to save blocks

* Adding block fetcher

* Another test for setting finalized epoch

* adding final tests

* finished tests

* adding comments

* gazelle

* Making requested changes

* Fixing lint

* stop sync from exiting

* fixing lint

* lint

* Adding new request type to proto

* Making changes to block/state requests

* Change tests

* fixing error messages

* gazelle and lint

* adding back crystallised state

* fix tests

* Fixing merge conflicts

* Addressing review comments

* Changing back to one service

* removing  case
2018-08-07 20:12:10 +08:00
Preston Van Loon
36965bee5e Testing Codecov (#375) 2018-08-06 22:58:21 -05:00
terence tsao
7a1f5869c2 contracts: Add Solidity Linter to Travis (#376) 2018-08-06 10:12:55 -05:00
terence tsao
bfaa248b39
Refactor Proto Struct to Be More Semantic (#381) 2018-08-05 16:23:31 -07:00
Raul Jordan
ee3e271f21 rem sim (#380) 2018-08-05 15:46:34 -04:00
Preston Van Loon
9c7f2409ce
Fix license (#379) 2018-08-05 11:27:02 -04:00
Ivan Martinez
73f24561c7 Change all struct initializations to be explicit (#374) 2018-08-03 14:31:52 -07:00
Ivan Martinez
0a48b73156 client: Fix duplicate typo in client/README.md (#372) 2018-08-03 09:27:09 -05: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
Mr Fox
4b6f1bf414 client: fix readme sharding-instructions link (#369) 2018-08-02 10:01:11 -05:00
Mr Fox
614c4a6e97 delete useless whitespace (#368) 2018-08-02 19:07:04 +08:00
Raul Jordan
29596bf862
beacon: Beacon Node gRPC Server and Client Services (#364) 2018-08-01 17:08:44 -05:00