terence tsao
b1334c6120
Revert "Reverts RPC Disabling ( #2435 )" ( #2468 )
...
This reverts commit e16f1e1533
.
2019-05-02 09:17:45 -04:00
terence tsao
38da4a5cd4
Add Forkchoice Tie Breaker ( #2459 )
2019-05-01 10:18:56 -07:00
Raul Jordan
05336e16e0
Querier Polls Forever Until 1st Response ( #2458 )
...
* revert changes to protos
* typo
2019-05-01 12:10:39 -05:00
terence tsao
de6ea81790
Recent Block Roots RPC API ( #2455 )
...
* add metrics for corret participation rate
* gaz
* add recent canonical roots API
* gaz
* all tests passed
* comments
* fmt
2019-05-01 10:14:46 -05:00
Raul Jordan
aa74b1dca3
Various Logging Improvements ( #2454 )
2019-04-30 14:55:59 -07:00
Raul Jordan
acf2d0699c
Fixed HasAnyValidators to Fallback to Looking Into the BeaconState ( #2453 )
2019-04-30 14:18:16 -07:00
terence tsao
a015056332
Add metric for correctly attested rate ( #2452 )
...
* add metrics for corret participation rate
* gaz
2019-04-30 16:06:31 -05:00
terence tsao
d453b0f199
fixed typos ( #2444 )
2019-04-30 14:55:14 -05:00
terence tsao
7a7b4e55c9
prevent validator exit reentrance ( #2443 )
2019-04-29 16:25:31 -07:00
terence tsao
22fa595665
Prune Atts One Epoch Older ( #2442 )
...
* prune atts > one epoch old
* use VerifyAttestation instead
* added test to prune invalid att
* space
* added ctx
* fixed existing tests
* gaz
* gazelle
* update filter for pruning atts
* gaz
2019-04-29 15:45:04 -05:00
terence tsao
bff774de32
Operation service prunes invalid attestation ( #2439 )
...
* prune atts > one epoch old
* use VerifyAttestation instead
* added test to prune invalid att
* space
* added ctx
* fixed existing tests
* gaz
* gazelle
2019-04-29 15:03:28 -05:00
Raul Jordan
aa80c308ce
Save Deposit to DB Even If Fails to Deserialize ( #2440 )
...
* include bad deposits in the db
* fmt
* Update beacon-chain/powchain/log_processing.go
Co-Authored-By: rauljordan <raul@prysmaticlabs.com>
* lint
* comment
2019-04-29 14:50:18 -05:00
terence tsao
63998b92aa
Add and Use Truncate Hash Library ( #2417 )
...
* add truncate lib
* use trunc
* spaces
2019-04-29 13:11:51 -05:00
Nishant Das
c288af5e9b
Continue Processing Invalid Deposits ( #2437 )
...
* fix for pending deposits
* add regression tests
2019-04-29 09:54:55 -05:00
terence tsao
4a90f82bcc
Fix Validator Ejection for Testnet ( #2438 )
...
* set ejection threshold and add gauge
* spaces
* gaz
2019-04-29 09:39:31 -05:00
Nishant Das
e16f1e1533
Reverts RPC Disabling ( #2435 )
...
* make changes
* more changes
2019-04-29 08:23:24 -05:00
Raul Jordan
63633a3bee
Enable Historical State Pruning By Default ( #2433 )
...
* disable historical state pruning
* imports
* lint
2019-04-29 10:53:03 +08:00
Nishant Das
52250c9e7a
Fix Fork Choice Reorg Conditions ( #2413 )
...
* make fixes
* change condition
* comment
* fixed up a few var names for clarity
* added test for isDescendant
* chain split reorg test
* interface for atts service
* comprehensive reorg regression test added
* space
* all tests pass
* target handler
* ci lint
* Update beacon-chain/sync/receive_block.go
Co-Authored-By: rauljordan <raul@prysmaticlabs.com>
2019-04-28 17:53:51 -04:00
Raul Jordan
dcc2250e82
Use HTTP for On Demand Block Requests ( #2405 )
...
* use http instead of websocket for on demand block fetching
* use http
2019-04-27 14:45:13 -05:00
Nishant Das
cd302e88c2
Fix Block Processing And UpdateChainHead ( #2399 )
...
* fix block processing
* add in defer
* do not update chainhead
* save historical states from all blocks, so that fork choice can retrieve it
* revert changes
* make new changes
* remove forkchoice at the end
2019-04-27 14:36:53 -05:00
Preston Van Loon
210edfc940
P2P handshake handling ( #2306 )
...
* proto: illegal wireType 7 :(
* set addr to todo for now so somethign gets sent
* push latest progress
* Add feedback from @raulk. Stream never connects
* working handshake handler
* add exclusions for relay/bootstrap node
* fix tests, still need to add new ones
* remove race, fails coverage
* Add test for negotiation
* gazelle
* regen pb
* Update shared/p2p/handshake_handler.go
Co-Authored-By: prestonvanloon <preston@prysmaticlabs.com>
2019-04-27 14:08:27 -05:00
terence tsao
7a04af7621
Use Withfields for Forked Block ( #2394 )
...
* use with fields for forked block
* spacing
2019-04-27 12:08:15 +08:00
Raul Jordan
81c8b130c6
Only Sync With the Peer With the Highest Observed Slot ( #2280 )
...
* only accept the highest finalized slot from peers
* use best peer for state requests
* peer id
* rem old tests
* req peers tests pass
* warn level support for peer not having the same protocol
* pretty
* best peer
* comments
* req peers done
* tests passing
* fully functional
* enforce receiving from the best peer
* comments
* lint fixes
2019-04-26 10:18:43 -05:00
frederickalcantara
a170c69653
upgrading linter from gometalinter to golangci-lint ( #2100 )
...
* upgrading linter from gometalinter to golangci-lint
* fixed golangci-lint linting
* removed linting before_script command
* removed disable-all command
* Fixed golang config file
* fixed golang config file v2
* removed gosec issue rule
* formatting
* fixed travis build to run golangci-lint
* Add install golangci-lint command
* fixing golangci-lint script
* removed https://
* Added golangci-lint cmd script
* added go get for local lint install
* created a before_script
* add install before script
* Added get script
* added go mod download
* removed go mod downloads
* changed
* removed before script
* Added before script go get lint
* added exit zero to see what went wrong
* removed golang run script
* removed before script
* change lint command
* verbose output
* removed verbose
* change linter enable and disable configuration
* Update .golangci.yml
Removed gotype as a linter
* Update .golangci.yml
Added typecheck linter
* Update .golangci.yml
Added fixed lint version
* Update .golangci.yml
Added gotype
* Update .golangci.yml
Added typecheck
* removed env:lint
* Added env lint
* fixing lint upgrade
* Changing travis configuration
* FIxed spelling errors
* disabled typecheck
* Enabled typecheck
* remove binary
* Deleting lib binary
* adding more linters
* fixed constants
* fix spelling
* fixed all lint issues
* Revert "Changing travis configuration"
This reverts commit 334afe9d05e96261b01f275aa3ada20e7f36aac4.
* Merge branch 'master' of https://github.com/prysmaticlabs/prysm into update-linter
* Changed from Infof to Info
* Fixing commits
* fixing commits with linter config
* added install
* Fixing
* fix log statement
2019-04-26 14:24:01 +08:00
Nishant Das
09083b072c
add log ( #2390 )
2019-04-26 13:15:53 +08:00
Nishant Das
89600e8978
Remove Duplicated Functions in the Slice Package ( #2389 )
...
* remove duplicated funcs
* lint
* remove duplicated tests
2019-04-26 12:31:27 +08:00
Raul Jordan
2318a53fa5
Lock Down the ReceiveBlock Function ( #2387 )
...
* lock down receive block
* imports
2019-04-25 23:06:16 -05:00
terence tsao
82d0bbba2e
RPC Validator Index Lookup Failover ( #2386 )
...
* implemented valIdxLookup and tests
* comments
* comments
* look up in db
* uncomment
2019-04-25 17:57:54 -05:00
Raul Jordan
5bf1032b7d
Prevent Reading Head State on Every Received Attestation ( #2383 )
...
* no more calls
* fix lint unused
* Update beacon-chain/attestation/service.go
Co-Authored-By: rauljordan <raul@prysmaticlabs.com>
* fix tests
* fixed broken tests
* using ctx
* fixed single state req
* tests pass
* fix one of last major bottlenecks
* fix test
* lint
2019-04-25 12:21:45 -05:00
Raul Jordan
538d7ec07c
Prevent Fetching Head State Many Times in Requesting Latest Attestation ( #2374 )
2019-04-25 09:44:35 -07:00
Nishant Das
75be7be646
Handle Panics In Attestation and Disable Logging ( #2380 )
...
* Revert "Use State Instead of Cached Registry (#2372 )"
This reverts commit 941810ee7b
.
* handle panic
* fix logging
* add test
* gazelle
2019-04-25 21:11:07 +08:00
terence tsao
b81eeec374
Optimize block fetch with attestation target fetch ( #2373 )
...
* 1st attemp to optimize blk fetch w/ att tgt fetch
* test test test test
2019-04-24 12:21:00 -05:00
Nishant Das
941810ee7b
Use State Instead of Cached Registry ( #2372 )
...
* fix state reads
* add method to retrieve validator from state
* lint
* batch update attestation
* handle nil case
* add test
* lint
* batch update attestation
* use state instead
* fix test
2019-04-24 10:46:06 -05:00
Nishant Das
54f6fffb58
Batch Attestations in Attestation Service ( #2370 )
...
* fix state reads
* add method to retrieve validator from state
* lint
* batch update attestation
* handle nil case
* add test
* lint
* batch update attestation
2019-04-24 09:28:52 -05:00
Nishant Das
89941eec97
Fix State Reads ( #2368 )
...
* fix state reads
* add method to retrieve validator from state
* lint
* gosec
2019-04-24 19:03:55 +08:00
shayzluf
6c1740eefc
Add Caching to Tree Hashing Algorithm ( #1929 )
...
* added todo to hash file in ssz
* params and copy of block cache
* start hash cache
* Hash cache implementation
* fixed some comments
* fixed promatheus duplicate counter name
* removed TODO
* change to use special expiration cache
* function name fixes junk object generator
* naming changes
* gazzle fix
* added pruning last read data test
* fixed gometallinter errors
* fix benchmarks and no int64 not serializable
* move struct from test
* add feature flag
* fix merge issues
* add featureflag to beacon and validator
* featureflag init for tests
* added feature flag to all ssz dependent tests
* remove setter func
* replace k8s tweaked expiration cache to https://github.com/karlseguin/ccache
* remove else
* change request by preston
* added init featureflags to genesis_test
* Update shared/ssz/hash_cache.go
add dot
Co-Authored-By: shayzluf <thezluf@gmail.com>
* Update shared/ssz/hash_cache.go
Co-Authored-By: shayzluf <thezluf@gmail.com>
* Update shared/ssz/hash_cache.go
remove extra space
Co-Authored-By: shayzluf <thezluf@gmail.com>
* Update shared/params/config.go
add dot
Co-Authored-By: shayzluf <thezluf@gmail.com>
* Update shared/featureconfig/config.go
remove dot
Co-Authored-By: shayzluf <thezluf@gmail.com>
* Update shared/featureconfig/config.go
remove dot
Co-Authored-By: shayzluf <thezluf@gmail.com>
* remove powchain from prometheus hash cache name
* fixes fron change requests
* fix change requests
* remove faulty merge test
* gazelle fix
* fix fmt.sprintf
* remove debug binary
* fix gazelle
2019-04-24 13:39:02 +08:00
Raul Jordan
64e7db6241
Resolve Contract Address Automatically via HTTP ( #2361 )
...
* automatically resolve contract address
* Update beacon-chain/node/node.go
Co-Authored-By: rauljordan <raul@prysmaticlabs.com>
* testnet contract endpoint
* fmt
* use config in msg
2019-04-23 16:33:47 -05:00
Raul Jordan
44bc1c1bc6
Suggest to ClearDB if Contract Mismatches Cluster ( #2360 )
...
* clear db by default
* revert changes
* comment
* run with clear db
2019-04-23 15:52:52 -05:00
Raul Jordan
e4bbf54f9f
Hardcoded Bootstrap + Relay Nodes ( #2359 )
...
* default bootstrap node and local network flag
* default relay node value
* Update shared/p2p/service.go
Co-Authored-By: rauljordan <raul@prysmaticlabs.com>
* use no discovery
2019-04-23 15:30:59 -05:00
Raul Jordan
e36714805a
Enable Ancestor Cache By Default ( #2358 )
...
* remove ancestor cache flag
* ancestor cache on by default
2019-04-23 13:15:58 -05:00
Nishant Das
4ed86566c1
Disable RPC while Syncing ( #2353 )
...
* handle nil block
* blocking rpc till synced
* remove unused field
* remove log
* fix tests
2019-04-23 10:57:10 -05:00
Nishant Das
a8ce61b387
Remove Proto Clone from State Reads ( #2349 )
...
* add cached serialized state to reduce use of proto clone
* review comments
* review comments
* comments on cache
2019-04-23 13:04:21 +08:00
Raul Jordan
7a27d9a227
Move Inclusion Maps to Epoch Processing ( #2347 )
...
* fix broken initial sync
* tests pass
2019-04-22 21:30:37 -05:00
Raul Jordan
2d8dd203f1
Optimize LMD-GHOST Vote Counting ( #2333 )
...
* use att targets
* risky head request
* timing lmd
* fixed ancestor cache hits
* tests pass
* comment on func
* advance state transition
* advance N empty state transitions
* imports
* imports
* use risky head state
* use validator registry
* revert timing
* imports
2019-04-22 19:59:02 -05:00
Raul Jordan
cfd3e548cd
Use Map for Inclusion Distance in EpochProcessing ( #2346 )
2019-04-22 17:08:20 -07:00
terence tsao
cda3f178cb
Optimize Attestation Inclusion Calculations ( #2344 )
2019-04-22 15:52:56 -07:00
Raul Jordan
629626dbe6
Loop Once Over state.LatestAttestations in Epoch Processing ( #2342 )
...
* single loop for extracting attestations
* complete
2019-04-22 17:31:01 -05:00
Raul Jordan
8ada0e56b7
Advance State Transitions in Update Latest Attestation ( #2336 )
...
* advance state transition
* advance N empty state transitions
* imports
* imports
2019-04-22 11:17:12 -05:00
Nishant Das
a5def315ae
Separate Registry and Balances ( #2334 )
...
* all changes
* lint
* terence's review
2019-04-22 10:52:56 -05:00
Raul Jordan
51d4965388
Enable Committee Cache By Default ( #2323 )
2019-04-22 06:37:42 -07:00