Commit Graph

2781 Commits

Author SHA1 Message Date
terence tsao
81c53c26fb Update run time to v0.9 (#3935)
* Update seed domains (#3872)

* Remove Transfers (#3870)

* Remove active index roots and compact committee roots (#3869)

* Update inclusion reward (#3886)

* Alter proposer selection logic (#3884)

* Fix early committee bias (#3888)

* Remove shards and committees (#3896)

* Epoch spec tests v0.9 (#3907)

* Block spec test v0.9 (#3905)

* rm'ed in protobuf

* build proto

* build proto

* build proto

* fix core package

* Gazelle

* Fixed all the tests

* Fixed static test

* Comment out spec test for now

* One more skip

* fix-roundRobinSync (#3862)

* Starting but need new seed function

* Revert initial sync

* Updated Proposer Slashing

* Fixed all tests

* Lint

* Update inclusion reward

* Fill randao mixes with eth1 data hash

* Test

* Fixing test part1

* All tests passing

* One last test

* Updated config

* Build proto

* Proper skip message

* Conflict and fmt

* Removed crosslinks and shards. Built

* Format and gazelle

* Fixed all the block package tests

* Fixed all the helper tests

* All epoch package tests pass

* All core package tests pass

* Fixed operation tests

* Started fixing rpc test

* RPC tests passed!

* Fixed all init sync tests

* All tests pass

* Fixed blockchain tests

* Lint

* Lint

* Preston's feedback

* Starting

* Remove container

* Fixed block spec tests

* All passing except for block_processing test

* Failing block processing test

* Starting

* Add AggregateAndProof

* All mainnet test passes

* Update deposit contract (#3906)

* Proto spec tests v0.9 (#3908)

* Starting

* Add AggregateAndProof

* Unskip block util tests (#3910)

* rm'ed in protobuf

* build proto

* build proto

* build proto

* fix core package

* Gazelle

* Fixed all the tests

* Fixed static test

* Comment out spec test for now

* One more skip

* fix-roundRobinSync (#3862)

* Starting but need new seed function

* Revert initial sync

* Updated Proposer Slashing

* Fixed all tests

* Lint

* Update inclusion reward

* Fill randao mixes with eth1 data hash

* Test

* Fixing test part1

* All tests passing

* One last test

* Updated config

* Build proto

* Proper skip message

* Conflict and fmt

* Removed crosslinks and shards. Built

* Format and gazelle

* Fixed all the block package tests

* Fixed all the helper tests

* All epoch package tests pass

* All core package tests pass

* Fixed operation tests

* Started fixing rpc test

* RPC tests passed!

* Fixed all init sync tests

* All tests pass

* Fixed blockchain tests

* Lint

* Lint

* Preston's feedback

* Starting

* Remove container

* Fixed block spec tests

* All passing except for block_processing test

* Failing block processing test

* Starting

* Add AggregateAndProof

* All mainnet test passes

* Unskip block util tests

* Slot processing spec test V0.9 (#3912)

* Starting

* Add AggregateAndProof

* Unskip slot processing mainnet test

* Unskip minimal spec test for finalization (#3920)

* Remove outdated interop tests (#3922)

* Rm outdated interop tests

* Rm test runner

* Gazelle

* Update validator to use proposer slot (#3919)

* Fix committee assignment (#3931)

* Replace shard with committee index (#3930)

* Conflict

* Clean up (#3933)

* Remove shard filter in db (#3936)

* Remove lightouse compatibility test (#3939)

* Update Committee Cache for v0.9 (#3948)

* Updated committee cache

* Removed shuffled indices cache

* Started testing run time

* Lint

* Fixed test

* Safeguard against nil head state

* address edge case

* add test

* Fixed TestRoundRobinSync by doubling the epochs

* Unskip TestProtoCompatability (#3958)

* Unskip TestProtoCompatability

* Update WORKSPACE

* Fix minimal config (#3959)

* fix minimal configs

* fix hardcoded value in test

* Simplify verify att time (#3961)

* update readme for deposit contract, regen bindings for vyper 0.1.0b12 (#3963)

* update readme for deposit contract, regen bindings

* medium

* Check nil base state (#3964)

* Copy Block When Receiving it From Sync (#3966)

* copy block

* clone for other service methods too

* Change logging of Bitfield  (#3956)

* change logging of bits

* preston's review

* Unskip Beacon Server Test (#3962)

* run test till the end

* fix up proto message types

* fmt

* resolve broken tests

* better error handling

* fixing new logic to use archived proposer info

* fix up logic

* clip using the max effective balance

* broken build fix with num arg mismatch

* amend archive

* archival logic changed

* rename test

* archive both proposer and attester seeds

* page size 100

* further experiments

* further experimentation, archivedProposerIndex seems wrong

* test passes

* rem log

* fix broken test

* fix test

* gaz

* fix imports

* ethapis
2019-11-11 17:03:43 -05:00
terence tsao
62aaec1e20 RPC checks sync status (#3968)
* Check for sync status

* Tests
2019-11-11 10:29:27 -06:00
Nishant Das
cc18b2f4d3 Handle Runtime Error Type (#3954) 2019-11-09 05:53:20 -08:00
Nishant Das
a938c305b4 Do Not Reject Attestations in Genesis Epoch (#3955) 2019-11-08 08:09:07 -08:00
Preston Van Loon
b87d0abc6c Fix finalized block root index (#3950)
* progress on fixing #3947

* upsert after, but only if not already exists

* return an error in some case

* format

* handle case where there has not been any finality yet

* it works

* remove todo

* use variable with comments

* regression test

* revert off by one issue, fix tests

* rename receiver

* @nisdas pr feedback
2019-11-08 11:00:46 +08:00
terence tsao
768c2bd812
Block validator from getting assignment until beacon node is sync'ed (#3953) 2019-11-07 17:59:11 -08:00
Nishant Das
c8b8c6165d Dont Process Old Blocks And Attestations (#3925)
* reject old objs

* reject old attestation

* add equality

* fix formatting

* add equal check for source

* fix and add tests

* change debug log
2019-11-07 14:17:00 -05:00
terence tsao
db866e6580 Pass db to init sync (#3946) 2019-11-06 14:56:12 -06:00
shayzluf
b50f1583f3 Store Validators Min and Max Spans for Slashing (#3941)
* store validator min max span

* terence feedback

* terence feedback

* raul feedback

* raul formatting feedback

* raul formatting feedback

* raul validatorIdx feedback

* fix

* shorter err

* Update slasher/db/min_max_span.go

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

* Update proto/eth/v1alpha1/slasher.proto

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

* Update slasher/db/min_max_span.go

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

* Update slasher/db/min_max_span.go

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

* Update slasher/db/min_max_span.go

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

* Update slasher/db/min_max_span.go

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

* Update slasher/db/min_max-span_test.go

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

* Update slasher/db/min_max-span_test.go
2019-11-06 14:08:20 -06:00
mkinney
0be4e6fed8 Fix grpc port for docker (#3945)
* do not die if user does not have git installed

* should not listen on just localhost for grpc
2019-11-06 13:01:08 -06:00
mkinney
e9bd530221 do not die if user does not have git installed (#3944) 2019-11-06 13:41:06 -05:00
Raul Jordan
67cf86ad5e
workspace edit (#3942) 2019-11-06 11:35:06 -06:00
Alex Nebotov
5a789fca4a Added the panic capture so that information about panic gets into the log file (#3877)
* Added the panic capture so that information about it gets into the log file

* Printf -> Errorf

* Update validator/main.go  "run time" -> "Runtime"

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

* Update beacon-chain/main.go    "run time" -> "Runtime"

Co-Authored-By: Raul Jordan <raul@prysmaticlabs.com>
2019-11-06 10:18:51 -06:00
Preston Van Loon
295b3a74e9 Use camel case JSON (#3928) 2019-11-06 09:58:54 -06:00
Preston Van Loon
d35c5db260 Update go-ssz (#3929)
* update from https://github.com/prysmaticlabs/go-ssz/pull/96

* proper updates
2019-11-06 09:40:31 -06:00
shayzluf
9c1e3c260a store validator public keys (#3927) 2019-11-05 07:54:27 -06:00
Preston Van Loon
371f808aa4
bump fork version (#3926) 2019-11-05 01:05:42 -05:00
Nishant Das
8df65c1bcc
Update Eth-API To The Latest Version (#3924)
* update to latest

* update to PR

* update to latest
2019-11-05 11:59:40 +08:00
Nishant Das
6b6273fec1
Modify RPC Methods To Handle ETH1Failure (#3915)
* refactor powchain config

* send mock eth1 votes when proposing blocks

* fix all tests

* lint

* fix all tests

* fix blockchain test

* Apply suggestions from code review

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

* raul's review

* add warning

* new changes

* add connection method

* some more cleaning up

* change commit to latest

* fix mocks

* Update beacon-chain/powchain/service.go

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

* preston's review

* remove debug log

* fix test

* fix more tests

* fix more tests

* one more test

* more tests fixed
2019-11-05 11:00:51 +08:00
Nishant Das
6e90931837
Handle Missing Blocks (#3880)
* add fixes

* more changes

* simplify the solution

* add shuffle

* remove prom metric

* add to mock

* go doc

* use non default source

* add test

* terence's review

* all tests passing
2019-11-05 10:37:18 +08:00
Raul Jordan
bf49fa3c26
Update Latest EthereumAPIs (#3916)
* include the ethereumapis changes

* new ethapis
2019-11-04 09:05:59 -06:00
mkinney
d4e7e15e50 Docker rpc (#3868)
* move name before docker image; add info on how to start gRPC

* updates on how to run beacon from docker
2019-11-04 08:37:23 -06:00
Preston Van Loon
7d1633230d Feature gate all caches (#3894) 2019-11-03 17:20:08 -08:00
Nishant Das
db26c0d012 Hardcode Domain Version For Compute Domain (#3876)
* hardcode domain version to zeroed byte array

* remove todo

* gazelle
2019-11-03 18:37:01 -05:00
terence tsao
2b0acffe7f Set it to 3 (#3857) 2019-11-03 18:18:52 -05:00
Jim McDonald
485fc538c3 Utility to parallelise functions over arrays (#3813)
* Initial version of scatter

* Add mutex for scatter batch

* Provide mutex to worker processes

* Embed mputil

* Add notes on scatter

* Tidy-up

* Add mutex test

* Simplify scatter for users

* Tidy-ups/code coverage

* Gazelle update

* Add benchmark

* Mutex to RWMutex

* Add test against internal functions

* Bazel fixes

* Fix benchmark

* Benchmark values to constants

* Update shared/mputil/scatter.go

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

* Update shared/mputil/scatter.go

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

* Moved struct to top of file

* Add featureconfig for scatter

* Gate scatter behind feature flag

* Lint fixes

* fmt
2019-11-03 16:25:52 -05:00
Raul Jordan
be1b90d511
Fix ListValidatorBalances RPC API (#3846)
* begin by adding pagination

* utilize pagination properly for balances

* db addition

* latest balances test

* completed tests

* fix pagination tests

* all tests passing

* ethapis compatibility

* proper handling if no filters specified
2019-11-02 17:03:35 -05:00
Nishant Das
8977e5088e Handle ETH1 Node Failure (#3914)
* refactor powchain config

* send mock eth1 votes when proposing blocks

* fix all tests

* lint

* fix all tests

* fix blockchain test

* Apply suggestions from code review

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

* raul's review

* add warning
2019-11-02 14:56:03 -05:00
Preston Van Loon
cc16a10a33
Remove --enable-finalized-block-root-index (#3887)
* Deprecated do not use

* remove finalized block indexing feature flag

* remove flag some more

* dont rollback a managed tx

* require blocks to be in a chain in tests
2019-11-02 14:57:35 -04:00
Nishant Das
103bdfc688 Use ETH1 Block To Determine Genesis State (#3911)
* use eth1Block to determine genesis state

* add proto file

* fix test

* fix test
2019-11-01 15:10:05 -05:00
Nishant Das
ab92326dfb set bool correctly (#3913) 2019-11-01 09:48:24 -05:00
mkinney
da6c270d46 report git commit and date on local build (#3904)
* report git commit and date on local build

* switch to using time package
2019-11-01 13:47:30 +08:00
Preston Van Loon
86cd873e67
Add span and annotate errors for validating beacon attestations (#3861)
* Add span and annotate errors for validating beacon attestations

* fix test
2019-10-31 18:32:22 -04:00
Nishant Das
49e0ddf861 Cache Skipped Slots (#3879)
* use LRU cache on skip slots

* add a metric

* gaz

* more metrics

* temporary log

* added more logging

* fix

* only update, if its higher than the cache

* only update, if its higher than the cache

* increase the cache size, just in case

* split cache related stuff into its own file

* add feature flag

* clean up

* add new test

* make test proper

* godoc

* preston's review
2019-10-31 13:38:51 -04:00
mkinney
9ca95530fa allow passing no,prompt,force options to clear-db (#3871)
* allow passing no,prompt,force options to clear-db

* ensure the node test runs ok

* remove clear-db option and add force-clear-db; remove no longer needed file

* add clear-db option back; force-clear-db overrides

* add clear-db option back to usage

* revert to only using --clear-db
2019-10-31 17:55:32 +08:00
shayzluf
a29032c2bf
Fix indexed attestations Slasher store (#3897)
* first version of the watchtower api

* service files

* Begin work on grpc server

* More changes to server

* REnames and mock setup

* working test

* merge

* double propose detection test

* nishant review

* todo change

* gaz

* fix service

* gaz

* remove unused import

* gaz

* resolve circular dependency

* resolve circular dependency 2nd try

* remove package

* fix package

* fix test

* added tests

* gaz

* remove status check

* gaz

* remove context

* remove context

* change var name

* moved to rpc dir

* gaz

* remove server code

* gaz

* slasher server

* visibility change

* pb

* service update

* gaz

* slasher grpc server

* making it work

* setup db and start

* gaz

* service flags fixes

* grpc service running

* go imports

* remove new initializer

* gaz

* remove feature flags

* change back SetupSlasherDB

* fix SetupSlasherDB calls

* define err

* fix bad merge

* fix test

* fix imports

* fix imports

* fix imports

* add cancel

* comment stop

* fix cancel issue

* remove unneeded code

* bring back bad merge that removed TODO

* remove use of epoch as am input

* fixed slasher to be runable again

* wait for channel close

* gaz

* small test

* flags fix

* fix flag order
2019-10-31 12:59:13 +05:30
shayzluf
82de66bb90 slasher grpc server (#3786)
* first version of the watchtower api

* service files

* Begin work on grpc server

* More changes to server

* REnames and mock setup

* working test

* merge

* double propose detection test

* nishant review

* todo change

* gaz

* fix service

* gaz

* remove unused import

* gaz

* resolve circular dependency

* resolve circular dependency 2nd try

* remove package

* fix package

* fix test

* added tests

* gaz

* remove status check

* gaz

* remove context

* remove context

* change var name

* moved to rpc dir

* gaz

* remove server code

* gaz

* slasher server

* visibility change

* pb

* service update

* gaz

* slasher grpc server

* making it work

* setup db and start

* gaz

* service flags fixes

* grpc service running

* go imports

* remove new initializer

* gaz

* remove feature flags

* change back SetupSlasherDB

* fix SetupSlasherDB calls

* define err

* fix bad merge

* fix test

* fix imports

* fix imports

* fix imports

* add cancel

* comment stop

* fix cancel issue

* remove unneeded code

* bring back bad merge that removed TODO

* fixed slasher to be runable again

* wait for channel close

* gaz

* small test

* flags fix

* fix flag order

* remove flag
2019-10-31 11:26:55 +08:00
Preston Van Loon
b2b48c2a4d
Extract state from db (#3889) 2019-10-30 19:05:37 -04:00
Preston Van Loon
5f79abd828 Safer panic handler (#3892)
* safer panic handler

* safer panic handler
2019-10-30 15:40:39 -07:00
Preston Van Loon
1b1e994a80
Set committee assignment deadline to 1 epoch (#3902)
* set deadline to epoch end

* fix vis
2019-10-30 18:35:02 -04:00
Preston Van Loon
fbc31dc99b validator client side grpc metrics (#3903) 2019-10-30 15:30:10 -07:00
Nishant Das
2785a6d5ee
move out of go-routine (#3883) 2019-10-30 13:32:53 +08:00
Preston Van Loon
2b444ea954 Add feature flag to enable shuffled index cache (#3893)
* add feature flag to enable shuffled index cache

* gaz'
2019-10-30 10:26:05 +08:00
Preston Van Loon
ae89cce593 Deprecated do not use (#3882) 2019-10-30 01:28:41 +08:00
Preston Van Loon
749f4b776b
Add flag deprecation (#3881)
* add deprecated flags

* move flags to their own list

* gofmt

* more warning
2019-10-29 11:30:14 -04:00
Preston Van Loon
0481eb4872
Track finalized block root index and filter in blocks by range (#3873)
* checkpoint progress

* feature flag and test

* return true if feature flag is not on

* add lint msg

* rollback tx if failure

* Revert validator/BUILD.bazel
2019-10-29 11:14:17 -04:00
Nishant Das
f1627c0b67 Make No Genesis Delay the Default (#3878) 2019-10-29 07:31:10 -07:00
terence tsao
3d1b69e945
Inclusion rewards are based off previous epoch (#3855) 2019-10-28 22:39:16 -07:00
Nishant Das
f8c870aa91
Fix Failure Counter (#3850)
* fix bug

* return if not ok

* don't set peer status there

* fix build

* fix test

* fix all other tests

* add regression test

* cosmetic changes
2019-10-29 13:23:55 +08:00
Alex
094f1974be fix-roundRobinSync (#3862) 2019-10-28 15:29:33 -04:00