Commit Graph

2479 Commits

Author SHA1 Message Date
Nishant Das
3e8a94516d
remove bootstrap node (#3447) 2019-09-12 12:46:16 +05:30
Nishant Das
273b917319
Allow Separate Ports for Different Transports (#3414)
* update workspace

* change to new version

* gaz

* set keys

* try more things

* finally fixed all tests

* fix bootnode

* Update beacon-chain/p2p/discovery.go

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

* preston's and raul's review

* add http server

* add tool

* add image

* change comment

* add multiaddr comment

* lint

* cosmetic changes

* fix docker

* remove dep

* preston's requested changes

* new flags

* add support for separate tcp port

* fix refs

* change tcp port
2019-09-12 10:22:27 +05:30
Raul Jordan
e0e3dada7b
Abstract Usage of Deposit Cache Into Interface (#3443)
* deposit cache refactor begin

* use interface for has chain  started

* use deposit fetcher interface instead

* use moar interfaces

* comment

* gaz

* fix breaking build

* lint

* implement chainstart fetcher

* allow start to work

* fix broken tests
2019-09-11 23:30:04 -05:00
Preston Van Loon
8ff289fe1a
Antoine sent me a patch instead of a PR /shrug? (#3446) 2019-09-11 20:51:14 -07:00
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
Preston Van Loon
ccece73483
Use the raw bytes, not the libp2p protobuf container for sepc256k1 private keys (#3445)
* use the raw bytes, not the libp2p protobuf container for sepc256k1 private keys

* fix tests
2019-09-11 17:04:35 -07:00
terence tsao
798bbbdc82 Cold start for interop (#3437)
* coldstart flags for validator

* WIP beacon node flags

* wip beacon chain, flag fix in validator, arg fix in validator

* checkpoint

* Added interop service

* working on mock chainstart

* save the state lol

* fix tests

* Save genesis validators

* gaz

* fix validator help flags

* WaitForChainStart actually waits for genesis time

* cold start fixes

* cache

* change back

* allow for genesis state too

* remove logs

* increase mmap size

* dont process if head doesn't exist

* add 10ms tolerance

* enable libp2p debug at debug, fix pubsub

* works with checkpt

* initialize justified and finalized in db

* Removed preloadStatePath from blockchain service

* Clean up

* Write to disk for now post state

* revert b466dd536f8eadbdae2264a545a755370223d917

* Builds

* Only RPC test fails now

* use minimal config, no demo config

* clean up branch

* Lint

* resolve lint

* more lint fixes

* lint

* fix viz

* Fixing RPC test

* skip before epoch 2

* RPC time out

* Fixed ordering

* rename

* remove some dbg statements

* ensure index is correct

* fix some panics

* getting closer

* fix tests

* Fix private key

* Fixed RPC test

* Fixed beacon chain build for docker

* Add interop.go to validator go_image

* Fixed docker build

* handle errors

* skip test, skip disconnecting peers

* Fixed docker build

* tolerance for attestation processing

* revert copy

* clearer err message parse

* fix launching from dep contract
2019-09-11 13:38:35 -05:00
Nishant Das
b4975f2b9d
Read P2P Peer Key Properly (#3442)
* fix conflict

* fix conflict

* gaz

* fix test

* gaz
2019-09-11 20:28:23 +05:30
shayzluf
1edeb8ec4c Beaconblock over wire (#3436) 2019-09-10 10:24:14 -04:00
Preston Van Loon
3708a8f476 Add tool and script for interop testing (#3417)
* add tool and script for interop testing

* identity

* lint

* merge upstream, fix conflict, update script, add comment

* add comma separated support for --peer=

* remove NUM_VALIDATORS, comma fix

* WIP docker image

* use CI builder

* pr feedback

* whatever antoine says

* ignore git in docker

* jobs=auto

* disable remote cache

* try to cache the golang part

* try to cache the golang part

* nvm

* From Antoine with love

* fix
2019-09-09 17:31:19 -04:00
Raul Jordan
af07c13730
[Interop] Improve RPC Codebase + Start Beacon Chain With Mock ETH1 Values (#3407)
* add main.go

* interop readme

* proper visibility

* standardize and abstract into simpler funcs

* formatting

* no os pkg

* add test

* no panics anywhere, properly and nicely handle errors

* proper comments

* fix broken test

* readme

* comment

* recommend ssz

* install

* tool now works

* README

* build

* readme

* 64 validators

* rem print

* register the no powchain flag

* work on mock eth1 start

* common interface

* getting closer with the interface defs

* only two uses of powchain

* remove powchain dependency

* remove powchain dependency

* common powchain interface

* proper comment in case of flag

* proper args into rpc services

* rename fields

* pass in mock flag into RPC

* conforms to iface

* use client instead of block fetcher iface

* broken tests

* block fetcher

* finalized

* resolved broken build

* fix build

* comment

* fix tests

* tests pass

* resolved confs

* took them out

* rename into smaller interfaces

* resolve some confs

* ensure tests pass

* properly utilize mock instead of localized mock

* res lint

* lint

* finish test for mock eth1data

* run gazelle

* include flag again

* fix broken build

* disable powchain

* dont dial eth1 nodes

* reenable pow

* use smaller interfaces, standardize naming

* abstract mock into its own package

* faulty mock lint

* fix stutter in lint

* rpc tests all passing

* use mocks for operations

* no more mocks in the entire rpc package

* no  mock

* viz

* testonly
2019-09-09 17:13:50 -04:00
Preston Van Loon
8d234014a4
Fix broadcast ssz (#3423)
* add two types of encoding/decoding ssz

* fix tests

* lint

* lint
2019-09-08 19:34:52 -07:00
Preston Van Loon
4dad28d1f6
Accept a filepath for bootnode ENR address (#3422)
* accept a filepath for bootnode ENR address

* fix
2019-09-08 19:05:28 -07:00
Ivan Martinez
5e939378d0 Update to spec v0.8.3 (#3355)
* Ignore latest messages in fork choice prior to latest justified

* Make sure Compact Committee Roots isn't changed by process_final_updates

* WIP add attestation bitfields length to match committee length

* Begin work on updating spec tests to 0.8.2

* WIP set up for new spec test structure

* Fix slashings

* Get mainnet tests mostly passing for attestations and attester slashings

* Fix process attestation test

* Undo change

* Complete spec tests for all operations
Still need sanity block tests

* Fix BLS sigs

* Reduce amount of reused code in core/blocks/spectests/

* Fix tests

* Update block sanity tests to 0.8.2

* Update epoch spec tests to 0.8.2

* Clean up all tests and fix shuffling/epoch tests

* WIP update bls tests to 0.8.2

* WIP update bls tests to 0.8.3

* Finish BLS spectest update to 0.8.3

* Fix shuffling spec tests

* Fix more tests

* Update proto ssz spec tests to 0.8.3

* Attempt to fix PrevEpochFFGDataMismatches test

* Goimports

* Fix documentation

* fix test

* Use custom general spec tests

* Reduce code footprint

* Remove unneeded minimal skip

* Fix for comments

* Fix for comments

* Fix test

* Small fixes

* Cleanup block spec tests a bit

* Undo change

* fix validator

* Fix validator tests

* Run gazelle

* Fix error output for epoch spec tests
2019-09-08 12:41:52 -07:00
Preston Van Loon
d94522510f add outfile support (#3421) 2019-09-08 23:38:46 +05:30
Raul Jordan
adc27a0bc2 Update WORKSPACE With Latest SSZ (#3416) 2019-09-08 12:58:22 -04:00
terence tsao
a3c3a72e72
Chang flag name to interopXXX (#3418) 2019-09-08 09:29:23 -04:00
terence tsao
4235980511 Clean up post --next (#3411)
* Delete old code

* RPC mock testing

* Fixed BUILD

* Conflict

* Lint

* More lint
2019-09-06 22:39:14 -04:00
Nishant Das
fb20fc7881 change to wrap (#3413) 2019-09-06 14:01:59 -07:00
Nishant Das
171e5007c5
Update Discv5 to the Latest Version (#3392)
* update workspace

* change to new version

* gaz

* set keys

* try more things

* finally fixed all tests

* fix bootnode

* Update beacon-chain/p2p/discovery.go

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

* preston's and raul's review

* add http server

* add tool

* add image

* change comment

* add multiaddr comment

* lint

* cosmetic changes

* fix docker

* remove dep

* preston's requested changes
2019-09-07 00:50:20 +05:30
terence tsao
56a395a297
Add /heads page (#3410) 2019-09-05 20:04:25 -07:00
Marius Kjærstad
b133bced26 Updated how-prysm-works link in README.md (#3412)
Updated how-prysm-works link in README.md
2019-09-05 18:29:54 -07:00
terence tsao
14c59b2ff9 Remove deprecated services and --next (#3371)
* Save new validators in DB

* Use info

* Add total validator count

* Fixed tests

* Add new test

* Revert light client config

* Add state metrics back

* Gaz

* Mark old ones as deprecated

* Deprecate not --next services

* Fixed all operation tests

* Fixed node test

* All tests passing locally

* Add deprecated-p2p back, blocked by boostrap-query

* Revert message proto

* delete deprecated DB items

* delete all other instances of old db

* gaz

* cycle rem

* clear db
2019-09-05 11:04:06 -05:00
terence tsao
75bce9b7e1
Align metrics to interop (#3406) 2019-09-05 08:32:35 -07:00
terence tsao
c383b6a30c Load ssz formatted genesis state (#3408)
* Preload ssz genesis state

* Log
2019-09-04 17:32:38 -05:00
Raul Jordan
75c0b01932
Genesis State Generator + Interop Docs (#3405)
* add main.go

* interop readme

* proper visibility

* standardize and abstract into simpler funcs

* formatting

* no os pkg

* add test

* no panics anywhere, properly and nicely handle errors

* proper comments

* fix broken test

* readme

* comment

* recommend ssz

* install

* tool now works

* README

* build

* readme

* 64 validators

* rem print
2019-09-04 13:47:44 -05:00
Preston Van Loon
b0e6d7215c
Tracing: Add additional attributes (#3404)
* Add some attributes for tracing

* gaz
2019-09-03 20:03:09 -07:00
Preston Van Loon
b6e0d700ec
PubSub: Check messages received from self, do not double process (#3403)
* Check messages received from self, add them to the store

* tests

* fmt
2019-09-03 17:22:15 -07:00
Preston Van Loon
0a61c379a5
Rename / move logic about updating validator indices (#3402)
* rename, move

* pr feedback
2019-09-03 13:57:08 -07:00
terence tsao
6614816061
Log the slot of the block w/o parent (#3401) 2019-09-03 13:43:59 -07:00
terence tsao
60c048a0ec
Remove lock from store struct (#3400) 2019-09-03 13:14:23 -07:00
Preston Van Loon
5ec629af71 remove unnecessary lock (#3399) 2019-09-03 12:53:18 -07:00
Preston Van Loon
399f704bf5
Initial Sync: report healthy before chain started (#3388)
* Return error while syncing

* chainStarted
2019-09-03 11:25:20 -07:00
Preston Van Loon
8f342cc5bb
fix some parent context usage, add tracing to p2p handlers (#3395) 2019-09-03 11:06:35 -07:00
Raul Jordan
8ce8717676
Fix Prysm Deposit Formatting (#3394)
* proofs with proper size

* getting to the root of the problem, no pun intended

* add regression test and fix proofs

* debugging the receipt root

* debug

* fixed spec tests

* fixed up proofs!

* tests all pass
2019-09-03 12:47:47 -05:00
Preston Van Loon
90b2a880c6 Add /p2p page (#3391)
* add /p2p page

* fix tests
2019-09-03 11:07:40 -05:00
Preston Van Loon
d23ba8e69d
Temporarily ban peer if it fails to connect (#3390)
* temporarily ban peer if it fails to connect

* hotfix for handshake
2019-09-02 18:10:58 -07:00
terence tsao
b52f32d17c Clean up configs (#3389) 2019-09-02 17:13:33 -07:00
Preston Van Loon
b1a102fd1d Return error while syncing (#3386) 2019-09-02 14:36:14 -05:00
Raul Jordan
da630f349f
Add Test for Aggregating Large Amount of Attestations (#3358)
* test for verifying large amount of agg sigs

* agg sgi could not verify

* 128 fails

* confirmed works for 512

* comprehensive test for handle att

* commented test

* fix up test

* include the proper wait group

* concurrency managed to reproduce verification bug

* concurrent test passes

* revert config changes

* use new db in operations tests

* debugging for the special attestations

* resolve tests

* fmt
2019-09-02 13:49:37 -05:00
Nishant Das
c412dde3bd add flag (#3383) 2019-09-02 11:23:07 -07:00
terence tsao
250e911faa Mega renovate updates (#3382)
* Update dependency build_bazel_rules_nodejs to v0.36.2

* Update dependency com_github_prometheus_procfs to v0.0.4

* Update libp2p

* Update dependency com_github_grpc_ecosystem_go_grpc_prometheus to v1
2019-09-02 10:41:39 -07:00
renovate[bot]
510184c9cc Update libp2p (#3379) 2019-09-02 10:41:15 -07:00
shayzluf
b32c19a004
Slasher db (#3270)
* first version of the watchtower api

* first commit

* remove watchtower

* working version

* fix < 0

* gaz

* Update slasher/db/db.go

* remove clear history

* moved constant to config

* gaz

* feedback changes

* compare uint64

* add constant config

* PruneSlasherStoragePeriod change
2019-09-02 18:36:29 +03:00
Nishant Das
34a163b110 fix logging (#3384) 2019-09-02 06:29:59 -07:00
Nishant Das
876e0ea84d Fix Discv5 in Runtime (#3373)
* fix bug

* remove logs

* fix test

* add locks

* add ttl

* Apply suggestions from code review

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

* change to ccache
2019-09-01 15:29:58 -07:00
terence tsao
25dbc5ea85
Add back state metrics (#3369) 2019-09-01 08:37:38 -07:00
Preston Van Loon
a4ac23160a
Bootnode: Print private key at debug (#3372)
* print private key at debug

* fix docker deps
2019-08-31 20:05:36 -07:00
terence tsao
146b611dc8
Use rough time for checking attestation is not from future epoch (#3370) 2019-08-31 13:18:31 -07:00
terence tsao
ca2a55874c
Save new validator index in DB (#3367) 2019-08-30 21:43:18 -07:00