Commit Graph

39 Commits

Author SHA1 Message Date
Raul Jordan
bdec3f4740
Discard Block With Slot Lower Than LastFinalizedSlot (#679) 2018-10-18 14:21:46 -05:00
Yutaro Mori
c00a1d3132 Replace LevelDB with Bolt (#666) 2018-10-17 01:11:24 -05:00
Yutaro Mori
1f00cfe23e
Replaced HasStoredState with IsSyncedWithNetwork (#662) 2018-10-16 07:22:15 +09:00
Yutaro Mori
8bffae1316 Various cleanup and bugfixes around validator/RBC interaction (#657) 2018-10-14 10:29:57 -05:00
Yutaro Mori
b00cdb656a
Cleanup simulator service (#653) 2018-10-13 16:22:36 +09:00
Yutaro Mori
d1eefa5cc7 Use consistent hash formatting (#650) 2018-10-12 08:35:49 -07:00
terence tsao
efeb6976d1
Align Block and State Field Names with Spec (#628) 2018-10-09 19:34:50 -07:00
Raul Jordan
cd2073e84f
Cleanup and Refactor Shared Package (#634) 2018-10-09 00:58:54 -05:00
Yutaro Mori
ce99bd7605 Refactor to Create DB Package (#582) 2018-10-05 13:14:50 -04:00
Preston Van Loon
8bcddf5fdc
Migrate dependencies on @com_github_ethereum_go_ethereum//event (#601)
* Add go-ethereum's event and

* remove swp file

* goimports

* remove unused code

* fix gazelle
2018-10-02 21:49:01 -04:00
terence tsao
d5bf733948 Fixed Simulator Can't get ParentSlot (#602) 2018-10-02 13:34:26 -05:00
terence tsao
1aeb0e6b10 Part 1 of Attestation Service - [sync -> blockchain -> rpc] (#548)
* Revert "Add Skip Coverage Condition in Coverage.sh (#416)"

This reverts commit 72a5dd1cf4.

* add coverage.sh back

* beginning sig aggregation routine

* fixed errors

* fixed existing tests

* merged master

* add attestation build.bazel

* private visibility

* tests for attestation service

* lint

* bazel gazelle

* add validator beacon file

* lint

* tests for sync service

* removed tmp.go

* bazel gazelle
2018-09-24 09:22:09 +08:00
Raul Jordan
5c0ee65619
Finished TODO cleanup (#553) 2018-09-21 22:36:38 -05:00
Raul Jordan
419cff2512
--Dev Mode Flag for Local Demo/Development (#537) 2018-09-21 16:02:17 -05:00
Divyank Katira
2a51ed3f39 P2P Message Execution Tracing (#517)
* Request execution tracing initial commit

* Resolve linter issues

* Run gazelle

* Make trace sampling configurable, clean up, update doc

* Document trace span creation

* Fix linter issue
2018-09-20 07:46:35 -04:00
terence tsao
b4e57489af Fixed Bugs for Proposer Attestation (#539) 2018-09-19 10:23:26 -04:00
Raul Jordan
4bc2176898
Refactor Block Processing + UpdateHead to Use Slot Numbers (#474) 2018-09-18 09:06:28 -04:00
Preston Van Loon
3c264be1c1
Clean up some p2p related TODOs (#521)
* Remove error checking for type assertions on p2p messages. The code should fail earlier in the p2p layer. Also fixed format on some TODOs

* format TODO again

* Add a bit more tests for p2p stuff

* goimports on feed_mock

* remove unused import
2018-09-16 14:02:53 -04:00
Nishant Das
cddae7a306
Implement RPC Messaging Between Validators (#475)
* Adding Proto files

* Move to shared package

* adding attestation sub

* gazelle

* attestation check

* proposal finished

* Add in attesters responsibilities

* fixing dependency issues

* adding topics

* refactoring tests

* Adding more tests

* adding more changes

* gazelle

* removing attester p2p

* remove mock

* changing to new proposer model

* changing tests

* making changes

* gazelle

* adding gomock

* adding rpc methods, reverting changes to other proto files

* gazelle and test changes

* adding tests

* adding mocks and tests

* gazelle

* fixing merge issues

* lint

* lint
2018-09-16 09:12:36 +08:00
terence tsao
ae84cfcfa2
Implement Proposer Attestation Check for Block Validity (#508) 2018-09-15 07:51:17 -07:00
terence tsao
593c1ec9fc Filled in ContainsBlock for Blockchain Service (#512)
* Revert "Add Skip Coverage Condition in Coverage.sh (#416)"

This reverts commit 72a5dd1cf4.

* add coverage.sh back

* filled in contains block to not always return false

* fixed lint

* lint
2018-09-13 23:24:18 +08:00
Preston Van Loon
db1138ae1f
Fix p2p issues in #465 (#489) 2018-09-09 18:15:24 -04: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
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
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
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
1f56c4304d
Part 1 of Aligning Core Blockchain Package with Latest 2.1 Spec (#371) 2018-08-13 17:58:37 -07:00
Ivan Martinez
390ac62ed8 Update docs client/beacon-chain wide (#386) 2018-08-09 11:25:48 -07: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
terence tsao
bfaa248b39
Refactor Proto Struct to Be More Semantic (#381) 2018-08-05 16:23:31 -07:00
terence tsao
c9f1bfc19c
Simulate Epoch Transition (#361) 2018-08-01 08:24:55 -07:00
terence tsao
2c4bfeeef0
sync functions for active and crystallized states (#358) 2018-07-31 18:13:54 -07:00
Raul Jordan
13a011ce5f
proto: Structure Protos for Beacon and for Sharding (#359) 2018-07-31 13:54:45 -05:00
Raul Jordan
cccd675a84
beacon: Initial Sync Network Simulator (#341) 2018-07-30 23:41:27 -05:00
Yutaro Mori
9c9aef8194
Eliminate test only methods on types.Block (#350) 2018-07-31 00:45:44 +09:00
terence tsao
9853f53cc1 beacon: Quick Fix on Typo (#346) 2018-07-29 21:20:20 -04:00
Preston Van Loon
9cf375267e Add Security Linter: gosec (#343) 2018-07-28 20:44:24 -04:00
Raul Jordan
9ab02849b6
beacon: Initial Beacon P2P Protobufs, Subscriptions (#327) 2018-07-28 15:53:02 -04:00
Yutaro Mori
09ca832a5f beacon: Beginning the Sync Service for the Beacon Chain (#322) 2018-07-25 11:57:44 -05:00