terence tsao
143d3a3203
Process attestation: skip if forkchoice attestation count == 0 ( #8436 )
...
* Cont. if there's no fork choice attestations
* Comment
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2021-02-12 17:11:42 +00:00
Nishant Das
7f6b15271a
On Block Cleanup ( #8438 )
2021-02-12 11:36:53 +00:00
terence tsao
de15d6d2c1
Some improvements to proposer cache ( #8424 )
...
* Revert to use input epoch
* Revert back to process epoch
* Use processed state
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-02-10 22:07:12 +00:00
terence tsao
56c5938898
Send feed faster with UpdateHeadTimely feature flag ( #8422 )
...
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-02-10 18:26:23 +00:00
terence tsao
d44ab1ace5
Add timeSinceSlotStart
field to "Synced new block..." log ( #8420 )
...
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-02-10 17:24:40 +00:00
Nishant Das
ae028d9c1d
Insert Finalized Deposits In Another Routine ( #8405 )
...
* chk
* terence's review
* add test
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-02-10 10:35:44 -06:00
Ivan Martinez
cd3851c3d5
Add DeepSSZEqual and DeepNotSSZEqual ( #8421 )
2021-02-09 20:57:22 +00:00
terence tsao
2f98e6aaaf
Update head per slot ( #8381 )
...
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-02-09 17:24:48 +00:00
terence tsao
9afc9d92d9
Feature flag: update head timely ( #8412 )
...
* Feature flag: update head timely
* Move finalized imply justified up
* Fix resolve error
* Use invert feature flag
* Make diff easier to review
* Line
* Typo
* Fix condition
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-02-09 15:35:14 +00:00
Victor Farazdagi
a8e501b3cf
ETH2 Types: Epoch ( #8373 )
...
* update deps
* update deps
* update protos/*
* update deps
* reset protos
* update protos
* update shared/params/config
* update protos
* update /shared
* update shared/slotutil and shared/testutil
* update beacon-chain/core/helpers
* updates beacon-chain/state
* update beacon-chain/forkchoice
* update beacon-chain/blockchain
* update beacon-chain/cache
* update beacon-chain/core
* update beacon-chain/db
* update beacon-chain/node
* update beacon-chain/p2p
* update beacon-chain/rpc
* update beacon-chain/sync
* go mod tidy
* make sure that beacon-chain build suceeds
* go fmt
* update e2e tests
* update slasher
* remove redundant alias
* update validator
* gazelle
* fix build errors in unit tests
* go fmt
* update deps
* update fuzz/BUILD.bazel
* fix unit tests
* more unit test fixes
* fix blockchain UTs
* more unit test fixes
2021-02-09 10:05:22 +00:00
terence tsao
fed65122fe
Use EnableNextSlotStateCache
few more places ( #8398 )
2021-02-08 13:11:21 -08:00
Radosław Kapka
86a9d4c6a4
Configurable testutil's BeaconState ( #8407 )
...
* Configurable testutil's BeaconState
* fix shared and fuzz tests
* return state copy
* use mainnet config values for default state
* handle error in block fuzz
* goimports
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-02-08 20:00:09 +00:00
terence tsao
f9303ca2e4
Clean up unused functions ( #8403 )
...
* Clean ups
* Gazelle
2021-02-05 18:39:15 +00:00
Nishant Das
d4f241d875
Add Custom Deadline for Slot Progression ( #8388 )
...
* use custom deadline
* revert
* preston's comment
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-02-03 21:39:54 +00:00
terence tsao
2456e6f34d
Add missed feature flag usage ( #8376 )
...
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-02-01 17:42:50 +00:00
terence tsao
3aaa98decf
Next slot state caching ( #8357 )
...
* Add and use trailing slot state cache
* Remove comment
* Update comments
* Update comments
* Move it to background
* Warn is more appropiate
* Raul's comment
* Same strategy for proposer
* Own helper
* Minor touchups
* Tests
* Feature flag
* Gaz
2021-01-29 16:52:43 +00:00
terence tsao
1cfae7e098
More blockchain pkg tests ( #8343 )
...
* Add more blockchain pkg tests
* Deepsource feedback
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-01-26 20:27:34 -06:00
terence tsao
d121b19145
Rename NewService
to New
( #8337 )
...
* Hide beacon operation field if it's 0
* Rename NewSerivce to New
* Revert "Hide beacon operation field if it's 0"
This reverts commit 896fa11a0bb605212293d6fff02a8974c54710ab.
* Fix NewServiceRegistry
* Update slasher/detection/service.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-26 10:26:57 +00:00
terence tsao
d5ec248691
Rename getter functions to be idiomatic ( #8320 )
...
* Rename getter functions
* Rename new
* Radek's feedback
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-25 21:27:30 +00:00
terence tsao
229abed848
Test for processAttestations
( #8312 )
...
* Add a test for processAttestations
* Log should not contrain could not process attestation...
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-01-22 18:08:16 +00:00
terence tsao
c5e9b1ec9e
Refactor verifyAttestationIndices
method ( #8309 )
...
* Refactor verifyAttestationIndices
* Conflict
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-01-22 17:15:49 +00:00
Radosław Kapka
7842fd9da6
Replace bytes.Equal with assert.DeepEqual in tests ( #8318 )
...
* beacon chain
* format imports
* Update beacon-chain/db/kv/migration_archived_index_test.go
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
* Update beacon-chain/db/kv/migration_block_slot_index_test.go
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
* remove unused imports
* Update beacon-chain/core/state/skip_slot_cache_test.go
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
* Update beacon-chain/core/state/skip_slot_cache_test.go
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
* Update beacon-chain/core/state/skip_slot_cache_test.go
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
* Update beacon-chain/core/state/skip_slot_cache_test.go
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
* Update beacon-chain/db/kv/migration_archived_index_test.go
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
* Update beacon-chain/db/kv/migration_block_slot_index_test.go
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2021-01-22 15:15:40 +00:00
terence tsao
2586be29ac
Refactor on_attestation
return signature ( #8310 )
...
* Update func on_attestation's return signature
* Add return
2021-01-21 18:38:51 +00:00
Preston Van Loon
9ec4f727c6
Remove unnecessary state copy ( #8303 )
2021-01-20 20:00:01 -06:00
terence tsao
ffcadcf184
Rm forkchoice attestation verification ( #8301 )
...
* Rm fork choice attestation sig verification
* Unit test
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-20 21:46:13 +00:00
Ivan Martinez
7c59615ae2
Remove go-ssz entirely from prysm ( #8257 )
...
* Add DepositSigningData
* gaz
* Add to ssz tests
* Rename to DepositMessage
* Remove deprecated comment
* Remove return
* Fixes from review
* Fixes
* Remove some of gossz
* Remove go-ssz entirely
* Remove unneeded file
* Fix runtime with ssztypes
* Add back ssz files
* Fix formatting
* tidy
* Remove go-ssz from static
* tidy again
* Add tests
* Change to sig
* Fix test
* fx
* Fix visiblity
* Revert "Remove unneeded file"
This reverts commit d66fcda92925133db1a95f8f94ac61bbc6095c69.
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-20 21:03:46 +00:00
terence tsao
befe8d88b8
Remove duplicated target root check for fork choice attestation ( #8277 )
...
* Rm redundant target root check for fork choice attestation
* Comments
* Revert back verifyBeaconBlock
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-01-20 18:27:10 +00:00
terence tsao
578dabe27c
Remove duplicated LMD FFG check for fork choice attestation ( #8276 )
...
* Rm redundant lmd<->ffg check for fork choice attestation
* Comments
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Nishant Das <nishdas93@gmail.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-20 10:19:43 +00:00
terence tsao
5d841874f7
Return error on AttestingIndices
bitfield length check ( #8285 )
...
* Return error on committee len check
* AttestingIndices unit test
* Add equality check
* Fixing more tests
* Fix rest of the tests
* Fix invalid bit length test
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-20 03:00:52 +00:00
terence tsao
084e5bd020
Add test TestStore_OnAttestation_Ok ( #8293 )
...
* Add test TestStore_OnAttestation_Ok
* Handle errors
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-19 23:10:10 +00:00
terence tsao
bc2c206832
Add verify slot target epoch function and apply all ( #8273 )
...
* Add verify slot target epoch function and apply all
* Fix TestProcessAttestationsNoVerify_IncorrectSlotTargetEpoch
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-01-19 21:41:44 +00:00
Radosław Kapka
f89fd67952
Better receiver names in beacon chain module ( #8286 )
2021-01-19 13:21:32 +00:00
terence tsao
b6c4bc197f
Add on_block
finality test ( #8266 )
...
* Can generate at epoch boundary
* Remove extra space
* Add on block finality test
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-15 13:42:49 +00:00
Radosław Kapka
015102c2d5
Implement GetSyncStatus in the node API ( #8241 )
...
* Implement GetSyncStatus in the node API
* gazelle
* add HeadSlot function to fuzz tests' fakeChecker
* use HeadFetcher to get head slot
* remove useless code
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-12 17:17:20 +00:00
terence tsao
bc650c82b4
Hydrate attestation for tests ( #8228 )
2021-01-07 21:00:21 +00:00
terence tsao
9ff825a570
Update variable names that are same as imports ( #8220 )
...
* Fix names that are same as import name
* Review feedbacks
2021-01-07 10:42:03 -06:00
terence tsao
023e258f6a
Stream verified block ( #8206 )
2021-01-05 12:40:11 -08:00
Victor Farazdagi
318f83957a
Fix data races in tests accessing beacon config concurrently ( #8190 )
...
* add mutex to params/config
* split config files into test/prod
* add tags checker
* add regression test
* remove debug info
* update bazel config
* go fmt
* make sure that conditional file is kept by gazelle
* update build tag: test -> develop
* gazelle
* remove redundant import
* fix data race in TestService_ReceiveBlock
2021-01-05 04:51:25 +00:00
Victor Farazdagi
04b2e0776d
Fix import shadowing of state package ( #8191 )
...
* update shadowed var name
* update var names
* remove unnecessary delta
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-04 20:07:12 +00:00
Victor Farazdagi
d8c31b79df
Fix import shadowing of db package ( #8158 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-12-18 19:12:30 +00:00
Nishant Das
dfdf77cb95
Add Instead of Subtract in Epoch Boundary Check ( #8145 )
...
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2020-12-17 14:31:05 +00:00
terence tsao
20dede7532
Move state summary cache to DB ( #8101 )
2020-12-16 08:56:21 -08:00
terence tsao
0449cd3450
Allow update cache at last slot of the epoch ( #8094 )
...
* Epoch boundary updates at the last slot of the epoch
* Report metric on first slot
* Remove comment
* Add locks to param config
* Remove lock for copy
* Revert "Add locks to param config"
This reverts commit 79d5130b58ae7f80c72109e29cc9ea775c91b063.
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-12-15 21:19:02 +00:00
Victor Farazdagi
b9848dc94f
Remove unused vars in tests ( #8103 )
...
* update process_block_test
* service_attester_test
* update service and rpc_status tests
* go fmt
2020-12-13 05:23:13 +00:00
Nishant Das
99b3835f19
Add Fallback Option for Eth1 Nodes ( #8062 )
...
* fix
* fix tests and change back
* gaz
* change
* ready again
* Update beacon-chain/flags/base.go
Co-authored-by: Shay Zluf <thezluf@gmail.com>
* radek's review
* Update shared/cmd/helpers.go
* Update shared/cmd/helpers_test.go
* Update shared/cmd/helpers_test.go
* Endpoint/endpoint
Co-authored-by: Shay Zluf <thezluf@gmail.com>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2020-12-11 19:15:04 +08:00
Victor Farazdagi
be078d6a16
Update TestMain(): do not call os.Exit() explicitly ( #8046 )
...
* update workspace
* update testmain
2020-12-04 16:10:07 +00:00
terence tsao
645931802f
Improve genesis event log and load blocks to fork choice log ( #7946 )
...
* Update a few logs
* Go fmt
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-12-01 00:06:16 +00:00
terence tsao
3af7809964
Save cached state summaries on Stop() ( #7988 )
...
* Save cached state summaries on Stop()
* Fixed test and added one more test
2020-11-30 17:08:23 -06:00
Preston Van Loon
29c6a0c42c
Fix zero genesis check, make processAttestation routine wait for genesis time to be set ( #7947 )
...
* Fix zero genesis check, make processAttestation routine wait for genesis time to be set
* Update beacon-chain/blockchain/receive_attestation.go
Co-authored-by: Nishant Das <nishdas93@gmail.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-11-25 18:52:59 +00:00
terence tsao
f63e89813d
Remove chain not started error ( #7879 )
...
* Remove chain not started error
* Add genesis state not created error
2020-11-21 01:28:55 +00:00