Commit Graph

1904 Commits

Author SHA1 Message Date
terence tsao
a19f08f7b6 Attestation Using Head State instead of Latest State (#2156)
* headRoot is a better name

* yay merged with master

* fixed attester server returning incorrect attestation field values

* revert stupid mock changes

* fixed and updated all the tests

* uncomment

* head start should handle skip blocks

* Raul's feedback
2019-04-05 09:41:49 -05:00
Preston Van Loon
9abefc386d Remove redundant assignments request in validator attesting routine (#2166)
* remove redunant assignments request in validator attesting routine

* fix test
2019-04-05 14:29:13 +08:00
Preston Van Loon
83130358a9
Rollback state to handle side chain with skip blocks (#2147)
* Add initial test

* chkpt

* add failing test

* add span to historical state lookup

* use db.HighestBlockSlot()

* fix comment

* update comment

* i wrote a test like a good programmer.

* add test back

* add assertion and unskip test, something new failing tho

* trying to fix test

* remove -1, not sure if i need it yet

* Revert "remove -1, not sure if i need it yet"

This reverts commit 2cfcbb8108b28bb3d7135a993d9053150d5f1e6e.

* save historical state on every save state

* fix hsitorical states

* set historical state in initialize state

* change to a bool

* fix error with empty retrieval of states

* Add missing import

* fix test

* lock in receive block

* remove state generator

* Revert "lock in receive block"

This reverts commit 151b10829d70b2dad3055a8db36d0e1269a853f2.

* Fix Initial Sync Not Processing Canonical Block to Produce Canonical State (#2152)

* fix init sync

* fatal if highest observed root does not match

* proto fields

* Update beacon-chain/sync/initial-sync/service.go

* confirm canonical state root

* fix most tests

* failing test

* fix PR tests

* lint

* no simbackend changes

* logf revert

* add todo

* fix off by one

* fix test with deleted property

* merge #2157

* passing tests :)
2019-04-04 22:39:51 -05:00
Nishant Das
687f797dd8 Post Chainstart Fix (#2158)
* fixed seed and correct epoch

* fix test and add comments
2019-04-04 20:13:49 -07:00
Preston Van Loon
47e631d4ff Update the pending deposits metrics on pruning (#2163)
* update the pending deposits on prune

* use float64 *facepalm*
2019-04-05 10:28:00 +08:00
Preston Van Loon
f670a134a0
More span tags in validator (#2162)
* add more tags to spans when proposing a block

* more stuff tags on attestation span

* add slot
2019-04-04 20:23:48 -05:00
Preston Van Loon
ae4425ac2d add more tags to spans when proposing a block (#2161) 2019-04-04 18:07:15 -07:00
Preston Van Loon
92eeed4c05
Handle skip blocks when fetching justified block for producing attestations (#2160)
* Use DB for fetching justified state

* enhance test
2019-04-04 15:56:20 -05:00
Preston Van Loon
40ade64ffa
don't use c.ctx, use argument ctx instead (#2157) 2019-04-04 08:30:23 -05:00
Preston Van Loon
cdab78e979 Look up justified state from database rather than state block roots (#2154)
* failing test

* passing test
2019-04-03 17:50:35 -05:00
Preston Van Loon
252b2ec3e5 Use db.HighestBlockSlot() for fork choice children reading (#2150)
* use db.HighestBlockSlot()

* fix comment

* update comment

* i wrote a test like a good programmer.
2019-04-03 10:32:59 -05:00
Raul Jordan
eb900a8193
Refactor Initial Sync, Enable Catching Up to Chain (#2111)
* refactor initial sync to prevent reorg infinite loops

* lint

* fixed build

* passing tests

* tests passing

* terence suggestion

* new attempt

* clean up and refactor sync service

* complete the new initial sync logic

* revert head

* init sync working

* config for blockchain receive block

* all works

* builds

* fix a few more tests

* init sync tests pass

* revert scripts

* revert accounts changes

* lint

* lint2

* travis lint

* fix build

* fix single use argument

* any peer

* imports spacing

* imports

* ready for a rolling restart

* add todo

* fork choice in blocks when exiting sync

* readd finalized state root to requests

* successful build

* revert blockchain config

* old config reversion

* initial sync tests pass

* initial sync full test works

* lint

* use the new block processing api

* new proto defs

* init sync functions again

* remove sync polling

* tests fixed

* fixed catching up with chain

* tests pass

* spacing

* lint

* goimports

* add changes

* add lock and conditional to prevent multiple goroutines

* make reg sync synchronous

* add

* fixed the parent block issue

* fix errors in chain service

* tests pass

* check nil block

* typo

* fix nil state

* merge & conflicts

* revert synchronus reg sync

* add more spans to state db

* fix lint

* lint
2019-04-03 10:13:19 -05:00
terence tsao
fa063c85ca
Remove unused service fields (#2139) 2019-04-03 07:59:18 -07:00
Ivan Martinez
89531c1667 Fix bash scripts for initializing beacon-chain (#2080)
* Fix bash scripts for chain

* Fix flag

* Change sendDeposits.go to handle multiple keys

* Fix scripts for startup
2019-04-02 15:45:40 -05:00
Raul Jordan
a057c07830 Reduce State Size (#2144)
* reduce state size

* lint

* fork data

* addressed broken build

* make values 5x slots per epoch

* 5 epochs worth of arrays

* add back slash balances

* rem items

* test

* imports
2019-04-03 02:04:51 +08:00
terence tsao
1a6d2e0114
Efficient logging for attestations (#2146) 2019-04-02 09:54:13 -07:00
Preston Van Loon
8ff30a6620
Add more spans to state db (#2145)
* add more spans to state db

* clone on save too
2019-04-02 11:33:27 -05:00
Preston Van Loon
76e30200fe Pass ctx to saveState (#2141)
* pass ctx to saveState

* add span
2019-04-02 16:49:45 +08:00
Preston Van Loon
ff1a6f0b62 use infura for now (#2140) 2019-04-01 21:41:31 -05:00
Nishant Das
e3c0acfc24 Fixes Panics in Stategen (#2137)
* fix nil blocks

* regression test

* renames
2019-04-01 17:44:26 -05:00
Nishant Das
0355bd8847 Fix Hashing of Beacon Blocks (#2138) 2019-04-01 08:45:15 -07:00
Nishant Das
c8611954f0 remove field (#2136) 2019-03-31 23:04:06 -05:00
terence tsao
142047ec03
limit deposits allowed in block & tests (#2122) 2019-03-31 19:47:38 -07:00
Preston Van Loon
92bad712af
Renovate big update (#2134)
* Update dependency com_github_spf13_cobra to v0.0.3

* Update dependency com_github_allegro_bigcache to v1

* Update dependency com_github_hashicorp_go_multierror to v1

* Update dependency com_github_x_cray_logrus_prefixed_formatter to v0.5.2

* Update dependency com_github_fd_go_nat to v1

* Update dependency com_github_matttproud_golang_protobuf_extensions to v1

* Update dependency com_github_grpc_ecosystem_go_grpc_middleware to v1

* Update com_github_atlassian_bazel_tools commit hash to c7e0fd9

* Update io_bazel_rules_k8s commit hash to e6259a4

* Update io_kubernetes_build commit hash to df02ded

* Update dependency build_bazel_rules_nodejs to v0.27.9

* Update dependency com_github_apache_thrift to v0.12.0

* Update dependency com_google_cloud_go to v0.37.2

* Update dependency org_golang_google_api to v0.3.0

* Update libp2p

* Update dependency com_github_grpc_ecosystem_go_grpc_prometheus to v1
2019-03-31 21:31:53 -05:00
Raul Jordan
7489e52b99
Refactor Chain Service Block Processing API (#2124)
* new block processing api

* fix tests

* lint

* spacing

* Update beacon-chain/blockchain/block_processing.go

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

* fix tests, remove enable powchain
2019-03-31 20:44:16 -05:00
Preston Van Loon
6b3df2f776 Fix max churn bug (#2121) 2019-04-01 00:47:38 +08:00
Preston Van Loon
02f9a56513 Update beacon-chain.deploy.yaml (#2119) 2019-03-30 18:11:34 -07:00
Raul Jordan
7472628c48
Modify p2p Allowed Buffer Size & Batch Block Limit (#2114)
* change batch block size

* imports
2019-03-30 15:43:15 -05:00
Preston Van Loon
f3a2fc64f1 take first validator key (#2116) 2019-03-30 15:13:01 -05:00
terence tsao
e25ec29d17 label (#2117) 2019-03-30 13:49:47 -05:00
terence tsao
5ab9dd3374 Add Validator Stats (#2115)
* add prometheus stats for validators active/exit/slashed....

* better label name
2019-03-30 12:09:24 -05:00
shayzluf
fe247f6cc5 keystore and account support for multi key (#2054)
* keystore and account support for multi key

* fix service issues

* fix Potential file inclusion

* fix Potential file inclusion try2

* Update shared/keystore/keystore.go

remove security detection for file read

Co-Authored-By: shayzluf <thezluf@gmail.com>

* getkeys uses map to pt multiple copies of the same key

* use 12 char of public key to differentiate file names

* use map in test

* fix changes from 2069 into here

* add // #nosec G304
2019-03-29 17:26:41 -05:00
Raul Jordan
5b89da1ce2
Revert "Prevent Reorg Infinite Loops in Initial Sync (#2109)" (#2110)
This reverts commit d0790246a2.
2019-03-29 16:51:58 -05:00
Raul Jordan
d0790246a2
Prevent Reorg Infinite Loops in Initial Sync (#2109)
* refactor initial sync to prevent reorg infinite loops

* lint

* fixed build

* passing tests

* tests passing

* terence suggestion
2019-03-29 13:11:13 -05:00
Ivan Martinez
365a06e709 Fix multiple deposits to the same pubkey pre-chain-start (#2030) 2019-03-28 20:44:27 -07:00
Preston Van Loon
7390a4e585
Update beacon-chain.deploy.yaml (#2105) 2019-03-28 20:03:20 -05:00
terence tsao
4e5c08f2a8
Use a mutex/lock on the validator store (#2104) 2019-03-28 16:19:42 -07:00
terence tsao
c777ce6546
Fix active validator indices for shuffling (#2101) 2019-03-28 15:31:46 -07:00
terence tsao
64508dc3c3
fixed ActiveValidatorIndices for ValidatorPerformance (#2103) 2019-03-28 14:37:59 -07:00
terence tsao
761f3352a0 Fix current epoch committee count (#2099)
* fix current epoch committee count

* prev epoch
2019-03-27 22:10:10 -05:00
Raul Jordan
839845645c
Request Assignments From Canonical Slot Upon Activation (#2097)
* request assignments from the canonical head slot at first

* imports
2019-03-27 20:03:25 -05:00
terence tsao
62ad3dfd61 Fix epoch numbers for logs (#2096)
* fixed loggings

* imports
2019-03-27 15:58:02 -05:00
terence tsao
324a186786 Use justified state as start state for running fork choice (#2093)
* use justified state as start state

* improts
2019-03-27 14:53:43 -05:00
Raul Jordan
79a04cac83
Request Missing Parents Recursively via P2P (#2089)
* request parents recursively begin code

* recursive call

* writing tests for recursively processing child blocks

* tests for parent root requests

* expecting blcoks awaiting processing to be empty after recursive calls

* finishing touches to get tests to pass

* first test pass

* gazelle

* rem outdated test

* tests done

* 50 requested parents recursively pass

* recursive parent fetching depth of 100

* recursive parent fetching depth of 50

* lint

* fix failing test

* fix item

* add db to mock chain
2019-03-27 13:47:05 -05:00
Nishant Das
7029ed109d
Prune Outdated Deposits after Chainstart (#2090)
* disable pending deposits

* Revert "disable pending deposits"

This reverts commit 1525e01602a70737f8688cdbd63a5ce2ab721d92.

* adding new methods

* gazelle and other fixes

* spacing

* spacing

* Update beacon-chain/sync/initial-sync/service.go

Co-Authored-By: nisdas <nish1993@hotmail.com>

* remove comment
2019-03-28 00:15:29 +08:00
terence tsao
4b7d093ea5
Fix ActiveValidatorIndices use slot (#2092) 2019-03-27 08:52:34 -07:00
Preston Van Loon
b477a747fc add slower update to beacon-chain node (#2087) 2019-03-27 09:35:10 -05:00
Nishant Das
40189cb659 Remove Outdated DB Method (#2091) 2019-03-27 07:24:34 -07:00
terence tsao
2f4cddeb28 Enhance Logging for Validator Registration (#2085)
* better logging for validator registration

* gaz

* Update beacon-chain/core/validators/validator.go

Co-Authored-By: terenc3t <terence@prysmaticlabs.com>
2019-03-26 23:22:23 -05:00
Raul Jordan
b2fb22f31f Add EnableCrosslinks Flag Check to CanProcessRegistry Function (#2088)
* registry check with crosslinks feature flag

* gazelle

* fix tests
2019-03-26 22:46:28 -05:00