Commit Graph

2258 Commits

Author SHA1 Message Date
terence tsao
da551f688d Removed extra state root check (#3114) 2019-07-31 12:57:29 -04:00
Nishant Das
57d60d681a Eth1Data VoteCount Fix (#3105)
* change to hashTreeRoot

* remove function and run gaz

* fix panic

* remove cache and add fix

* Revert "remove cache and add fix"

This reverts commit 735986a2db6ba49a0b47611c773e9565f9a82061.

* add back fix

* comment out

* refactor and reg test

* Update beacon-chain/rpc/proposer_server_test.go

Co-Authored-By: terence tsao <terence@prysmaticlabs.com>

* Terence PR feedback
2019-07-31 11:00:31 -04:00
terence tsao
f70d94675b
Fix assignment to advance state up to requested slot (#3112) 2019-07-30 20:47:34 -07:00
Preston Van Loon
3c3e4a2cb5
Add tests for db deposits (#3111)
* add tests for deposits

* fix imports

* gaz

* travis lint
2019-07-30 12:30:07 -04:00
Preston Van Loon
5f4cdd6095
Need to ignore in progress cache while disabled (#3109) 2019-07-30 01:07:18 -04:00
Preston Van Loon
63cf0f07a2 Disable caches, allow toggle via feature flag (#3107) 2019-07-29 20:38:05 -07:00
terence tsao
68f29967f3
Renovate updates in batch (#3103) 2019-07-29 08:23:34 -07:00
Nishant Das
f72f7677b3 Replace Deposit Hash with HashTreeRoot (#3102)
* change to hashTreeRoot

* remove function and run gaz

* fix panic
2019-07-29 08:43:24 -05:00
terence tsao
3fe0933936 Fixed TestRetrieveAttestations_OK test (#3087) 2019-07-27 17:13:00 -05:00
terence tsao
ad82e84503
Updated pseudocode for get_indexed_attestation (#3086) 2019-07-27 14:47:32 -07:00
Nishant Das
fc907261e9
Fix State Root Verification in Sync (#3085)
* remove caches

* use already imported block package
2019-07-28 02:32:13 +05:30
terence tsao
96c32c3865 Implement ListBlocks RPC function (#3084)
* Implemented rpc list blocks

* Tests for list blocks

* lint

* lint
2019-07-27 15:26:28 -05:00
Nishant Das
8cbd1097d7 Fix Signature Verification for Attestations (#3080)
* fix bug and test

* terence's review
2019-07-26 23:18:44 -05:00
terence tsao
956b07f5c1 Implement state transition no verify (#3048)
* Implemented state transition w/o sig verification

* ExecuteStateTransitionNoValidateStateRoot -> ExecuteStateTransitionNoVerify

* Fixed all the tests

* Extra spaces

* Gazelle

* Conflict

* Added start shard cache back

* typos
2019-07-27 00:24:42 +05:30
Raul Jordan
4ebe2fb5b5 Implement AttestationPool and ListAttestations RPC Functions (#3061) 2019-07-26 10:07:20 -07:00
Raul Jordan
40fca7bb2c
Update SSZ Dependency With Tree Hash Cache Enabled (#3076)
* utilize new SSZ

* workspace
2019-07-25 23:49:49 -05:00
Ivan Martinez
ed78f1f406 Require Signature Verification in Randao, Attestations and AttesterSlashings (#3075) 2019-07-25 14:42:13 -07:00
terence tsao
b80d9f4f7f
Implement GetValidatorParticipation RPC function (#3069) 2019-07-25 14:01:18 -07:00
terence tsao
c1eeeef853 Implement ListValidatorAssignments RPC function (#3067)
* Need to sync latest ethereum API, will do it in master

* Added pagination wrapper

* Implemented ListValidatorAssignments

* Finished tests

* Fixed tests

* Raul's feedback

* Fmt

* Pagination test

* Removed extra loggings
2019-07-25 15:45:31 -04:00
Nishant Das
88b715d8f6 Fix Key in Eth1Data Cache (#3074) 2019-07-25 11:26:19 -07:00
Ivan Martinez
e452b46873
Remove Optional Signature Verification for VoluntaryExit and BlockHeader (#3053)
* Remove verifySignatures from ProposerSlashings

* Remove flag from process transfers

* resolve all conflicts

* fix more references to old pbs

* Fix merge conflicts

* Remove verifySignature flag from ProcessBlockHeader

* fx spectest

* Fix test errors

* Fix tests

* Fix tests

* Goimports

* Fix test finally

* Move test helpers to testutil

* Goimports

* Fix imports

* Add tests for new helpers

* Run gazelle

* Fix tests
2019-07-25 13:53:46 -04:00
Preston Van Loon
59253afb96
compare hex/hash bytes instead of strings (#3072) 2019-07-25 10:41:15 -04:00
Preston Van Loon
94a73e847f
Log errors in regular sync (#3070)
* add a error level logging for regular sync

* add a error level logging for regular sync

* add a error level logging for regular sync
2019-07-24 22:29:40 -04:00
Preston Van Loon
7d47be84ed
Template based protobuf parameters for ssz configurations (#3062)
* WIP on build time configuration changes

* add ssz_minimal tests

* split up spec tests into mainnet and minimal, skip any minimal test that are failing without --define ssz=minimal

* lint

* add commentary to ssz_proto_library
2019-07-24 22:03:05 -04:00
Preston Van Loon
f58afa62af
fix docker image builds (#3068) 2019-07-24 15:19:44 -04:00
blacktemplar
9f2543267e Ignore deposits with invalid signatures instead of throwing error (#3011)
* errors in signatures of deposits lead to ignoring the deposit instead of error (by spec)

* add appropriate error log for invalid signature in process deposit

* Small comment improvement

Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>

* improved log

Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>

* adds three unit tests for skipping deposits with invalid and uncompressed signatures and one for successfully performing a process deposit with a valid signature (inclusive signature checking)

* fix panics, still test failures

* adapts tests to use testutil

* add forgotten dependencies

* reordering imports according to goimports
2019-07-24 14:55:40 -04:00
Nishant Das
590aaaf370 Fix Batched Block Response (#3012) 2019-07-24 07:53:38 -07:00
terence tsao
17576af752
Implement GetValidators gRPC server (#3054) 2019-07-23 19:36:35 -07:00
Justin Page
9d0e9fa77d Improve sorted indices check in blocks package (#3060) 2019-07-23 18:17:47 -07:00
terence tsao
41e55a6902
Sync with latest eth api definitions (#3059) 2019-07-23 14:33:25 -07:00
Raul Jordan
930e992e85
Include Stubs for All Beacon Chain Server RPC Methods (#3058)
* add most rpc method stubs

* include all stubs

* use unimplemented error code
2019-07-23 15:29:13 -05:00
Raul Jordan
a2caba9956
Optimize Sparse Merkle Trie (#3056)
* calc tree from leaves simpler

* fast generate proof

* align api to be the same

* ensure tests pass

* err condition

* travis

* fix build

* zero hashes work
2019-07-23 14:17:39 -05:00
Preston Van Loon
be514076c1 Remove optional verify signatures argument when verifying deposits (#3052)
* remove optional verification of deposit signatures

* use minimal config for easier setup

* progress

* progress

* Fix a few test errors

* Fix more of tests

* fix imports, gazelle

* fix rpc package

* fix blocks package

* fixed state test

* fixed powchain tests

* add comments

* remove todo

* Update beacon-chain/rpc/validator_server_test.go

Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>
2019-07-23 22:19:14 +05:30
Raul Jordan
5374350a1c
Standardize Flags at Top Level and Remove Deprecated Utils (#3046)
* move shuffling to core

* remove old utils

* move flags to top level

* package lvl comment removal

* fix up references to flags

* revert node.go

* revert p2p_config.go

* revert main.go

* revert validator node.go

* revert validator main.go

* add flags pkg

* viz

* goimports
2019-07-23 08:58:20 -05:00
terence tsao
d42fab070d Implement ListValidatorBalances gRPC server (#3050)
* Implemented ListValidatorBalances in beacon chain server

* Fmt

* Tests

* Spacings

* goimports

* Apply suggestions from code review, thanks Raul!

Co-Authored-By: Raul Jordan <raul@prysmaticlabs.com>

* Update beacon-chain/rpc/beacon_chain_server.go

Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>
2019-07-22 21:49:47 -05:00
Raul Jordan
b06876d698
Implement Node gRPC Server (#3049)
* add node server

* stub implementations

* node server impl

* gaz

* only missing genesis info now

* fmt imports

* all tests pass

* fmt

* revert change

* punctuation

* use internal err code

* view permission

* using real reflection

* spacing

* lint
2019-07-22 21:19:55 -05:00
Preston Van Loon
6a930ba175 Remove optional verifyTree argument (#3047)
* remove optional verifyTree argument

* remove fmt

* do not provide a default eth1data, return an error instead

* add a test for this new logic

* gaz
2019-07-22 16:47:11 -05:00
Ivan Martinez
1d71398b7c Remove VerifySignatures Flag From ProposerSlashings and Transfers (#3009)
* Remove verifySignatures from ProposerSlashings

* Remove flag from process transfers

* resolve all conflicts

* fix more references to old pbs
2019-07-22 14:25:32 -05:00
Raul Jordan
8cfbf0309d
Resolve Proto Lint Issues (#3044)
* skip proto lint

* golang ci lint no -t flag

* regenerate protos to match schema

* move to compatibility folder

* build file compatibility

* foo
2019-07-22 14:10:17 -05:00
Preston Van Loon
d5dcc25472 Nogo fix for mac (#3043) 2019-07-22 07:39:37 -07:00
terence tsao
1b5b8a57e0 Remove unused proto schemas (#3005)
* Update io_kubernetes_build commit hash to 1246899

* Update dependency build_bazel_rules_nodejs to v0.33.1

* Update dependency com_github_hashicorp_golang_lru to v0.5.1

* Update libp2p

* Update io_bazel_rules_k8s commit hash to e68d5d7

* Starting to remove old protos

* Bazel build proto passes

* Fixing pb version

* Cleaned up core package

* Fixing tests

* 6 tests failing

* Update proto bugs

* Fixed incorrect validator ordering proto

* Sync with master

* Update go-ssz commit

* Removed bad copies from v1alpha1 folder

* add json spec json to pb handler

* add nested proto example

* proto/testing test works

* fix refactoring build failures

* use merged ssz

* push latest changes

* used forked json encoding

* used forked json encoding

* fix warning

* fix build issues

* fix test and lint

* fix build

* lint
2019-07-22 10:03:57 -04:00
Preston Van Loon
c8e8e84c60
Renovate updates (#3040)
* Update libp2p

* Update com_github_gogo_protobuf commit hash to dadb625

* Update com_google_protobuf commit hash to 9857d63

* Update graknlabs_bazel_distribution commit hash to 9aec688

* Update io_bazel_rules_k8s commit hash to 68aa778

* Update io_kubernetes_build commit hash to f85734f

* Update dependency bazel_gazelle to v0.18.1

* Update dependency bazel_skylib to v0.9.0

* Update dependency com_github_burntsushi_toml to v0.3.1

* Update dependency com_github_google_go_cmp to v0.3.0

* Update dependency com_github_googleapis_gnostic to v0.3.0

* Update dependency com_google_cloud_go to v0.43.0

* Update dependency in_gopkg_inf_v0 to v0.9.1

* Update dependency io_bazel_rules_docker to v0.8.1

* Update dependency org_golang_x_text to v0.3.2

* Update dependency com_github_davecgh_go_spew to v1

* Update dependency com_github_google_btree to v1

* Update dependency com_github_json_iterator_go to v1

* Update dependency com_github_modern_go_reflect2 to v1

* Update dependency com_github_peterbourgon_diskv to v3

* Update dependency in_gopkg_d4l3k_messagediff_v1 to v1

* Update dependency org_golang_google_grpc to v1

* revert broken updates

* revert gazelle, annoying warnings
2019-07-22 01:56:58 -04:00
skillful-alex
4bb5160817 added forgotten CertFlag flag processing (#2988) 2019-07-21 17:12:31 -04:00
Preston Van Loon
365580706b
Ethereum APIs compatibility test (#3010)
* update some k8s deps

* merge

* fix build sizes

* Add test for compatability for upstream protos

* Add test for compatability for upstream protos

* Add test for compatability for upstream protos

* add field name check

* passing test
2019-07-21 16:20:09 -04:00
terence tsao
fd22f73d1f Sync eth v1alpha1 with upstream (#3013)
* Updated protos

* regen
2019-07-21 16:07:31 -04:00
Preston Van Loon
db5549f143
update some k8s deps (#3008)
* update some k8s deps

* merge

* fix build sizes
2019-07-21 15:34:36 -04:00
terence tsao
4a422b13f0
Schema of BeaconBlockHeader has an extra column (#3004) 2019-07-21 10:20:13 -07:00
Ivan Martinez
acf1ebff2d
Implement Proposer Signature (#2973)
* Implement Proposer Signatures

* Remove logging flag

* Create verifySignature and verifySigningRoot

* Clean up logs

* Fix

* Remove log

* Fix test
2019-07-21 11:29:35 -04:00
Preston Van Loon
4a4316eb95
Add rule to push docker images (#3006)
* touch readme

* whatever

* Add docker_push to actually push the images

* revert readme

* revert pb.go
2019-07-20 20:40:03 -04:00
Preston Van Loon
cc696d90e3 Docker: use container bundles to upload multiple image tags (#3003)
* use docker tag from environment, if exists

* use container bundles to upload multiple image tags
2019-07-19 21:55:09 -07:00