Commit Graph

962 Commits

Author SHA1 Message Date
Nishant Das
9aced5f145 moving log checks (#509) 2018-09-12 18:43:20 -07:00
terence tsao
a630abae59
Dynasty Transition During Block Processing (#498) 2018-09-11 20:17:20 -07:00
Preston Van Loon
366124991b Allow users to use 0x prefix for their pubkey (#500) 2018-09-11 18:55:05 -07:00
terence tsao
861b960ed9
Implement Attester Responsibilities for Demo (#487) 2018-09-11 10:08:31 -07:00
Mohammad Mahdi Jahanara
6095243f2a added --rpc flag to geth command. (#496) 2018-09-10 22:52:02 -07:00
Yutaro Mori
f312c013fc beacon-chain: Refactor Beacon Chain To Simplify Block Processing (#473) 2018-09-11 07:09:41 +02:00
Preston Van Loon
78c763368b Update rules_go, bazel_gazelle, and go-ethereum to Support Go 1.11 (#490)
* Update rules_go, bazel-gazelle, and go-ethereum to support go 1.11

* gazelle
2018-09-10 23:14:29 +02:00
Preston Van Loon
ab3c0efdba
Add MacOS to travis CI (#491)
* cleanup bazel install script, bump to 0.16.0, add osx to build/test

* add osx as a different entry in the build matrix

* reorganize build matrix
2018-09-09 22:50:04 -04:00
Preston Van Loon
db1138ae1f
Fix p2p issues in #465 (#489) 2018-09-09 18:15:24 -04:00
Ivan Martinez
d4e8de95d8 Change IndicesForSlots to ShardsAndCommitteesForSlots (#481)
* Change IndicesForSlots to ShardsAndCommitteesForSlots

* Capitalize function properly
2018-09-09 11:05:36 +08:00
terence tsao
b0f5ef0da0
Save Attestation and AttestationHashes to DB (#472) 2018-09-08 18:52:18 -07:00
terence tsao
d4209b7357 beacon: Process Crosslink During Cycle Transition (#482)
* Revert "Add Skip Coverage Condition in Coverage.sh (#416)"

This reverts commit 72a5dd1cf4.

* add coverage.sh back

* save attestations to db

* added tests

* use them in service.go

* process crosslink records

* revert

* revert

* revert

* test
2018-09-08 17:20:06 +02:00
terence tsao
6ba5758a56
Add Shasper Videos to Readings Markdown (#484) 2018-09-08 07:12:53 -07:00
terence tsao
8897ddaa6b
Fixed Broken Markdown links (#483) 2018-09-08 06:50:21 -07:00
Raul Jordan
ee91be2c4a
validator: Implementing Partial Implementation of Proposer Responsibility (#441)
* implementing basic proposer functionality

* checked in gomocks

* fix typo

* refactor using feeds

* use event feeds for assignment

* sending the latest beacon block over announcement chan

* 100 coverage, using feeds

* gazelle

* include parent hash from prev canonical block and slot number + 1

* including all other prop fields

* fix build

* proposer rpc method tests, implemented in beacon chain side

* godoc
2018-09-04 23:35:32 -04:00
terence tsao
fe3c647c45
Skip Block if Attestation is Bad (#455) 2018-09-04 16:18:55 -07:00
Nishant Das
42d93812ce beacon: Implement Sync Handler for Block Requests By Slot Number (#461)
* Persist Dag

* Add schema

* Add new message

* add mapping

* Adding check to save block

* Removing blocks mapping

* Make changes to block processing

* Change from mapping to a slice of hashes

* Adding tests to core

* adding more tests

* Fixing service test

* Add comments and fix bazel

* fix lint

* fix conflicts

* addressing review comments

* Removing references to active

* fixing tests with active state

* Protytype for #440: Persist blocks and latest state in DB

* simplify code

* removing block registry

* fix test

* adding block removal/iterator

* Addressing review comments

* Addressing comments

* Adding block request

* removing extra line

* making vars private and adding canonical key

* fix lint

* splitting methods

* adding more changes

* lint

* improving coverage

* removing decodeslotnumber

* Able to search for and send blocks

* adding core tests

* adding tests

* adding documentation

* addressing raul's comments

* lint and gazelle

* addressing yutaro's comments

* improving coverage

* improve coverage

* improving  coverage
2018-09-04 10:48:07 -04:00
Yutaro Mori
6acf9d9db5
remove unused code (#462) 2018-09-02 13:46:42 -04:00
Nishant Das
4891f68929
Persist Blocks and State in DB (#440)
* Persist Dag

* Add schema

* Add new message

* add mapping

* Adding check to save block

* Removing blocks mapping

* Make changes to block processing

* Change from mapping to a slice of hashes

* Adding tests to core

* adding more tests

* Fixing service test

* Add comments and fix bazel

* fix lint

* fix conflicts

* addressing review comments

* Removing references to active

* fixing tests with active state

* Protytype for #440: Persist blocks and latest state in DB

* simplify code

* removing block registry

* fix test

* adding block removal/iterator

* Addressing review comments

* Addressing comments

* removing extra line

* making vars private and adding canonical key

* fix lint

* splitting methods

* adding more changes

* lint

* improving coverage

* removing decodeslotnumber

* gazelle

* remove todos

* addressing preston's comments

* remove slotnumber

* lint
2018-09-03 00:44:03 +08:00
terence tsao
8ce739adfb Add LastJustifiedSlot in Crystallized State Field (#454)
* Revert "Add Skip Coverage Condition in Coverage.sh (#416)"

This reverts commit 72a5dd1cf4.

* add coverage.sh back

* new justifiedSlot field in crystallized state

* test coverage
2018-09-02 14:34:29 +08:00
Raul Jordan
4937da5c7d
Update Documentation + Create a Subproject for Important Markdown Docs (#451)
* add docs folder for markdowns

* create scripts project, move readmes

* update all docs

* fix travis
2018-09-01 21:25:06 -05:00
Ivan Martinez
d30d81a608 Rename all mentions of height to slot (#456)
#442
2018-09-01 12:01:53 -04:00
Yutaro Mori
f0abbf6f26
Refactor Validator Shuffling Logic (#444)
* Refactor and fix bugs for validator shuffling logic

* fix lint errors

* fixes

* address pr comments

* comments

* typo

* fix tests

* better readability

* gofmt
2018-08-30 22:55:52 -04:00
terence tsao
366e5168ba
Initialize New Cycle during Block Processing (#443) 2018-08-29 16:21:15 -07:00
terence tsao
9be495dc1f Add Casper/Sharding/Beacon Chain FAQs to Readmes (#446)
* Revert "Add Skip Coverage Condition in Coverage.sh (#416)"

This reverts commit 72a5dd1cf4.

* add coverage.sh back

* add casper/sharding faqs to readmes
2018-08-29 14:42:51 -04:00
Preston Van Loon
b02042dbe9 shared: Split P2P Topics And Introduce Middleware (Adapters) (#421) 2018-08-29 11:32:54 -05:00
Yutaro Mori
5adc94b2ae Include 2.1 spec in READINGS.md (#445) 2018-08-28 21:42:30 -07:00
terence tsao
f37a59d2f8
Part 5 of Aligning Beacon Chain with Latest 2.1 - Block Vote Cache (#436) 2018-08-28 17:55:56 -07:00
Yutaro Mori
c6ca2f44d3 Fix contracts/README.md links (#433) 2018-08-25 14:11:07 -06:00
terence tsao
6389877154
Part 4 of Aligning Beacon Chain with Latest 2.1 - Bootstrapping Genesis (#430) 2018-08-25 11:59:46 -07:00
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