Go to file
Raul Jordan 92932ae58e
[Feature] - Slashing Interchange Support (#8024)
* Change LowestSignedProposal to Also Return a Boolean for Slashing Protection (#8020)

* amend to use bools

* ineff assign

* comment

* Update `LowestSignedTargetEpoch` to include exists (#8004)

* Replace highest with lowerest

* Update validator/db/kv/attestation_history_v2.go

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>

* Update validator/db/kv/attestation_history_v2.go

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>

* Invert equality for saveLowestSourceTargetToDB

* Add eip checks to ensure epochs cant be lower than db ones

* Should be less than equal to

* Check if epoch exists in DB getters

* Revert run time checks

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>

* Export Attesting History for Slashing Interchange Standard (#8027)

* added in att history checks

* logic for export

* export return nil

* test for export atts

* round trip passes first try!

* rem println

* fix up tests

* pass test

* Validate Proposers Are Not Slashable With Regard to Data Within Slasher Interchange JSON (#8031)

* filter slashable blocks and atts in same json stub

* add filter blocks func

* add test for filtering out the bad public keys

* Export Slashing Protection History Via CLI (#8040)

* include cli entrypoint for history exports

* builds properly

* test to confirm we export the data as expected

* abstract helpers properly

* full test suite

* gaz

* better errors

* marshal ident

* Add the additional eip-3076 attestation checks (#7966)

* Replace highest with lowerest

* Update validator/db/kv/attestation_history_v2.go

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>

* Update validator/db/kv/attestation_history_v2.go

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>

* Invert equality for saveLowestSourceTargetToDB

* Add eip checks to ensure epochs cant be lower than db ones

* Should be less than equal to

* Check if epoch exists in DB getters

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>

* Add EIP-3076 Invariants for Proposer Slashing Protection (#8067)

* add invariant for proposer protection

* write different test cases

* pass tests

* Add EIP-3076 Interchange JSON CLI command to validator (#7880)

* Import JSON CLI

* CLI impotr

* f

* Begin adding new commands in slashing protection

* Move testing helpers to separate packae

* Add command for importing slashing protection JSONs

* fix import cycle

* fix test

* Undo cleaning changes

* Improvements

* Add better prompts

* Fix prompt

* Fix

* Fix

* Fix

* Fix conflict

* Fix

* Fixes

* Fixes

* Fix exported func

* test func

* Fixes

* fix test

* simplify import and standardize with export

* add round trip test

* true integration test works

* fix up comments

* logrus

* better error

* fix build

* build fix

* Update validator/slashing-protection/cli_export.go

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>

* Update validator/slashing-protection/cli_import.go

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>

* fmt

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>

* Filter Slashable Attester Public Keys in Slashing Interchange Import (#8051)

* filter slashable attesters from the same JSON

* builds

* fix up initially broken test

* circular dep

* import fix

* giz

* added in attesting history package

* add test for filter slashable attester keys

* pass tests

* Save Slashable Keys to Disk in the Validator Client (#8082)

* begin db funcs

* add in test and bucket

* gaz

* rem changes to import

* ineff assign

* add godoc

* Properly Handle Duplicate Public Key Entries in Slashing Interchange Imports (#8089)

* Prevent Blacklisted Public Keys from Slashing Protection Imports from Having Duties at Runtime (#8084)

* tests on update duties

* ensure the slashable public keys are filtered out from update duties via test

* begin test

* attempt test

* rename for better context

* pass tests

* deep source

* ensure tests pass

* Check for Signing Root Mismatch When Submitting Proposals and Importing Proposals in Slashing Interchange (#8085)

* flexible signing root

* add test

* add tests

* fix test

* Preston's comments

* res tests

* ensure we consider the case for minimum proposals

* pass test

* tests passing

* rem unused code

* Set Empty Epochs in Between Attestations as FAR_FUTURE_EPOCH in Attesting History (#8113)

* set target data

* all tests passing

* ineff assign

* signing root

* Add Slashing Interchange, EIP-3076, Spec Tests to Prysm (#7858)

* Add interchange test framework

* add checks for attestations

* Import genesis root if necessary

* flexible signing root

* add test

* Sync

* fix up test build

* only 3 failing tests now

* two failing

* attempting to debug problems in conformity tests

* include latest changes

* protect test in validator/client passing

* pass tests

* imports

* spec tests passing with bazel

* gh archive link to spectests using tar.gz suffix

* rev

* rev more comment changes

* fix sha

* godoc

* add back save

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>

* Implement Migration for Unattested Epochs in Attesting History Database (#8121)

* migrate attesting history backbone done

* begin migration logic

* implement migration logic

* migration test

* add test

* migration logic

* bazel

* migration to its own file

* Handle empty blocks and attestations in interchange json and sort interchange json by public key (#8132)

* Handle empty blocks and attestations in interchange json

* add test

* sort json

* easier empty arrays

* pass test

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>

* builds

* more tests finally build

* Align Slashing Interchange With Optimized Slashing Protection (#8268)

* attestation history should account for multiple targets per source

* attempt at some fixes

* attempt some test fixes

* experimenting with sorting

* only one more failing test

* tests now pass

* slash protect tests passing

* only few tests now failing

* only spec tests failing now

* spec tests passing

* all tests passing

* helper function for verifying double votes

* use helper

* gaz

* deep source

* tests fixed

* expect specific number of times for domain data calls

* final comments

* Batch Save Imported EIP-3076 Attestations (#8304)

* optimize save

* test added

* add test for sad path

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>

* revert bad find replace

* add comment to db func

Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: Shay Zluf <thezluf@gmail.com>
2021-01-22 17:12:22 -06:00
.github Fix Pull Request Template Language (#7738) 2020-11-05 20:46:28 +00:00
.well-known Update security.txt (#7956) 2020-11-25 17:38:35 +00:00
beacon-chain Test for processAttestations (#8312) 2021-01-22 18:08:16 +00:00
contracts Fix Up READMEs for Mainnet (#7910) 2020-11-23 18:47:55 +00:00
endtoend Update waiting validator methods to be context aware (#8078) 2020-12-10 10:00:48 -06:00
fuzz Remove go-ssz entirely from prysm (#8257) 2021-01-20 21:03:46 +00:00
proto Remove go-ssz entirely from prysm (#8257) 2021-01-20 21:03:46 +00:00
scripts Coverage results upload fix for CI (#8255) 2021-01-12 20:12:09 +00:00
shared [Feature] - Slashing Interchange Support (#8024) 2021-01-22 17:12:22 -06:00
slasher Remove go-ssz entirely from prysm (#8257) 2021-01-20 21:03:46 +00:00
third_party Fix Up READMEs for Mainnet (#7910) 2020-11-23 18:47:55 +00:00
tools Remove go-ssz entirely from prysm (#8257) 2021-01-20 21:03:46 +00:00
validator [Feature] - Slashing Interchange Support (#8024) 2021-01-22 17:12:22 -06:00
.bazelrc Stamp binaries by default (#8292) 2021-01-19 20:43:30 +00:00
.bazelversion Update rules_go (#7202) 2020-11-10 03:01:56 +00:00
.buildkite-bazelrc Revert "Use remote cache in CI" (#8281) 2021-01-19 01:55:00 +00:00
.codecov.yml Update codecov to ignore generated code (#2794) 2019-06-12 10:45:17 -04:00
.deepsource.toml Add DeepSource for Bash Files (#7741) 2020-11-06 17:04:48 +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 Coverage results upload fix for CI (#8255) 2021-01-12 20:12:09 +00:00
.golangci.yml upgrading linter from gometalinter to golangci-lint (#2100) 2019-04-26 14:24:01 +08: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 Update bazel.sh (#5028) 2020-03-06 17:43:06 +00:00
BUILD.bazel Prevent Usage of Stdlib File/Dir Writing With Static Analysis (#7685) 2020-11-09 14:27:03 -06:00
CONTRIBUTING.md Fix Up READMEs for Mainnet (#7910) 2020-11-23 18:47:55 +00:00
DEPENDENCIES.md Remove go-ssz entirely from prysm (#8257) 2021-01-20 21:03:46 +00:00
deps.bzl Update bitfield dependency (#8305) 2021-01-21 08:28:57 +00:00
go.mod Update bitfield dependency (#8305) 2021-01-21 08:28:57 +00:00
go.sum Update bitfield dependency (#8305) 2021-01-21 08:28:57 +00:00
interop.Dockerfile Add tool and script for interop testing (#3417) 2019-09-09 17:31:19 -04:00
INTEROP.md Update docs for keymanager (#4651) 2020-01-25 06:25:58 -08:00
LICENSE.md update to GPLv3 (#297) 2018-07-20 10:23:48 -05:00
nogo_config.json Prevent Usage of Stdlib File/Dir Writing With Static Analysis (#7685) 2020-11-09 14:27:03 -06:00
prysm.bat Fix for prysm.bat issue 'Validator' is not recognized as an internal or external command (#8097) 2021-01-04 23:27:38 +00:00
prysm.ps1 Various Powershell Fixes (#7854) 2020-11-20 17:17:38 +00:00
prysm.sh Do Not Recommend --ssl-no-revoke When Downloading Prysm Scripts (#7618) 2020-10-22 22:25:22 +00:00
README.md Update README to include branching strategy (#8006) 2020-12-02 09:48:52 -06: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.md (#7590) 2020-10-21 20:34:40 +00:00
WORKSPACE [Feature] - Slashing Interchange Support (#8024) 2021-01-22 17:12:22 -06:00

Prysm: An Ethereum 2.0 Implementation Written in Go

Build status Go Report Card ETH2.0_Spec_Version 1.0.0 Discord

This is the core repository for Prysm, a Golang implementation of the Ethereum 2.0 specification, developed by Prysmatic Labs.

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 visualize the nodes in the network on eth2stats.io, 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