Potuz
f97db3b738
Different parallel hashing ( #12639 )
...
* Paralellize hashing of large lists
* add unit test
* add file
* do not parallelize on low processor count
* revert minimal proc count
---------
Co-authored-by: Nishant Das <nishdas93@gmail.com>
2023-07-21 20:36:20 -04:00
Nishant Das
2a4441762e
Handle Epoch Boundary Misses ( #12579 )
...
* add changes
* fix tests
* fix edge case
* fix logging
2023-07-05 09:23:51 +00:00
Nishant Das
c45cb7e188
Optimize Validator Roots Computation ( #12585 )
...
* add changes
* change it
2023-07-01 02:23:25 +00:00
Radosław Kapka
a40f903f76
Fix TestFieldTrie_NativeState_fieldConvertersNative
( #12550 )
2023-06-19 13:49:12 +00:00
Nishant Das
70152bf476
Copy All Field Tries For Late Blocks ( #12461 )
...
* add new thing
* only have it for late blocks
* comments
* change to lock
* add test
* Update beacon-chain/state/state-native/state_test.go
---------
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2023-05-30 09:57:20 +00:00
Nick Sullivan
5c00fcb84f
Fix numerous spelling error and typos in the log messages, comments, and documentation. ( #12385 )
...
* Minor typos and spelling fixes (comments, logs, & docs only, no code changes)
* Fix seplling in log message
* Additional spelling tweaks based on review from @prestonvanloon
2023-05-11 20:45:43 +00:00
Preston Van Loon
4b4e213a24
stategen: Pre-populate bls pubkey cache as part of stategen's Resume function ( #11482 )
...
* Pre-populate bls pubkey cache as part of state gen's Resume function. This adds some helpers and a benchmark to blst
* Do it async
* fix missing import
* lint
---------
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: rauljordan <raul@prysmaticlabs.com>
2023-05-10 10:44:15 +00:00
Radosław Kapka
9e3598334d
Avoid double state copy in latestAncestor
( #12326 )
...
* Avoid double state copy in `latestAncestor`
* remove trailing newline
---------
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2023-04-25 14:12:56 +00:00
Radosław Kapka
ebccdfadb5
Remove unused argument from field index ( #12327 )
...
* Remove unused argument from field index
* bzl
2023-04-25 13:03:55 +00:00
terencechain
08d6eccfb3
Change native execution value to Gwei Uint64 ( #12291 )
...
* Default value to uint64
* Fix spectest
* Fix tests
* Fix tests
* Fix tests
* Fix test
* Fix test
* Fix build
* Potuz feedback
* Add test
* Fix test
* Fix test
2023-04-22 00:44:28 +00:00
Justin Traglia
4c916403e9
Enable dupword linter & fix findings ( #12271 )
...
* Enable dupword linter & fix findings
* Correct an incorrect fix
* Add nolint comment
* Add another nolint comment
* Revert unintended change to bazel version
---------
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2023-04-18 22:01:27 +00:00
Justin Traglia
8428a79971
Enable whitespace linter & fix findings ( #12273 )
...
* Enable whitespace linter & fix findings
* Fix new finding
* fix new violation
---------
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
2023-04-18 18:58:27 +00:00
kasey
ff1b03ab13
prysmctl using the same genesis func as e2e ( #12268 )
...
* prysmctl using the same genesis func as e2e
* add whitespace to genesis.json for readability
* fix typo in fork name
* don't require validator count if deposits given
* add gosec exception
* the other nosec :(
* appease deepsource
* fix comments on renamed public value/func
---------
Co-authored-by: kasey <kasey@users.noreply.github.com>
2023-04-13 17:19:06 +00:00
kasey
f4307a902c
build tag to exclude mainnet genesis from prysmctl ( #12244 )
...
Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
2023-04-06 19:45:35 +00:00
Nishant Das
191e603e28
Fix Bad Merge in V4 ( #12183 )
2023-03-24 14:05:31 +00:00
Potuz
fb65287ba2
Remove unused methods from interface ( #12164 )
2023-03-20 15:36:33 -05:00
terencechain
d17996f8b0
Update to V4
🚀 ( #12134 )
...
* Update V3 from V4
* Fix build v3 -> v4
* Update ssz
* Update beacon_chain.pb.go
* Fix formatter import
* Update update-mockgen.sh comment to v4
* Fix conflicts. Pass build and tests
* Fix test
2023-03-17 18:52:56 +00:00
Nishant Das
e58b66f76d
Fully Deprecate Vectorized HTR Flag ( #12148 )
...
* cleanup
* gaz
* fix tests
* remove unused hasher
* gaz
* fix last one
* fix tests
* fmt
2023-03-17 11:41:02 +00:00
Radosław Kapka
25d06d41be
Fix type name in field_trie_helpers
error message ( #12070 )
...
(cherry picked from commit bc9330c32956a73f67e7905bea2efcadc8724d25)
2023-03-02 14:33:22 +00:00
Potuz
0a87210514
Forkchoice external locks v2 ( #12036 )
...
* write locks
* fix forkchoice tests
* blockchain locks
* lock on IsOptimistic
* use forkchoice instead of chaininfo within savehead
* Use forkchoice HasNode to check if a block is consistent with finality
* interface fix
* Use forkchoice HasNode to check if a block is consistent with finality
* interface fix
* fix tests
* remove VerifyFinalizedBlkDescendant
* don't write lock wrappers
* fix validateBeaconBlock
* Terence's review and more missing locks
* add lock for InForkChoice
* lock head on fillMissingBlockPayload
* fix lock on IsOptimisticForRoot
* fix lock in fillMissingBlockPayloadId
* extra comments
* lock proposerBoost on spectests
* nishant's review
---------
Co-authored-by: Nishant Das <nishdas93@gmail.com>
2023-03-02 09:10:52 -03:00
terencechain
e136e10ebb
Proposer use highest value payload vs header ( #11967 )
2023-02-10 11:36:19 -08:00
terencechain
d4f3257f60
Rename block interfaces ( #11975 )
2023-02-09 10:23:32 +01:00
Potuz
0d6e8718fd
Aditya's PR 18 ( #11945 )
...
* Aditya's PR 18
This PR implements PR18. There is still a missing piece which is
consistency of head with finalized checkpoint. I will think on ways to
enforce this.
* prune finalized incompatible
* don't check finalization on viable for head
* unit tests fixes
* gazelle
* remove finalized epoch from viableForHead
* remove finalized epoch from leadsToViableHead
* use non-slashed indices
* function rename
* lint fixes
* lint fixes
* lint fixes
2023-02-05 09:40:07 -03:00
Radosław Kapka
dc4440abe7
Small cleanup ( #11963 )
2023-02-02 17:24:09 +00:00
Radosław Kapka
77d3ccb9ad
Clean up state types ( #11916 )
...
* Clean up state types
* rename package
2023-01-26 14:40:12 +00:00
Guillaume Ballet
c6338e3a31
beacon-chain, config: get consensus values from beacon config ( #11798 )
...
* beacon-chain, config: get consensus values from beacon config
* review feedback
Co-authored-by: Nishant Das <nishdas93@gmail.com>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2023-01-25 10:42:03 +00:00
terencechain
0a4b0a68d3
Clean up unused code ( #11900 )
...
* Clean up unused code
* More unused
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2023-01-25 10:09:14 +00:00
Potuz
943eb93a57
save genesis state to hot cache and do not look it up from disk ( #11911 )
...
* do not lookup genesis state from disk
* make sure genesis state is saved
* fix tests
Co-authored-by: kasey <489222+kasey@users.noreply.github.com>
2023-01-24 23:14:50 +01:00
terencechain
179252faea
Address historical summaries feedback ( #11864 )
...
* Address historical summaries feedback
* Fix build
* Fix test
* Move historicalSummaries
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2023-01-16 12:44:40 +00:00
Radosław Kapka
16e6e0de6c
Replace FutureForkStub
with specific interfaces ( #11861 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2023-01-12 00:42:35 +00:00
terencechain
7fa3ebfaa8
Add historical summaries to state and processing ( #11842 )
...
* Add historical summaries to state and processing
* Process historical roots test
* Passing spec tests
* Fix shas and tests
* Fix mainnet spectest sha
* Fix tests
* Update beacon-chain/core/epoch/epoch_processing.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Update beacon-chain/core/epoch/epoch_processing_test.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Update proto/prysm/v1alpha1/beacon_state.proto
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Update beacon-chain/state/state-native/hasher.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* Radek's feedback
* Getters error
* Dont return
* Fix else
* Fix tests
* Fix test
* Rm white space
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2023-01-11 22:20:15 +00:00
Patrice Vignola
83f48350b2
Fix a bunch of deepsource warnings ( #11814 )
2022-12-22 09:20:10 +00:00
kasey
77a9dca9eb
Cleaner genesis state population ( #11809 )
...
* e2e using dynamic configs; runtime bellatrix setup
* starts from phase0 but fee recipient eval fails
* lower TTD to cross before bellatrix epoch in e2e
* fix debug printf
* fix it
* dynamic ttd and more robust fee_recipient eval
* let multiplication set ttd=0 if bellatrix epoch=0
* refactoring fee recipient test after cognit errors
* lint
* appease deepsource
* deep sourcin
* gazelle
* missed a usage of this when refactoring
* refactoring premine genesis to work for all forks
previous set of functions was a copypasta mess
* gaz post-merge
* gaz
* resolve merge artifact and pr feedback
* back out some unneeded changes
* appease deepsource
* move premine-state next to similar utils
Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
Co-authored-by: nisdas <nishdas93@gmail.com>
2022-12-22 05:38:51 +00:00
Nishant Das
90d5f6097c
lock state ( #11796 )
2022-12-20 15:39:35 +08:00
Potuz
856102cba8
Implement bound on expected withdrawals ( #11760 )
...
* Implement bound on expected withdrawals
This PR implements https://github.com/ethereum/consensus-specs/pull/3095
* Terence's suggestion
Co-authored-by: terencechain <terence@prysmaticlabs.com>
* Update spectests
* fix minimal preset
* Clear committee cache during header tests to ensure active validators ain't leaking
* Rm debug log
* Rm bad init
* Update consensus spec sha
* Fix bad tests and remove redundant casting
* Fix build
* MAX_VALIDATORS_PER_WITHDRAWALS_SWEEP typo
Co-authored-by: terencechain <terence@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-12-16 06:45:26 +00:00
Radosław Kapka
cb02a6897d
Update block Beacon APIs to Capella ( #11706 )
...
* proto+ssz
* refactor GetBlindedBlockSSZ
(cherry picked from commit 97483c339f99b0d96bd81846a979383ffd2b0cda)
# Conflicts:
# beacon-chain/rpc/eth/beacon/blocks.go
(cherry picked from commit 9e4e82d2c55e09be7568b28eaa33cdd1141445f4)
# Conflicts:
# beacon-chain/rpc/eth/beacon/blocks.go
* add Capella version
(cherry picked from commit 5d6fd0bbe663e5dd16df5b2e773f68982bbcd24e)
(cherry picked from commit 82f6ddb693ac9e8b4336b30fae724e478b9e8ec0)
* support SSZ lol
(cherry picked from commit 52bc2c8d617ac3e1254c493fa053cdce4a1ebd63)
(cherry picked from commit d7d70bc25b3ee8acbea10aaf77d26cd1f8c5f26f)
* update withdrawals proto
* refactor and test GetBlockV2
(cherry picked from commit c1d4eaa79d4df04bd284ec65cf261b6f5f260a97)
# Conflicts:
# beacon-chain/rpc/eth/beacon/blocks.go
* refactor and test GetSSZBlockV2
(cherry picked from commit fbc4e73d31c2f68d55d1e2bb8e7f2d8c7458c0a0)
# Conflicts:
# beacon-chain/rpc/eth/beacon/blocks.go
* test other functions
(cherry picked from commit 31d4a4cd1165b882d823696e5983ac6635262ec2)
* move stuff to blinded_blocks.go
(cherry picked from commit 0a9e1658ddb28f45ae5c1cb9fc2703cbb8c6708d)
# Conflicts:
# beacon-chain/rpc/eth/beacon/blocks.go
* fix migration code
* add Capella to SubmitBlock
* custom hooks
* missing structs
* fix tests
* fix tests
* review
* fix build issues
* replace ioutil with io
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-12-15 23:42:07 +00:00
Preston Van Loon
fbe0672fc4
state: Improve replay state logs metadata ( #11763 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-12-13 18:46:51 +00:00
Radosław Kapka
7dc966bb3b
Update state Beacon APIs to Capella ( #11708 )
...
* proto
(cherry picked from commit 24f45e021061782ab4d6c101a95368310aad67b6)
* implementation
(cherry picked from commit bbfa22c2053e8176fc004b13ba9c8d62cc3bd352)
# Conflicts:
# beacon-chain/rpc/apimiddleware/structs.go
* fix compilation error
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-12-06 00:36:23 +00:00
terencechain
a0c0706224
Add Capella state changes ( #11688 )
...
* Add Capella state changes
* Use params.configs
2022-11-24 14:54:55 -03:00
Potuz
a525fad0ea
Add upgrade to Capella to statereplay ( #11686 )
2022-11-24 14:58:05 +00:00
Preston Van Loon
4b033f4cc7
Update go to 1.19.3 ( #11630 )
...
* Update go to 1.19.3
* Update other items to 1.19
* Update golangci-lint to latest release
* Run gofmt -s with go1.19
* Huge gofmt changes
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2022-11-18 19:12:19 +00:00
Potuz
466fd359a2
Fix expected_withdrawals ( #11662 )
2022-11-14 21:33:40 -05:00
Potuz
de73baa4a7
Update 3068 ( #11656 )
...
* rename last_withdrawal_validator_index
* Update Capella methods to Specs #3068
* Add missing renames
* rename minimal state
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-11-12 18:38:21 +00:00
Potuz
d4a3b74bc6
capella payload changes ( #11647 )
...
* capella payload transition changes
* fix leak
* add back setters_payload from capella
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-11-12 18:19:51 +00:00
Potuz
4db1a02763
Implement upgrade to capella ( #11642 )
...
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2022-11-09 16:48:23 +01:00
Nishant Das
02566de74c
Copy Bytes Safely When Accessing Withdrawals ( #11638 )
...
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-11-08 13:40:25 +00:00
Potuz
90ecd23d41
implement process_withdrawals ( #11634 )
...
* implement process_withdrawals
* change errors to error.go
* gazelle
* James' review
* use bytes.Equal instead
* Radek's review
* Radek's review #2
* fix test
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2022-11-08 10:15:26 -03:00
Potuz
37108e6ed8
Implement get_expected_withdrawals ( #11618 )
...
* Implement get_expected_withdrawals
* Fix config test and export method
* Radek's review
* start from a different index in a test
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-11-07 14:11:16 +00:00
Radosław Kapka
8ade8afb73
Remove SSZ tags from beacon state ( #11613 )
...
* Remove SSZ tags from beacon state
* tests
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-11-04 11:08:57 +00:00
Potuz
bb09295072
Remove withdrawal Queue ( #11610 )
2022-11-03 16:55:44 +00:00