Go to file
Potuz 79bb7efbf8
Check init sync before getting payload attributes (#13479)
* Check init sync before getting payload attributes

This PR adds a helper to forkchoice to return the delay of the latest
imported block. It also adds a helper with an heuristic to check if the
node is during init sync. If the highest imported node was imported with
a delay of less than an epoch then the node is considered in regular
sync. If on the other hand, in addition the highest imported node is
more than two epochs old, then the node is considered in init Sync.

The helper to check this only uses forkchoice and therefore requires a
read lock. There are four paths to call this

1) During regular block processing, we defer a function to send the
   second FCU call with attributes. This function may not be called at
all if we are not regularly syncing
2) During regular block processing, we check in the path
   `postBlockProces->getFCUArgs->computePayloadAttributes` the payload
attributes if we are syncing a late block. In this case forkchoice is
already locked and we add a call in `getFCUArgs` to return early if not
regularly syncing
3) During handling of late blocks on `lateBlockTasks` we simply return
   early if not in regular sync (This is the biggest change as it takes
a longer FC lock for lateBlockTasks)
4) On Attestation processing, in UpdateHead, we are already locked so we
   just add a check to not update head on this path if not regularly
syncing.

* fix build

* Fix mocks
2024-01-17 15:39:28 +00:00
.github Update Libp2p To v0.32.1 and Go to v1.21.5 (#13304) 2023-12-21 16:09:54 +00:00
.well-known Update security.txt (#9896) 2021-11-12 15:55:45 +00:00
api Revert "REST VC: Subscribe to Beacon API events (#13354)" (#13428) 2024-01-06 21:36:42 +00:00
async Release Lock Before Panicking (#12464) 2023-05-25 06:42:21 -07:00
beacon-chain Check init sync before getting payload attributes (#13479) 2024-01-17 15:39:28 +00:00
build Update rules go & gazelle (#12721) 2023-08-11 16:39:35 +00:00
cache add changes (#12697) 2023-08-04 22:05:47 +08:00
cmd Validator client - Improve readability - NO FUNCTIONAL CHANGE (#13468) 2024-01-15 14:46:54 +00:00
config Validator client - Improve readability - NO FUNCTIONAL CHANGE (#13468) 2024-01-15 14:46:54 +00:00
consensus-types Only process blocks which haven't been processed (#13442) 2024-01-09 22:14:03 +00:00
container Add the Abillity to Defragment the Beacon State (#13444) 2024-01-13 05:44:02 +00:00
contracts/deposit Fix numerous spelling error and typos in the log messages, comments, and documentation. (#12385) 2023-05-11 20:45:43 +00:00
crypto Replace Empty Slice Literals with Nil Slices (#13093) 2023-10-23 16:36:11 +00:00
encoding HTTP endpoints cleanup (#13251) 2023-12-08 20:37:20 +00:00
hack Fix docker image version strings in CI (#13356) 2023-12-15 19:15:51 +00:00
io Enable errname linter and fix findings (#13341) 2023-12-15 03:26:48 +00:00
math Deneb produce blockv3 (#12708) 2023-09-01 12:51:27 +02:00
monitoring Refactor Exported Names to Follow Golang Best Practices (#13075) 2023-10-20 16:45:33 +00:00
network Enable errname linter and fix findings (#13341) 2023-12-15 03:26:48 +00:00
proto Remove old blob types (#13438) 2024-01-10 09:38:06 +00:00
runtime Validator client - Improve readability - NO FUNCTIONAL CHANGE (#13468) 2024-01-15 14:46:54 +00:00
testing Remove old blob types (#13438) 2024-01-10 09:38:06 +00:00
third_party Update rules_go and gazelle to 0.42 & 0.33 (latest releases) (#13021) 2023-10-10 12:50:29 +08:00
time Break out several helpers from postBlockProcess (#13419) 2024-01-06 02:29:07 +00:00
tools Fix port logging in bootnode (#13457) 2024-01-15 04:38:22 +00:00
validator Improve wait for activation (#13448) 2024-01-16 17:04:54 +00:00
.bazelrc pgo: Enable pgo behind release flag (#13158) 2023-11-08 13:33:26 +00:00
.bazelversion Bazel 7.0.0 (#13321) 2024-01-10 15:34:11 +00:00
.buildkite-bazelrc Bazel 7.0.0 (#13321) 2024-01-10 15:34:11 +00:00
.codecov.yml Codecov: ignore testing directories (#8777) 2021-04-16 08:44:36 -05:00
.deepsource.toml Update to V4 🚀 (#12134) 2023-03-17 18:52:56 +00:00
.dockerignore Add tool and script for interop testing (#3417) 2019-09-09 17:31:19 -04:00
.gitattributes linguist-generated=true for mock and pb go files (#1465) 2019-02-02 17:25:28 -05:00
.gitignore E2E: beacon APIs Part 1 (#11306) 2022-12-06 16:01:17 +00:00
.golangci.yml Update Libp2p To v0.32.1 and Go to v1.21.5 (#13304) 2023-12-21 16:09:54 +00:00
.policy.yml Include Policy Bot Application (#7523) 2020-10-14 04:14:38 +00:00
.travis.yml Resolve Proto Lint Issues (#3044) 2019-07-22 14:10:17 -05:00
bazel.sh Fix All Deep Source Shell Issues and Go Issues (#8661) 2021-03-24 19:57:27 +00:00
BUILD.bazel sort static analyzers, add more, fix violations (#13441) 2024-01-09 23:29:36 +00:00
CONTRIBUTING.md fix typo (CONTRIBUTING.md) (#12548) 2023-06-18 19:24:19 -07:00
DEPENDENCIES.md Fix: typos (#11885) 2023-01-18 15:21:58 +08:00
deps.bzl Bump github.com/quic-go/quic-go from 0.39.3 to 0.39.4 (#13445) 2024-01-12 18:12:19 +00:00
fuzzbuzz.yaml Update go to 1.19.3 (#11630) 2022-11-18 19:12:19 +00:00
go.mod Bump github.com/quic-go/quic-go from 0.39.3 to 0.39.4 (#13445) 2024-01-12 18:12:19 +00:00
go.sum Bump github.com/quic-go/quic-go from 0.39.3 to 0.39.4 (#13445) 2024-01-12 18:12:19 +00:00
INTEROP.md Config registry (#10683) 2022-05-20 07:16:53 +00:00
LICENSE.md update to GPLv3 (#297) 2018-07-20 10:23:48 -05:00
MODULE.bazel Bazel 7.0.0 (#13321) 2024-01-10 15:34:11 +00:00
MODULE.bazel.lock Bazel 7.0.0 (#13321) 2024-01-10 15:34:11 +00:00
nogo_config.json sort static analyzers, add more, fix violations (#13441) 2024-01-09 23:29:36 +00:00
prysm.bat Fix typos (#13053) 2023-10-19 12:23:11 +00:00
prysm.ps1 Update prysm scripts to support client-stats, deprecate slasher (#8971) 2021-06-02 14:06:59 -05:00
prysm.sh correctly assign arm64 arch for Apple M1 (#11675) 2022-11-21 23:11:02 +00:00
README.md Update README.md (#13302) 2023-12-08 04:07:10 +00:00
SECURITY.md Add how users should report security vulnerabilities for this repository (#9525) 2021-09-10 03:13:09 +00:00
service-account.json.enc Bazel cache for travis (#236) 2018-07-07 16:01:58 -04:00
TERMS_OF_SERVICE.md Update Terms of Service (#13163) 2023-11-02 17:11:11 +00:00
WORKSPACE Bazel 7.0.0 (#13321) 2024-01-10 15:34:11 +00:00

Prysm: An Ethereum Consensus Implementation Written in Go

Build status Go Report Card Consensus_Spec_Version 1.3.0 Execution_API_Version 1.0.0-beta.2 Discord GitPOAP Badge

This is the core repository for Prysm, a Golang implementation of the Ethereum Consensus specification, developed by Offchain Labs. See the Changelog for details of the latest releases and upcoming breaking changes.

Getting Started

A detailed set of installation and usage instructions as well as breakdowns of each individual component are available in the official documentation portal. If you still have questions, feel free to stop by our Discord.

Staking on Mainnet

To participate in staking, you can join the official eth2 launchpad. The launchpad is the only recommended way to become a validator on mainnet. You can explore validator rewards/penalties via Bitfly's block explorer: beaconcha.in, and follow the latest blocks added to the chain on beaconscan.

Contributing

Branches

Prysm maintains two permanent branches:

  • master: This points to the latest stable release. It is ideal for most users.
  • develop: This is used for development, it contains the latest PRs. Developers should base their PRs on this branch.

Guide

Want to get involved? Check out our Contribution Guide to learn more!

License

GNU General Public License v3.0

Terms of Use