Commit Graph

378 Commits

Author SHA1 Message Date
terence tsao
a05dca18c7
Add spec tests for process_slashing and process_justification_finalization (#3803)
* Add precompute spec tests

* Gazelle
2019-10-18 09:09:38 -07:00
terence tsao
a41ac6b498 Implement ProcessEpochPrecompute (#3798)
* Implemented ProcessSlashingsPrecompute

* Tests for ProcessSlashingsPrecompute

* Gaz

* Lint

* Feature flags

* Hook in ProcessEpochPrecompute

* Hook it to spec test

* Seperate test into it's own package to avoid circular dependency

* Lint

* Gazelle

* Preston's feedback

* Nishant's feedback
2019-10-18 16:38:47 +08:00
terence tsao
aedd38092f Process slashing with precompute (#3797)
* Implemented ProcessSlashingsPrecompute

* Tests for ProcessSlashingsPrecompute

* Gaz

* Lint

* Removed comment
2019-10-18 09:10:41 +08:00
terence tsao
89ef6d6648
Process rewards and penalties with precompute (#3793) 2019-10-17 10:54:03 -07:00
terence tsao
921d0a6e7e
Process justification with precompute (#3792) 2019-10-17 02:24:13 -07:00
terence tsao
2d863a1e63
Methods to precompute process_epoch records (#3788) 2019-10-16 17:48:26 -07:00
terence tsao
a62ac97a35
Type for process epoch optimization (#3783) 2019-10-16 11:26:02 -07:00
Preston Van Loon
86a8ec035c
Aggregation helper improvements (#3789)
* aggregation helper

* lint
2019-10-16 11:11:58 -07:00
terence tsao
9bf55e53e7 Add context and tracing to attestation pool (#3737)
* Test case for overlapping aggregation bits

* Add ctx and tracing for attestation pool and beyond

* No nil

* Use real ctx

* Use real ctx

* Fix test

* Fix test

* Fix test

* Fix test

* Fixed imports
2019-10-09 06:42:17 +08:00
terence tsao
46ecbdc997
Tests for process att with overlapping bits (#3734) 2019-10-08 10:52:07 +09:00
Preston Van Loon
4e22f52ab3 Testnet restart and hotfixes (#3736)
* hotfix for round robin, hotfix for grpc recovery

* gofmt

* break

* wrong subtraction

* lint

* testnet fork version update

* ignore relay / DHT protocol not supported error
2019-10-08 07:59:08 +08:00
Preston Van Loon
23764c4640
Abstract verifySlot to helper package (#3731)
* Abstract verifySlot to helper package

* blocks -> slots

* fix test
2019-10-07 16:15:50 +09:00
terence tsao
750bc83369
Clean up feature flag namings (#3715) 2019-10-07 14:11:49 +09:00
Ivan Martinez
14d9a83cda Add Block Generation Util to testutil package (#3674) (#3709) 2019-10-04 16:07:46 -07:00
terence tsao
273871940c Test code in different packages (#3710)
* Moved a few packagesXXX to test_XXX

* Gaz
2019-10-04 15:41:09 +08:00
Nishant Das
4daf62fc28 Fix Validator Activation (#3684) 2019-10-02 13:26:11 -07:00
Ivan Martinez
8bab55d88e Add Block Generation Util to testutil package (#3674)
* Create block generation util in testutil

* Gazelle

* Fix deps

* Fix imports

* Change tests to use config and fix integer division

* Remove logs

* Fix build

* Add test to ensure finalization occurs

* Add check for finalization

* Add comment for incrementing the state

* Fix test

* Fix tes

* Fix testutil us

* Fix tests

* Change var name

* Add regression test for bug with large validator count

* Fix bazel test
2019-10-02 08:15:40 -07:00
Jim McDonald
323ee8dfac SetupInitialDeposits() now returns deposit data roots (#3683) 2019-10-02 10:50:34 +08:00
Raul Jordan
3d37a4e038
Optimize Domain Data RPC Request (#3671)
* gaz

* fix broken build

* fix broken test

* fix broken test
2019-10-01 09:36:36 -05:00
terence tsao
98f3efffea
Add process block with full attestations test (#3676) 2019-09-30 20:41:51 -07:00
Raul Jordan
8d215feb25
Large Prysm Performance Improvements (#3622)
* skip bls verification with a feature flag at runtime

* gazelle

* more bls mocks

* block roots efficiency

* db block roots now does not show up on the flame graphs

* save validator latest votes batch

* batch save att

* misc improvements to pprof

* import

* include validator index cache

* error if no filter criteria

* resolved comments

* build fix

* lint

* remove delay global

* attestation and block test fixes

* preston suggestions

* fix db tests

* fix missing broken tests

* tests pass
2019-09-30 15:45:53 -05:00
Preston Van Loon
a2a66e7cb7
More instrumentation in state transitions (#3667)
* more instrumentation in state transitions

* gofmt gaz

* more

* more
2019-09-30 11:28:41 -07:00
Preston Van Loon
2dd71c076e Bulk update renovate (#3659)
* Update libp2p

* Update com_google_protobuf commit hash to 97b1802

* Update graknlabs_bazel_distribution commit hash to 962f3a7

* Update io_kubernetes_build commit hash to b6d1648

* Update dependency build_bazel_rules_nodejs to v0.38.0

* Update dependency com_github_paulbellamy_ratecounter to v0.2.0

* Update libp2p

* Update dependency com_github_go_stack_stack to v1

* Update dependency com_github_karlseguin_ccache to v2

* Update dependency com_github_rs_cors to v1

* Update dependency io_k8s_client_go to v12

* Update dependency io_k8s_klog to v1

* Update dependency io_k8s_sigs_yaml to v1

* minor build fixes
2019-09-29 21:54:54 -05:00
terence tsao
5675038e5d
Add active indices functionality to cache (#3629) 2019-09-29 12:10:11 -07:00
terence tsao
4c8269aca3
Part 4 of caching improvement - Use Cache (#3625) 2019-09-27 15:56:08 -07:00
Preston Van Loon
877f596c54
all deposits must be verified (#3624) 2019-09-27 14:18:11 -07:00
Ivan Martinez
ee837ecbb9 Reorganize State Transition Functions (#3589) 2019-09-27 09:54:03 -07:00
terence tsao
14bc8d7637 Part 3 of caching improvement - Update cache (#3617)
* Implemented UpdateCommitteeCache in committee.go

* Implemented test for UpdateCommitteeCache

* Updated test to use mainnet config
2019-09-27 10:43:09 -05:00
Preston Van Loon
f681bc6867 Change pk bytes maps to 48 bytes (#3613)
* change pk bytes maps to 48 bytes

* test
2019-09-27 14:07:36 +08:00
terence tsao
d7891fca88
Part 1 of caching improvement - ShuffledIndices function (#3605) 2019-09-26 16:45:40 -07:00
terence tsao
b8bd28cca2
Move SplitOffset to Sliceutil (#3606) 2019-09-26 16:25:55 -07:00
Raul Jordan
2690c2080d
Implement GetValidatorQueue RPC (#3574)
* changes

* active set change

* helpers for active set changes

* include the helpers in archive service

* table driven tests for helpers

* use from archive

* remove item

* properly use the keys in the response

* test for active set changes

* test passing

* test passing no archive

* archive tests completed

* add ethapis latest commit

* begin implementation get validator queue

* include queue

* finish the queue implementation

* consolidated churn  limit

* pending active testing

* pending active t est

* tests below churn in response

* pubkey

* below  churn  test

* only fetches below the churn  limit

* exit queue churn clip as needed

* full test for  pending active below churn limits

* pending exit test

* pending exit logic

* pending exit below churn test

* all tests done for queue impl

* revert some bad changes

* bug
2019-09-26 16:46:06 -05:00
shayzluf
8f0b131631 Slasher grpc service (#3271) 2019-09-26 09:29:10 -07:00
terence tsao
3ef681e649
Initial sync no verify block (#3586) 2019-09-25 20:32:00 -07:00
terence tsao
fb74dae835
Remove dead cache (#3584) 2019-09-25 18:23:15 -07:00
Raul Jordan
3a890e70f7
Implement Active Set Changes RPC Method (#3568)
* changes

* active set change

* helpers for active set changes

* include the helpers in archive service

* table driven tests for helpers

* use from archive

* remove item

* properly use the keys in the response

* test for active set changes

* test passing

* test passing no archive

* archive tests completed

* add ethapis latest commit

* fix test
2019-09-25 18:06:02 -05:00
Nishant Das
8ce96428b1 Fixes our Attestation Aggregation Issues (#3579) 2019-09-25 07:39:16 -07:00
Nishant Das
0e329fc115 Attestation Server Fix (#3570) 2019-09-24 08:19:37 -07:00
Preston Van Loon
07360bcc07
Write failed blocks to disk (#3569)
* write a failed requested block to disk

* write faile blocks from pubsub too

* gaz
2019-09-23 21:46:40 -07:00
Preston Van Loon
ad47817bcd Only write interop ssz states to disk with flag ON (#3566)
* only write SSZ states to disk with flag on

* lint

* also write blocks
2019-09-23 18:36:12 -05:00
Raul Jordan
b8bdf71d5b
Allow for Fetching RPC Historical Assignments from Archived Data (#3559)
* archive participation begin implementation

* validator participation compute

* comments

* compute participation common func

* full test for archiving data

* gazelle

* complete tests

* gaz

* define archived validator assignment method

* archived assign logic

* need to use compute committee next

* compute archival assignments helper func

* properly compute committee using current shard

* modify the assignments request to take in a query filter item

* more intuitive implementation of list assignments

* utilize the query filter

* complete implementation

* revamp tests

* fixing current tests before adding archive tests

* test now passes using len filtered indices for total size

* include prop index in test

* revert bad change

* use ethapis

* add necessary tests

* comments
2019-09-23 16:04:59 -05:00
Raul Jordan
64795bd231
Utilize Archived Data in GetValidatorParticipation RPC Server (#3526)
* archive participation begin implementation

* validator participation compute

* comments

* compute participation common func

* full test for archiving data

* gazelle

* complete tests

* gaz

* remove double negative grammar in comment

* use archive in rpc

* uses the archive!

* error if nothing found in archive

* comment

* use head fetcher and root

* tests pass

* archive active set changes appropriately

* archive committees

* archive info

* done with committee info archiving

* archived set changes stored

* fix build

* test for archive balances and active indices

* further abstractions

* only archive epoch end

* tests all pass

* tests pass now

* archive done

* test for activated validators

* tests for exited

* amend message

* use different proto

* finalization fetcher

* gaz

* use root

* use ctx

* use new ethapis

* use proper hash

* match apis compatibility

* match apis

* properly use participation

* fix tests

* use right commit
2019-09-23 10:47:34 -05:00
terence tsao
2b2ef4f37c
Added AggregatedAttestation helper (#3539) 2019-09-21 09:43:18 -07:00
Raul Jordan
4ffef61e1d
Archive Validator Participation on End of Epoch Event (#3524)
* archive participation begin implementation

* validator participation compute

* comments

* compute participation common func

* full test for archiving data

* gazelle

* complete tests

* gaz

* remove double negative grammar in comment

* use head fetcher and root

* tests pass
2019-09-19 15:59:23 -05:00
Raul Jordan
49a529388b
Resolve Miscellaneous Prysm TODOs (#3465)
* resolve

* resolve

* return

* remove deprecated protos

* rem deprecated pbs

* resolve cache

* resolve md TODO

* node server

* resolve config todo

* resolve even more

* broken build
2019-09-16 15:45:03 -05:00
terence tsao
c5b4cf7f7d Fixed attesting indices set (#3469)
* Fixed attesting indices set

* Typo

* Regression test

* Comment

* Validator count for tests
2019-09-15 13:54:55 -07:00
Raul Jordan
8887ccdd51 Add Consensus Regression Tests (#3464)
* Start working on adding consensus regression tests

* resolve issues

* table driven tests

* always check equality

* revert

* better naming

* better naming of tests

* build

* resolved

* remove unused deps

* fail on failure
2019-09-13 15:46:35 -07:00
Preston Van Loon
0a0d579822 run minimal tests (#3454) 2019-09-12 14:24:35 -04:00
Nishant Das
3e8a94516d
remove bootstrap node (#3447) 2019-09-12 12:46:16 +05:30
Preston Van Loon
14ed36a41e
Concensus issue on state transition (#3444)
* Add failing test

* remove glob

* remove extra deps

* Use min config for test

* Set for unslashedAttestingIndices

* add comment

* add minimal and manual tag
2019-09-11 19:15:20 -07:00