Renamed Client to Validator (#428)

This commit is contained in:
terence tsao
2018-08-22 12:15:21 -07:00
committed by GitHub
parent 56ba92ac93
commit 7c8331e9d3
38 changed files with 92 additions and 92 deletions

View File

@@ -9,7 +9,7 @@ Before you begin, check out our [Contribution Guidelines](#contributing) and joi
[![Discord](https://user-images.githubusercontent.com/7288322/34471967-1df7808a-efbb-11e7-9088-ed0b04151291.png)](https://discord.gg/KSA7rPr)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/prysmaticlabs/geth-sharding?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
Also, read our [Sharding Reference Implementation Doc](https://github.com/prysmaticlabs/prysm/blob/master/client/README.md). This doc provides a background on the sharding implementation we follow at Prysmatic Labs.
Also, read our [Sharding Reference Implementation Doc](https://github.com/prysmaticlabs/prysm/blob/master/validator/README.md). This doc provides a background on the sharding implementation we follow at Prysmatic Labs.
# Table of Contents
@@ -96,7 +96,7 @@ Build our system first
```
bazel build //beacon-chain:beacon-chain
bazel build //client:client
bazel build //validator:validator
```
## Step 1: Deploy a Validator Registation Contract
@@ -115,7 +115,7 @@ bazel run //beacon-chain --\
--validator
```
This will spin up a full beacon node that connects to your running geth node, opens up an RPC connection for sharding clients to connect to it, and begins listening for p2p events.
This will spin up a full beacon node that connects to your running geth node, opens up an RPC connection for sharding validators to connect to it, and begins listening for p2p events.
To try out the beacon node in development by simulating incoming blocks, run the same command above but enable the `--simulator` and a debug level, log verbosity with `--verbosity debug` to see everything happening underneath the hood.
@@ -153,41 +153,41 @@ bazel run //beacon-chain:image --\
--verbosity debug
```
## Step 3: Running a Beacon/Sharding Client
## Step 3: Running a Beacon/Sharding validator
Once your beacon node is up, you'll need to attach a client as a separate process. This client is in charge of running attester/proposer responsibilities and processing shard cross links (shards to be designed in phase 2). This client will listen for incoming beacon blocks and crystallized states and determine when its time to perform attester/proposer responsibilities accordingly.
Once your beacon node is up, you'll need to attach a validator as a separate process. This validator is in charge of running attester/proposer responsibilities and processing shard cross links (shards to be designed in phase 2). This validator will listen for incoming beacon blocks and crystallized states and determine when its time to perform attester/proposer responsibilities accordingly.
Run as follows:
```
bazel run //client --\
bazel run //validator --\
--beacon-rpc-provider http://localhost:4000 \
--verbosity debug
```
Then, the beacon node will update this client with new blocks + crystallized states in order for the client to act as an attester or proposer.
Then, the beacon node will update this validator with new blocks + crystallized states in order for the validator to act as an attester or proposer.
### Running via Docker
To run the client within a docker container, use the `//client:image` target.
To run the validator within a docker container, use the `//validator:image` target.
```text
bazel run //client:image --\
bazel run //validator:image --\
--beacon-rpc-provider http://localhost:4000 \
--verbosity debug
INFO: Build options have changed, discarding analysis cache.
INFO: Analysed target //client:image (306 packages loaded).
INFO: Analysed target //validator:image (306 packages loaded).
INFO: Found 1 target...
Target //client:image up-to-date:
bazel-bin/client/image-layer.tar
Target //validator:image up-to-date:
bazel-bin/validator/image-layer.tar
INFO: Elapsed time: 8.568s, Critical Path: 0.22s
INFO: 0 processes.
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action
37fd88e7190b: Loading layer 22.42MB/22.42MB
Loaded image ID: sha256:89b233de1a026eddeeff010fa1ef596ce791cb3f26488150aac72a91b80734c1
Tagging 89b233de1a026eddeeff010fa1ef596ce791cb3f26488150aac72a91b80734c1 as bazel/client:image
Tagging 89b233de1a026eddeeff010fa1ef596ce791cb3f26488150aac72a91b80734c1 as bazel/validator:image
...
```
@@ -212,7 +212,7 @@ gometalinter ./...
# Contributing
We have put all of our contribution guidelines into [CONTRIBUTING.md](https://github.com/prysmaticlabs/prysm/blob/master/client/CONTRIBUTING.md)! Check it out to get started.
We have put all of our contribution guidelines into [CONTRIBUTING.md](https://github.com/prysmaticlabs/prysm/blob/master/validator/CONTRIBUTING.md)! Check it out to get started.
![nyancat](https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRBSus2ozk_HuGdHMHKWjb1W5CmwwoxmYIjIBmERE1u-WeONpJJXg)

View File

@@ -95,25 +95,25 @@ func (s *Service) Stop() error {
// FetchShuffledValidatorIndices retrieves the shuffled validator indices, cutoffs, and
// assigned attestation heights at a given crystallized state hash.
// This function can be called by clients to fetch a historical list of shuffled
// This function can be called by validators to fetch a historical list of shuffled
// validators ata point in time corresponding to a certain crystallized state.
func (s *Service) FetchShuffledValidatorIndices(ctx context.Context, req *pb.ShuffleRequest) (*pb.ShuffleResponse, error) {
var shuffledIndices []uint64
// Simulator always pushes out a validator list of length 100. By having index 0
// as the last index, the validator will always be a proposer in the client code.
// as the last index, the validator will always be a proposer in the validator code.
// TODO: Implement the real method by fetching the crystallized state in the request
// from persistent disk storage and shuffling the indices appropriately.
for i := 99; i >= 0; i-- {
shuffledIndices = append(shuffledIndices, uint64(i))
}
// For now, this will cause clients to always pick the validator as a proposer.
// For now, this will cause validators to always pick the validator as a proposer.
shuffleRes := &pb.ShuffleResponse{
ShuffledValidatorIndices: shuffledIndices,
}
return shuffleRes, nil
}
// ProposeBlock is called by a proposer in a sharding client and a full beacon node
// ProposeBlock is called by a proposer in a sharding validator and a full beacon node
// sends the request into a beacon block that can then be included in a canonical chain.
//
// TODO: needs implementation.
@@ -122,7 +122,7 @@ func (s *Service) ProposeBlock(ctx context.Context, req *pb.ProposeRequest) (*pb
return nil, errors.New("unimplemented")
}
// SignBlock is a function called by an attester in a sharding client to sign off
// SignBlock is a function called by an attester in a sharding validator to sign off
// on a block.
//
// TODO: needs implementation.

View File

@@ -5,13 +5,13 @@ load("@io_bazel_rules_docker//container:container.bzl", "container_push")
go_library(
name = "go_default_library",
srcs = ["main.go"],
importpath = "github.com/prysmaticlabs/prysm/client",
visibility = ["//client:__subpackages__"],
importpath = "github.com/prysmaticlabs/prysm/validator",
visibility = ["//validator:__subpackages__"],
deps = [
"//client/node:go_default_library",
"//client/types:go_default_library",
"//shared/cmd:go_default_library",
"//shared/debug:go_default_library",
"//validator/node:go_default_library",
"//validator/types:go_default_library",
"@com_github_sirupsen_logrus//:go_default_library",
"@com_github_urfave_cli//:go_default_library",
"@com_github_x_cray_logrus_prefixed_formatter//:go_default_library",
@@ -23,15 +23,15 @@ go_image(
srcs = ["main.go"],
goarch = "amd64",
goos = "linux",
importpath = "github.com/prysmaticlabs/prysm/client",
importpath = "github.com/prysmaticlabs/prysm/validator",
static = "on",
tags = ["manual"],
visibility = ["//visibility:private"],
deps = [
"//client/node:go_default_library",
"//client/types:go_default_library",
"//shared/cmd:go_default_library",
"//shared/debug:go_default_library",
"//validator/node:go_default_library",
"//validator/types:go_default_library",
"@com_github_sirupsen_logrus//:go_default_library",
"@com_github_urfave_cli//:go_default_library",
"@com_github_x_cray_logrus_prefixed_formatter//:go_default_library",
@@ -43,13 +43,13 @@ container_push(
format = "Docker",
image = ":image",
registry = "gcr.io",
repository = "prysmaticlabs/prysm/client",
repository = "prysmaticlabs/prysm/validator",
tag = "latest",
tags = ["manual"],
)
go_binary(
name = "client",
name = "validator",
embed = [":go_default_library"],
visibility = ["//client:__subpackages__"],
visibility = ["//validator:__subpackages__"],
)

View File

@@ -1,8 +1,8 @@
# Contribution Guidelines
Excited by our work and want to get involved in building out our sharding releases? Or maybe you haven't learned as much about the Ethereum protocol but are a savvy developer? Our [READINGS.md](https://github.com/prysmaticlabs/prysm/blob/master/client/READINGS.md) doc includes comprehensive information on Ethereum and sharding for both part-time and core contributors to the project.
Excited by our work and want to get involved in building out our sharding releases? Or maybe you haven't learned as much about the Ethereum protocol but are a savvy developer? Our [READINGS.md](https://github.com/prysmaticlabs/prysm/blob/master/validator/READINGS.md) doc includes comprehensive information on Ethereum and sharding for both part-time and core contributors to the project.
Additionally, our [Sharding Reference Implementation Doc](https://github.com/prysmaticlabs/prysm/blob/master/client/README.md) serves source of truth for all things related to our implementation of sharding fo Ethereum.
Additionally, our [Sharding Reference Implementation Doc](https://github.com/prysmaticlabs/prysm/blob/master/validator/README.md) serves source of truth for all things related to our implementation of sharding fo Ethereum.
You can explore our [Current Projects](https://github.com/prysmaticlabs/prysm/projects) in-the works for our different releases. Feel free to fork our repo and start creating PRs after assigning yourself to an issue of interest. We are always chatting on [Gitter](https://gitter.im/prysmaticlabs/geth-sharding) drop us a line there if you want to get more involved or have any questions on our implementation!
@@ -44,7 +44,7 @@ Anyone can become a part-time contributor and help out on implementing sharding.
- Follow up on open PRs
- Have an estimated timeframe to completion and let the core contributors know if a PR will take longer than expected
We do not expect all part-time contributors to be experts on all the latest sharding documentation, but all contributors should at least be familiarized with our sharding [README.md](https://github.com/prysmaticlabs/prysm/blob/master/client/README.md) and have gone through the required Ethereum readings as posted on our [READINGS.md](https://github.com/prysmaticlabs/prysm/blob/master/client/READINGS.md) document.
We do not expect all part-time contributors to be experts on all the latest sharding documentation, but all contributors should at least be familiarized with our sharding [README.md](https://github.com/prysmaticlabs/prysm/blob/master/validator/README.md) and have gone through the required Ethereum readings as posted on our [READINGS.md](https://github.com/prysmaticlabs/prysm/blob/master/validator/READINGS.md) document.
### Core Contributors

View File

@@ -53,7 +53,7 @@ Sharding revolves around being able to store shard metadata in a full proof of s
# Roadmap Phases
Prysmatic Labs will implement the beacon chain spec posted on [ETHResearch](https://ethresear.ch/t/convenience-link-to-full-casper-chain-v2-spec/2332) by the Foundation's research team and roll out a sharding client that communicates with this beacon.
Prysmatic Labs will implement the beacon chain spec posted on [ETHResearch](https://ethresear.ch/t/convenience-link-to-full-casper-chain-v2-spec/2332) by the Foundation's research team and roll out a sharding validator that communicates with this beacon.
To concretize these phases, we will be releasing our implementation of sharding and the beacon chain as follows:
@@ -118,7 +118,7 @@ Our Ruby Release requires users to start a local geth node running a localized,
1. _**Sync to the latest block header on the beacon chain:**_ the node will begin a sync process for the beacon chain
2. _**Assign the validator as a proposer/attester/attester based on RANDAO mechanism:**_ on incoming headers, the client will interact with the SMC to check if the current user is an eligible attester for an upcoming period (only a few minutes notice)
2. _**Assign the validator as a proposer/attester/attester based on RANDAO mechanism:**_ on incoming headers, the validator will interact with the SMC to check if the current user is an eligible attester for an upcoming period (only a few minutes notice)
3. _**Process shard cross-links:**_ once a attester is selected, he/she has to download subimtted collation headers for the shard in a certain period and check for their data availability

View File

@@ -3,10 +3,10 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "go_default_library",
srcs = ["service.go"],
importpath = "github.com/prysmaticlabs/prysm/client/attester",
visibility = ["//client:__subpackages__"],
importpath = "github.com/prysmaticlabs/prysm/validator/attester",
visibility = ["//validator:__subpackages__"],
deps = [
"//client/types:go_default_library",
"//validator/types:go_default_library",
"@com_github_sirupsen_logrus//:go_default_library",
],
)

View File

@@ -5,7 +5,7 @@ package attester
import (
"context"
"github.com/prysmaticlabs/prysm/client/types"
"github.com/prysmaticlabs/prysm/validator/types"
"github.com/sirupsen/logrus"
)
@@ -17,11 +17,11 @@ var log = logrus.WithField("prefix", "attester")
type Attester struct {
ctx context.Context
cancel context.CancelFunc
beaconService types.BeaconClient
beaconService types.BeaconValidator
}
// NewAttester creates a new attester instance.
func NewAttester(ctx context.Context, beaconService types.BeaconClient) *Attester {
func NewAttester(ctx context.Context, beaconService types.BeaconValidator) *Attester {
ctx, cancel := context.WithCancel(ctx)
return &Attester{
ctx: ctx,

View File

@@ -3,11 +3,11 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "go_default_library",
srcs = ["service.go"],
importpath = "github.com/prysmaticlabs/prysm/client/beacon",
visibility = ["//client:__subpackages__"],
importpath = "github.com/prysmaticlabs/prysm/validator/beacon",
visibility = ["//validator:__subpackages__"],
deps = [
"//client/types:go_default_library",
"//proto/beacon/rpc/v1:go_default_library",
"//validator/types:go_default_library",
"@com_github_gogo_protobuf//proto:go_default_library",
"@com_github_sirupsen_logrus//:go_default_library",
"@io_bazel_rules_go//proto/wkt:empty_go_proto",
@@ -20,10 +20,10 @@ go_test(
srcs = ["service_test.go"],
embed = [":go_default_library"],
deps = [
"//client/internal:go_default_library",
"//proto/beacon/p2p/v1:go_default_library",
"//proto/beacon/rpc/v1:go_default_library",
"//shared/testutil:go_default_library",
"//validator/internal:go_default_library",
"@com_github_golang_mock//gomock:go_default_library",
"@com_github_sirupsen_logrus//:go_default_library",
"@com_github_sirupsen_logrus//hooks/test:go_default_library",

View File

@@ -7,8 +7,8 @@ import (
"github.com/gogo/protobuf/proto"
"github.com/golang/protobuf/ptypes/empty"
"github.com/prysmaticlabs/prysm/client/types"
pb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1"
"github.com/prysmaticlabs/prysm/validator/types"
"github.com/sirupsen/logrus"
"golang.org/x/crypto/blake2b"
)
@@ -33,7 +33,7 @@ type Config struct {
ProposerChanBuf int
}
// DefaultConfig options for the beacon client service.
// DefaultConfig options for the beacon validator service.
func DefaultConfig() *Config {
return &Config{AttesterChanBuf: 5, ProposerChanBuf: 5}
}

View File

@@ -10,10 +10,10 @@ import (
gomock "github.com/golang/mock/gomock"
"github.com/golang/protobuf/ptypes/empty"
"github.com/prysmaticlabs/prysm/client/internal"
pbp2p "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
pb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1"
"github.com/prysmaticlabs/prysm/shared/testutil"
"github.com/prysmaticlabs/prysm/validator/internal"
"github.com/sirupsen/logrus"
logTest "github.com/sirupsen/logrus/hooks/test"
)

View File

@@ -4,8 +4,8 @@ go_library(
name = "go_default_library",
testonly = True,
srcs = ["beacon_service_mock.go"],
importpath = "github.com/prysmaticlabs/prysm/client/internal",
visibility = ["//client:__subpackages__"],
importpath = "github.com/prysmaticlabs/prysm/validator/internal",
visibility = ["//validator:__subpackages__"],
deps = [
"//proto/beacon/p2p/v1:go_default_library",
"//proto/beacon/rpc/v1:go_default_library",

View File

@@ -4,10 +4,10 @@ import (
"os"
"runtime"
"github.com/prysmaticlabs/prysm/client/node"
"github.com/prysmaticlabs/prysm/client/types"
"github.com/prysmaticlabs/prysm/shared/cmd"
"github.com/prysmaticlabs/prysm/shared/debug"
"github.com/prysmaticlabs/prysm/validator/node"
"github.com/prysmaticlabs/prysm/validator/types"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
prefixed "github.com/x-cray/logrus-prefixed-formatter"

View File

@@ -3,20 +3,20 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "go_default_library",
srcs = ["node.go"],
importpath = "github.com/prysmaticlabs/prysm/client/node",
visibility = ["//client:__subpackages__"],
importpath = "github.com/prysmaticlabs/prysm/validator/node",
visibility = ["//validator:__subpackages__"],
deps = [
"//client/attester:go_default_library",
"//client/beacon:go_default_library",
"//client/proposer:go_default_library",
"//client/rpcclient:go_default_library",
"//client/txpool:go_default_library",
"//client/types:go_default_library",
"//shared:go_default_library",
"//shared/cmd:go_default_library",
"//shared/database:go_default_library",
"//shared/debug:go_default_library",
"//shared/p2p:go_default_library",
"//validator/attester:go_default_library",
"//validator/beacon:go_default_library",
"//validator/proposer:go_default_library",
"//validator/rpcclient:go_default_library",
"//validator/txpool:go_default_library",
"//validator/types:go_default_library",
"@com_github_sirupsen_logrus//:go_default_library",
"@com_github_urfave_cli//:go_default_library",
],

View File

@@ -1,4 +1,4 @@
// Package node defines a sharding client which connects to a
// Package node defines a validator node which connects to a
// full beacon node as part of the Ethereum 2.0 specification.
package node
@@ -10,17 +10,17 @@ import (
"sync"
"syscall"
"github.com/prysmaticlabs/prysm/client/attester"
"github.com/prysmaticlabs/prysm/client/beacon"
"github.com/prysmaticlabs/prysm/client/proposer"
"github.com/prysmaticlabs/prysm/client/rpcclient"
"github.com/prysmaticlabs/prysm/client/txpool"
"github.com/prysmaticlabs/prysm/client/types"
"github.com/prysmaticlabs/prysm/shared"
"github.com/prysmaticlabs/prysm/shared/cmd"
"github.com/prysmaticlabs/prysm/shared/database"
"github.com/prysmaticlabs/prysm/shared/debug"
"github.com/prysmaticlabs/prysm/shared/p2p"
"github.com/prysmaticlabs/prysm/validator/attester"
"github.com/prysmaticlabs/prysm/validator/beacon"
"github.com/prysmaticlabs/prysm/validator/proposer"
"github.com/prysmaticlabs/prysm/validator/rpcclient"
"github.com/prysmaticlabs/prysm/validator/txpool"
"github.com/prysmaticlabs/prysm/validator/types"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
)
@@ -29,7 +29,7 @@ var log = logrus.WithField("prefix", "node")
const shardChainDBName = "shardchaindata"
// ShardEthereum defines an instance of a sharding client that manages
// ShardEthereum defines an instance of a sharding validator that manages
// the entire lifecycle of services attached to it participating in
// Ethereum 2.0.
type ShardEthereum struct {
@@ -39,7 +39,7 @@ type ShardEthereum struct {
db *database.DB
}
// NewShardInstance creates a new, Ethereum 2.0 sharding client.
// NewShardInstance creates a new, Ethereum 2.0 sharding validator.
func NewShardInstance(ctx *cli.Context) (*ShardEthereum, error) {
registry := shared.NewServiceRegistry()
shardEthereum := &ShardEthereum{
@@ -78,11 +78,11 @@ func NewShardInstance(ctx *cli.Context) (*ShardEthereum, error) {
return shardEthereum, nil
}
// Start every service in the sharding client.
// Start every service in the sharding validator.
func (s *ShardEthereum) Start() {
s.lock.Lock()
log.Info("Starting sharding client")
log.Info("Starting sharding validator")
s.services.StartAll()
@@ -103,7 +103,7 @@ func (s *ShardEthereum) Start() {
}
}
debug.Exit() // Ensure trace and CPU profile data are flushed.
panic("Panic closing the sharding client")
panic("Panic closing the sharding validator")
}()
// Wait for stop channel to be closed.
@@ -117,7 +117,7 @@ func (s *ShardEthereum) Close() {
s.db.Close()
s.services.StopAll()
log.Info("Stopping sharding client")
log.Info("Stopping sharding validator")
close(s.stop)
}

View File

@@ -3,8 +3,8 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "go_default_library",
srcs = ["config.go"],
importpath = "github.com/prysmaticlabs/prysm/client/params",
visibility = ["//client:__subpackages__"],
importpath = "github.com/prysmaticlabs/prysm/validator/params",
visibility = ["//validator:__subpackages__"],
)
go_test(

View File

@@ -3,10 +3,10 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "go_default_library",
srcs = ["service.go"],
importpath = "github.com/prysmaticlabs/prysm/client/proposer",
visibility = ["//client:__subpackages__"],
importpath = "github.com/prysmaticlabs/prysm/validator/proposer",
visibility = ["//validator:__subpackages__"],
deps = [
"//client/types:go_default_library",
"//validator/types:go_default_library",
"@com_github_sirupsen_logrus//:go_default_library",
],
)

View File

@@ -5,7 +5,7 @@ package proposer
import (
"context"
"github.com/prysmaticlabs/prysm/client/types"
"github.com/prysmaticlabs/prysm/validator/types"
"github.com/sirupsen/logrus"
)
@@ -17,11 +17,11 @@ var log = logrus.WithField("prefix", "proposer")
type Proposer struct {
ctx context.Context
cancel context.CancelFunc
beaconService types.BeaconClient
beaconService types.BeaconValidator
}
// NewProposer creates a new attester instance.
func NewProposer(ctx context.Context, beaconService types.BeaconClient) *Proposer {
func NewProposer(ctx context.Context, beaconService types.BeaconValidator) *Proposer {
ctx, cancel := context.WithCancel(ctx)
return &Proposer{
ctx: ctx,

View File

@@ -3,8 +3,8 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "go_default_library",
srcs = ["service.go"],
importpath = "github.com/prysmaticlabs/prysm/client/rpcclient",
visibility = ["//client:__subpackages__"],
importpath = "github.com/prysmaticlabs/prysm/validator/rpcclient",
visibility = ["//validator:__subpackages__"],
deps = [
"//proto/beacon/rpc/v1:go_default_library",
"@com_github_sirupsen_logrus//:go_default_library",

View File

@@ -3,8 +3,8 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "go_default_library",
srcs = ["service.go"],
importpath = "github.com/prysmaticlabs/prysm/client/txpool",
visibility = ["//client:__subpackages__"],
importpath = "github.com/prysmaticlabs/prysm/validator/txpool",
visibility = ["//validator:__subpackages__"],
deps = [
"//shared/p2p:go_default_library",
"@com_github_ethereum_go_ethereum//event:go_default_library",

View File

@@ -8,12 +8,12 @@ go_library(
"interfaces.go",
"shard.go",
],
importpath = "github.com/prysmaticlabs/prysm/client/types",
visibility = ["//client:__subpackages__"],
importpath = "github.com/prysmaticlabs/prysm/validator/types",
visibility = ["//validator:__subpackages__"],
deps = [
"//client/params:go_default_library",
"//proto/beacon/rpc/v1:go_default_library",
"//shared:go_default_library",
"//validator/params:go_default_library",
"@com_github_ethereum_go_ethereum//common:go_default_library",
"@com_github_ethereum_go_ethereum//core/types:go_default_library",
"@com_github_ethereum_go_ethereum//crypto/sha3:go_default_library",

View File

@@ -9,8 +9,8 @@ import (
gethTypes "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto/sha3"
"github.com/ethereum/go-ethereum/rlp"
"github.com/prysmaticlabs/prysm/client/params"
"github.com/prysmaticlabs/prysm/shared"
"github.com/prysmaticlabs/prysm/validator/params"
)
// Collation defines a base struct that serves as a primitive equivalent of a "block"
@@ -43,7 +43,7 @@ type collationHeaderData struct {
ProposerSignature [32]byte // the proposer's signature for calculating collation hash.
}
// NewCollation initializes a collation and leaves it up to clients to serialize, deserialize
// NewCollation initializes a collation and leaves it up to validators to serialize, deserialize
// and provide the body and transactions upon creation.
func NewCollation(header *CollationHeader, body []byte, transactions []*gethTypes.Transaction) *Collation {
return &Collation{

View File

@@ -5,9 +5,9 @@ import (
pb "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1"
)
// BeaconClient defines a service that interacts with a beacon node via RPC to determine
// BeaconValidator defines a service that interacts with a beacon node via RPC to determine
// attestation/proposal responsibilities.
type BeaconClient interface {
type BeaconValidator interface {
AttesterAssignment() <-chan bool
ProposerAssignment() <-chan bool
}

View File

@@ -1,4 +1,4 @@
// Package types defines the types used throughout the client.
// Package types defines the types used throughout the validator.
package types
import (