Commit Graph

196 Commits

Author SHA1 Message Date
Preston Van Loon
c07b9bb456
remove old keystore flag (#1610) 2019-02-15 17:50:25 -05:00
Preston Van Loon
8d67337564
Revert go-bls (#1607)
* revert bc2afa04c6

* Fix workspace

* remove serialize reference

* Remove static
2019-02-15 13:31:07 -05:00
Ivan Martinez
78c205758f Wait Until Halfway Through Slot Duration to AttestHead (#1532)
* Write initial sleep function

* Add fake delay to testing

* Attempt to fix tests

* Fix tests

* Remove stray delay = 0

* Attempt at test

* Changes to tests, removed unneeded code

* Fix delay

* Get further in test

* Fix gomock being stupid

* Fix merge issues

* Fix tests

* Fix tests (!!!)

* Fix goimports

* Fix merge issues
2019-02-15 10:58:06 -06:00
Raul Jordan
37fa839d98
Eliminate Repeated Expensive Operation in Client Tests (#1597)
* no more repeated get key

* no more calls to triple new key

* goimports
2019-02-14 14:51:40 -06:00
Raul Jordan
ae13bb5c83
Use Tree Hashing Algorithm Everywhere for Block Roots and State Root (#1577)
* begin using tree hash instead of hash for state and blocks

* replace with ssz

* rem references to vote cache

* replace all instances of state/block hash with root

* goimports

* almost every test in the world fails

* goimports

* all tests pass, tree hash across repo
2019-02-14 14:04:47 -06:00
Preston Van Loon
65c2fe22cf
Temporarily disable static linking for validator docker image #1582 (#1589) 2019-02-14 08:29:34 -05:00
Raul Jordan
281e5d1cfd
Provide Real Keystore to Validator Service for Public/Private Key Access at Runtime (#1570)
* provide validator with real keystore public key

* fmt

* build errors buildkite

* readd imports removed by goimport

* gazelle

* address broken tests

* make reference to filename a param

* fmt

* imports

* gazelle

* os remove all

* Use better Temp storage for tests

* testmain approach to avoid repeating expensive operation for each test

* travis lint

* fix test

* nokeystore in status test

* passing

* fix goimports
2019-02-13 17:49:06 -06:00
Raul Jordan
b1f1dff8e5
Fetch Initial Assignments at Genesis Slot Post ChainStart (#1574)
* fix test for initial assign

* fmt
2019-02-13 12:27:44 -06:00
Nishant Das
bc2afa04c6 Utilize Go-BLS in Prysm (#1367)
* removing redundant bls package

* gazelle

* battling bazel deps

* workspace

* go-bls works in prysm now

* add func and test

* add test

* fix tests

* edit workspace

* more verbose logs

* lint

* all tests passing

* handle error in keystore
2019-02-11 13:45:06 -05:00
Raul Jordan
3d8bb73f15
Attester RPC Server Functions (#1505)
* initial validator attesthead rewrite based on proposer rewrite

* proceed with fetching committees and tree hashing the canonical head at assigned attester slot

* complete filling the properties of attestation data and all associated root hashes

* add when to attest todo

* finish entire attester client logic

* tests with mocks checked in

* tests passing in client

* stubbed out server implementation

* fixed build due to old property

* regen mocks with new mockgen version

* fixed broken tests

* complete bazel build fix

* address some review comments

* deep proto test

* server implementation logic

* attestation info tests

* completed passing tests, tree hash still blocked by error with nil fields unfortunately

* fix todo failure

* gazelle rerun and master merge

* testing full behavior of attestation info server

* finished all required server tests and implementation

* break loop

* fix tests due to genesis slot updates
2019-02-11 10:15:25 -06:00
terence tsao
e321fdfafa Update to Use Crosslink in AttestationData (#1546)
* fixed epoch_processing

* test p2p

* attestation uses crosslink instead of crosslink root hash

* lint
2019-02-10 11:59:17 -06:00
Raul Jordan
61026103c6
Validator Attester Rewrite (#1487)
* initial validator attesthead rewrite based on proposer rewrite

* proceed with fetching committees and tree hashing the canonical head at assigned attester slot

* complete filling the properties of attestation data and all associated root hashes

* add when to attest todo

* finish entire attester client logic

* tests with mocks checked in

* tests passing in client

* stubbed out server implementation

* fixed build due to old property

* regen mocks with new mockgen version

* fixed broken tests

* complete bazel build fix

* address some review comments

* deep proto test

* tests passing after checking for empty committee and crosslink root

* address nishant comments
2019-02-06 10:20:38 -06:00
Preston Van Loon
4b27b8408b
Fix travis (#1493)
* fix travis

* test 2

* goimports

* Remove unused p2p config

* remove unused var
2019-02-05 10:46:32 -05:00
Preston Van Loon
4add403335
Validator Proposer Rewrite (#1462)
* WIP - with TODOs

* interface w/ test

* basic test for broadcast

* Add computeStateRoot funciton

* remove custody challenge

* resolve TODO lint issues

* more TODOs

* revert new line in types.proto

* broadcaster comment

* one of several failure condition tests

* Add test cases

* handle compute state error test case

* fix config in validator helpers

* fix tests too

* fix conflict

* partial PR feedback

* remove p2p

* gazelle

* package comment

* Better godoc
2019-02-05 08:47:25 -05:00
Raul Jordan
088507af66
Initialize State from ChainStart Deposits in POWChainService (#1474)
* tests passing once again in db package

* fixed all tests

* revert some weird p2p changes made accidentally

* fix repeated code

* build fixed

* fix p2p

* fix all tests
2019-02-03 16:44:48 -06:00
Preston Van Loon
212e9c5268
Fix missing import in validator image (#1469)
* Fix missing import

* force building of manual targets

* Revert "force building of manual targets"

This reverts commit ada170ffa9c3f3592122e6e48372c330e355ac3a.
2019-02-03 09:07:01 -05:00
Raul Jordan
67ae7a3a98
Validator Secret Initialization (#1436)
* begin validator initialization

* utilize keystore

* cli create

* add items

* validator accounts package

* completed tests

* linter

* fix broken build
2019-01-31 12:57:57 +01:00
Raul Jordan
cec6c8de83 Standardize Naming of Shared Packages, Remove Deprecated Packages (#1435)
* rem txpool

* standardize repo shared utils, remove deprecated items

* complete

* package lvl godoc
2019-01-31 10:53:58 +08:00
Raul Jordan
e4337c4b27
cli create (#1439) 2019-01-30 16:24:28 +01:00
Raul Jordan
ec9240106e
Implement WaitForChainStart RPC Server and Client (#1421) 2019-01-30 13:28:53 +01:00
Raul Jordan
07c0387be1
Validator Epoch Assignments RPC Implementation (#1419)
* begin reorder

* move into beacon server

* add proposer server

* fix

* add proposer server

* wrap up rpc reorder

* eliminated deprecated RPC endpoints

* formatted nicely

* RPC protos

* fix lint

* integrate hash proto

* epoch assignments

* deprecated committee code

* remove deprecated messages

* fixed mocks, added tests for validator epoch assignments

* gazelle

* fix broken bazel

* nishant comment
2019-01-29 13:56:14 +01:00
Raul Jordan
4c46b02dac
Deprecating Old RPC Methods (#1410)
* begin reorder

* move into beacon server

* add proposer server

* fix

* add proposer server

* wrap up rpc reorder

* eliminated deprecated RPC endpoints

* formatted nicely

* RPC protos

* fix lint

* integrate hash proto

* autoclean

* deprecate all old code

* include the rest of methods mocks

* bazel run

* lint fixes
2019-01-28 20:41:04 +01:00
Raul Jordan
98a4274b81
Refactor ChainService for Synchronous Tests and ChainStart (#1347)
* can now test blockchain service synchronously

* completed chainstart listener

* fix comment

* completed refactor

* fix

* fix build

* rem genesis fetch

* fix broken

* fixed concurrency bug

* comments
2019-01-28 19:59:37 +08:00
Preston Van Loon
956721fe43 Simplified validator workflow 2 - updateAssignments (#1371)
* Add attestation p2p messages

* first pass refactor

* lint

* viz fix

* comment unused const for now

* Add opentracing spans

* PR feedback

* added updateAssignments implementation

* update proto

* handle error in runner

* only do updates on epoch start

* gazelle

* goimports
2019-01-25 11:26:03 +08:00
Preston Van Loon
0becb6dc01 Simplified validator workflow - first pass (#1362)
* Add attestation p2p messages

* first pass refactor

* lint

* viz fix

* comment unused const for now

* Add opentracing spans

* PR feedback
2019-01-23 10:52:39 +08:00
Preston Van Loon
592c5c3d92 Refactor hashing of beaconblock to shared (#1315)
* Add beacon block hash function

* Refactor/remove old hash method

* gazelle
2019-01-15 00:41:20 +08:00
Preston Van Loon
3398d2ee78 Install prometheus service in the validator node (#1305)
* install prometheus service in the validator node

* simplify
2019-01-12 23:01:11 -08:00
Preston Van Loon
f3ff441875
delete unused clock thing (#1308) 2019-01-12 23:18:55 -05:00
Preston Van Loon
83a31c50b8 Better printing of version number when starting nodes (#1294) 2019-01-11 10:19:58 +08:00
Preston Van Loon
b23ca60efd
Add simple version to binaries via golink (#1286)
* Add version linking to binaries via --workspace_status_command=./scripts/workspace_status.sh

* dont export some things

* lint and better date

* even better date
2019-01-09 23:19:33 -05:00
Nishant Das
09d4c3b25d
Modifying Block Proposals for Validator Clients (#1224)
* adding rpc method

* permissions

* adding functions

* gazelle

* adding new methods

* gomocks and test

* tests again

* new changes

* fix tests

* tests and godoc

* gazelle

* lint

* nosec

* addressing review comments

* addressing more review comments

* fix merge issues
2019-01-10 10:56:26 +08:00
terence tsao
141a8dba87
Reformat Configs for Readability (#1256) 2019-01-05 20:36:05 -08:00
Raul Jordan
7e1af4fceb
Remove Use of Proto .GetX for Value Getters (#1235) 2019-01-04 21:58:19 -06:00
Preston Van Loon
e71a1b2703
Disable race detection on go docker images, use pure=on when there are no c++ deps (#1215) 2018-12-30 22:40:39 -05:00
Preston Van Loon
a901a154dc
Health check endpoints for services (#1183)
* /healthz part1

* lint, fix

* lints and todos

* add p2p status test

* Add test for service registry Statuses

* fix my fake errors for the linter

* Test healthz handler

* Run gazelle
2018-12-30 16:20:43 -05:00
Raul Jordan
5d26efcfaa
Deprecate types.BeaconState with pb.BeaconState Generated Proto (#1164) 2018-12-23 16:51:04 -06:00
Preston Van Loon
10f45744d6
Use gogo protobuf as the protoc compiler (#1165)
* first commit, remote att types

* no more agg attestation proto

* regen mock

* only attestations

* proto

* att process

* fix att references

* more tests passing

* use att protos

* complete

* change visibility

* use gogoprotobu
2018-12-23 15:34:59 -05:00
Raul Jordan
1065617087 Replace Attestation Type Primitive With Proto Generated Type (#1149)
* first commit, remote att types

* no more agg attestation proto

* regen mock

* only attestations

* proto

* att process

* fix att references

* more tests passing

* use att protos

* complete

* Update dependency com_github_deckarep_golang_set to v1 (#1159)

* Update dependency com_github_edsrzf_mmap_go to v1 (#1160)

* Update dependency com_github_go_stack_stack to v1 (#1161)

* Update dependency com_github_rs_cors to v1 (#1162)

* Update dependency in_gopkg_urfave_cli_v1 to v1 (#1163)

* change visibility
2018-12-22 15:30:59 -05:00
terence tsao
121654ff12
Removed Deprecated BeaconBlock Fields (#1035) 2018-12-03 08:10:47 -08:00
Preston Van Loon
8587c637a0 Added flag for p2p port (#968)
* Added flag for p2p port

* Register flag with main

* lint

* Fix flag
2018-11-26 10:54:02 +08:00
Preston Van Loon
0559d01261
Add support for connecting via relay nodes (#827)
* Preliminary support for relay nodes

* lint

* Add comment, remove TODO

* work on relay address factory

* dial relay node, if available

* forgot new files

* fix service registry breakage

* added logging

* Added a peer count with prometheus

* always start mDNS

* fix lint
2018-11-25 11:55:02 -05:00
Mason Mahaffey
b3a0fecd18 ETH 2.0 Design Specs have been moved (#959) 2018-11-23 22:02:35 -10:00
terence tsao
cb65c556d6
Config Updates to Latest Spec (#868) 2018-11-20 17:41:20 -08:00
terence tsao
ebca2984ff fixed duplicated flag and pub key empty bytes (#848) 2018-11-19 15:53:01 -08:00
Andrei Ivasko
85653335f1 Standartize params for BeaconChain and Validator projects (#796)
* Standardize params for BeaconChain and Validator projects

* gofmt

* various changes to bring up to standards

* lint

* linter 2, not sure why travis complains

* revert service_test.go
2018-11-19 00:39:35 +08:00
terence tsao
e1137e5801 Allow Beacon Node to Connect to Bootstrap Node for Peer Discovery (#740)
* start sequence for node to connect to bootstrap nodes

* lint

* maybe warning is more appropiate?

* fix gazelle

* preston's feedback

* add go-ipfs-addr to workspace

* move flag to shared

* removed routed host
2018-11-14 21:25:06 -05:00
Nishant Das
37bc1c67be
Adding Basic Private Key Management (#671)
* adding flags

* adding modified key utils

* adding more funcs

* more changes

* more changes

* documentation

* changes to node

* gazelle

* fixing bazel build

* gazelle

* adding tests

* more tests

* addressing terence's feedback

* adding geth header

* test

* changes

* fixedd it

* fixed marshalling

* adding more to tests

* gazelle

* adding more tests

* lint

* add cov

* cov

* fix imports
2018-11-08 11:22:31 +08:00
terence tsao
8408315f9c switch ethereum 2.0 to ethereum serenity (#714) 2018-11-01 07:02:01 -04:00
terence tsao
80d6c60769 fixed error strings (#708) 2018-10-31 23:05:55 +01:00
Yutaro Mori
7caedbaf27 Miscellaneous Fixes for Demo (#694)
* Various fixes to get code in line with demo

* more fixes
2018-10-23 11:07:43 -05:00
Raul Jordan
19bbcb74c8
Remove Unnecessary Interfaces, Clean Up Some Naming (#678) 2018-10-18 12:33:38 -05:00
Yutaro Mori
8bffae1316 Various cleanup and bugfixes around validator/RBC interaction (#657) 2018-10-14 10:29:57 -05:00
Ivan Martinez
6d46dda33c Make blake2b hash util in shared/ (#649) 2018-10-13 21:32:29 -05:00
Yutaro Mori
b00cdb656a
Cleanup simulator service (#653) 2018-10-13 16:22:36 +09:00
Yutaro Mori
f767b11348
Prevent 0 value for committeesPerSlot in shuffle function (#648) 2018-10-13 14:05:19 +09:00
Nishant Das
c67a084b55 Clean Up Todos and Add in Issue Checker (#640) 2018-10-11 13:52:09 -05:00
Ivan Martinez
7aada81a79 Updates All Usages of keccak256 to blake2b (#642) 2018-10-10 13:36:28 -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
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
Preston Van Loon
6e2b6229fe
Revert "Fixed Sync With Simulator (#588)" (#600)
This reverts commit 085b45626e.
2018-10-01 20:54:45 -04:00
terence tsao
085b45626e Fixed Sync With Simulator (#588) 2018-10-01 14:14:10 -05:00
terence tsao
a03baa8055 Not Include Attestations for Proposer (#587) 2018-09-28 11:18:25 -05:00
Raul Jordan
367aae3bf4
Fix State Recalc in Slot Assignment (#585) 2018-09-27 23:49:29 -05:00
terence tsao
965c6a30cf Add Back Deleted Test and New Logs (#584) 2018-09-27 19:57:09 -05:00
terence tsao
2566687db7
Validator Client Use Assignment Stream to Determine Responsibility (#566) 2018-09-27 14:46:07 -07:00
Raul Jordan
e10baf7c80
Validator Assignment RPC Beacon Node Stream (#563) 2018-09-26 21:34:35 -05:00
Nishant Das
f9a5d277e8
Add Ability for Validator Client to Provide Public Key (#567)
* Adding pubkey to validators

* Adding test

* Addressing Review
2018-09-26 11:27:52 +08:00
Preston Van Loon
5bc324d2f1 Change pubkey from uint64 to bytes (#561)
* Change pubkey from uint64 to bytes

* add the rebuilt proto pb.go
2018-09-24 22:01:26 -05:00
Raul Jordan
78ccea9865 Refactor ValidatorSlot RPC and Casper to Return ValidatorSlotAndResponsibility (#565)
* slot responsibility casper refactor

* fix
2018-09-24 23:18:27 +08:00
Raul Jordan
673c4f840f
Streaming Validator Assignment Service Definition (#554) 2018-09-22 13:19:34 -05:00
Nishant Das
4973144b76 Remove TODO (#557) 2018-09-22 09:14:25 -05:00
Raul Jordan
5c0ee65619
Finished TODO cleanup (#553) 2018-09-21 22:36:38 -05:00
Nishant Das
e9ae09ef4c Fixing profiling and tracing (#550) 2018-09-21 13:35:48 -05:00
Raul Jordan
190a976d3d
Validator Clients Use an Internal Clock to Determine Slot Responsibility (#467) 2018-09-21 09:32:20 -05:00
terence tsao
9d93312e30
Format TODO (#546) 2018-09-20 23:26:51 -07: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
Preston Van Loon
75d32588e0 format and cleanup some TODOs (#544) 2018-09-19 21:14:31 -07:00
terence tsao
ddfe1715c9 RPC methods for Validators to Get ShardID, Index and Slot (#526) 2018-09-17 22:36:09 -04:00
Nishant Das
5a6e5f44fd Validator Client Fix (#254) 2018-09-17 06:13:04 +02: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
Nishant Das
9aced5f145 moving log checks (#509) 2018-09-12 18:43:20 -07:00
terence tsao
861b960ed9
Implement Attester Responsibilities for Demo (#487) 2018-09-11 10:08:31 -07: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
db1138ae1f
Fix p2p issues in #465 (#489) 2018-09-09 18:15:24 -04: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
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
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
1598ae8605
Part 3 of Aligning Beacon Chain with Latest 2.1 - Processing Attestations (#423) 2018-08-24 09:07:23 -07:00
terence tsao
7c8331e9d3
Renamed Client to Validator (#428) 2018-08-22 12:15:21 -07:00