mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-06 22:23:56 -05:00
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
This commit is contained in:
@@ -53,7 +53,7 @@ func (s *Service) HeadSyncContributionProofDomain(ctx context.Context, slot prim
|
||||
|
||||
// HeadSyncCommitteeIndices returns the sync committee index position using the head state. Input `slot` is taken in consideration
|
||||
// where validator's duty for `slot - 1` is used for block inclusion in `slot`. That means when a validator is at epoch boundary
|
||||
// across EPOCHS_PER_SYNC_COMMITTEE_PERIOD then the valiator will be considered using next period sync committee.
|
||||
// across EPOCHS_PER_SYNC_COMMITTEE_PERIOD then the validator will be considered using next period sync committee.
|
||||
//
|
||||
// Spec definition:
|
||||
// Being assigned to a sync committee for a given slot means that the validator produces and broadcasts signatures for slot - 1 for inclusion in slot.
|
||||
|
||||
@@ -1875,9 +1875,9 @@ func TestOnBlock_HandleBlockAttestations(t *testing.T) {
|
||||
r3 := bytesutil.ToBytes32(a3.Data.BeaconBlockRoot)
|
||||
require.Equal(t, false, service.cfg.ForkChoiceStore.HasNode(r3))
|
||||
|
||||
require.NoError(t, service.handleBlockAttestations(ctx, wsb.Block(), st)) // fine to use the same committe as st
|
||||
require.NoError(t, service.handleBlockAttestations(ctx, wsb.Block(), st)) // fine to use the same committee as st
|
||||
require.Equal(t, 0, service.cfg.AttPool.ForkchoiceAttestationCount())
|
||||
require.NoError(t, service.handleBlockAttestations(ctx, wsb3.Block(), st3)) // fine to use the same committe as st
|
||||
require.NoError(t, service.handleBlockAttestations(ctx, wsb3.Block(), st3)) // fine to use the same committee as st
|
||||
require.Equal(t, 1, len(service.cfg.AttPool.BlockAttestations()))
|
||||
}
|
||||
|
||||
|
||||
@@ -804,7 +804,7 @@ func TestFinalizedDeposits_ReturnsTrieCorrectly(t *testing.T) {
|
||||
require.NoError(t, dc.InsertFinalizedDeposits(context.Background(), 3))
|
||||
require.NoError(t, dc.InsertFinalizedDeposits(context.Background(), 4))
|
||||
|
||||
// Mimick finalized deposit trie fetch.
|
||||
// Mimic finalized deposit trie fetch.
|
||||
fd := dc.FinalizedDeposits(context.Background())
|
||||
deps := dc.NonFinalizedDeposits(context.Background(), fd.MerkleTrieIndex, big.NewInt(14))
|
||||
insertIndex := fd.MerkleTrieIndex + 1
|
||||
|
||||
@@ -150,7 +150,7 @@ func TestSlashValidator_OK(t *testing.T) {
|
||||
|
||||
maxBalance := params.BeaconConfig().MaxEffectiveBalance
|
||||
slashedBalance := state.Slashings()[state.Slot().Mod(uint64(params.BeaconConfig().EpochsPerSlashingsVector))]
|
||||
assert.Equal(t, maxBalance, slashedBalance, "Slashed balance isnt the expected amount")
|
||||
assert.Equal(t, maxBalance, slashedBalance, "Slashed balance isn't the expected amount")
|
||||
|
||||
whistleblowerReward := slashedBalance / params.BeaconConfig().WhistleBlowerRewardQuotient
|
||||
bal, err := state.BalanceAtIndex(proposer)
|
||||
|
||||
@@ -543,7 +543,7 @@ func TestStore_Blocks_Retrieve_SlotRangeWithStep(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, 150, len(retrieved))
|
||||
for _, b := range retrieved {
|
||||
assert.Equal(t, primitives.Slot(0), (b.Block().Slot()-100)%step, "Unexpect block slot %d", b.Block().Slot())
|
||||
assert.Equal(t, primitives.Slot(0), (b.Block().Slot()-100)%step, "Unexpected block slot %d", b.Block().Slot())
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
func TestCleanup(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
pc, err := NewPowchainCollector(ctx)
|
||||
assert.NoError(t, err, "Uxpected error caling NewPowchainCollector")
|
||||
assert.NoError(t, err, "Unexpected error calling NewPowchainCollector")
|
||||
unregistered := pc.unregister()
|
||||
assert.Equal(t, true, unregistered, "PowchainCollector.unregister did not return true (via prometheus.DefaultRegistry)")
|
||||
// PowchainCollector is a prometheus.Collector, so we should be able to register it again
|
||||
@@ -39,7 +39,7 @@ func TestCleanup(t *testing.T) {
|
||||
func TestCancelation(t *testing.T) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
pc, err := NewPowchainCollector(ctx)
|
||||
assert.NoError(t, err, "Uxpected error caling NewPowchainCollector")
|
||||
assert.NoError(t, err, "Unexpected error calling NewPowchainCollector")
|
||||
ticker := time.NewTicker(10 * time.Second)
|
||||
cancel()
|
||||
select {
|
||||
|
||||
@@ -202,7 +202,7 @@ func TestGossipTopicMapping_scanfcheck_GossipTopicFormattingSanityCheck(t *testi
|
||||
if string(c) == "%" {
|
||||
next := string(topic[i+1])
|
||||
if next != "d" && next != "x" {
|
||||
t.Errorf("Topic %s has formatting incompatiable with scanfcheck. Only %%d and %%x are supported", topic)
|
||||
t.Errorf("Topic %s has formatting incompatible with scanfcheck. Only %%d and %%x are supported", topic)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ func (ds *Server) GetPeer(_ context.Context, peerReq *ethpb.PeerRequest) (*ethpb
|
||||
return ds.getPeer(pid)
|
||||
}
|
||||
|
||||
// ListPeers returns all peers known to the host node, irregardless of if they are connected/
|
||||
// ListPeers returns all peers known to the host node, regardless of if they are connected/
|
||||
// disconnected.
|
||||
func (ds *Server) ListPeers(_ context.Context, _ *empty.Empty) (*ethpb.DebugPeerResponses, error) {
|
||||
var responses []*ethpb.DebugPeerResponse
|
||||
|
||||
@@ -409,7 +409,7 @@ func (m *MaxSpanChunksSlice) Update(
|
||||
// a min span chunk for use in chunk updates. To compute this value, we look at the difference between
|
||||
// H = historyLength and the current epoch. Then, we check if the source epoch > difference. If so,
|
||||
// then the start epoch is source epoch - 1. Otherwise, we return to the caller a boolean signifying
|
||||
// the input argumets are invalid for the chunk and the start epoch does not exist.
|
||||
// the input arguments are invalid for the chunk and the start epoch does not exist.
|
||||
func (m *MinSpanChunksSlice) StartEpoch(
|
||||
sourceEpoch, currentEpoch primitives.Epoch,
|
||||
) (epoch primitives.Epoch, exists bool) {
|
||||
|
||||
@@ -348,13 +348,13 @@ func TestBeaconState_HashTreeRoot(t *testing.T) {
|
||||
assert.NoError(t, err)
|
||||
root, err := testState.HashTreeRoot(context.Background())
|
||||
if err == nil && tt.error != "" {
|
||||
t.Errorf("Expected error, expected %v, recevied %v", tt.error, err)
|
||||
t.Errorf("Expected error, expected %v, received %v", tt.error, err)
|
||||
}
|
||||
pbState, err := statenative.ProtobufBeaconStatePhase0(testState.ToProtoUnsafe())
|
||||
require.NoError(t, err)
|
||||
genericHTR, err := pbState.HashTreeRoot()
|
||||
if err == nil && tt.error != "" {
|
||||
t.Errorf("Expected error, expected %v, recevied %v", tt.error, err)
|
||||
t.Errorf("Expected error, expected %v, received %v", tt.error, err)
|
||||
}
|
||||
assert.DeepNotEqual(t, []byte{}, root[:], "Received empty hash tree root")
|
||||
assert.DeepEqual(t, genericHTR[:], root[:], "Expected hash tree root to match generic")
|
||||
@@ -435,13 +435,13 @@ func TestBeaconState_HashTreeRoot_FieldTrie(t *testing.T) {
|
||||
assert.NoError(t, err)
|
||||
root, err := testState.HashTreeRoot(context.Background())
|
||||
if err == nil && tt.error != "" {
|
||||
t.Errorf("Expected error, expected %v, recevied %v", tt.error, err)
|
||||
t.Errorf("Expected error, expected %v, received %v", tt.error, err)
|
||||
}
|
||||
pbState, err := statenative.ProtobufBeaconStatePhase0(testState.ToProtoUnsafe())
|
||||
require.NoError(t, err)
|
||||
genericHTR, err := pbState.HashTreeRoot()
|
||||
if err == nil && tt.error != "" {
|
||||
t.Errorf("Expected error, expected %v, recevied %v", tt.error, err)
|
||||
t.Errorf("Expected error, expected %v, received %v", tt.error, err)
|
||||
}
|
||||
assert.DeepNotEqual(t, []byte{}, root[:], "Received empty hash tree root")
|
||||
assert.DeepEqual(t, genericHTR[:], root[:], "Expected hash tree root to match generic")
|
||||
|
||||
@@ -237,7 +237,7 @@ func recomputeRootFromLayerVariable(idx int, item [32]byte, layers [][]*[32]byte
|
||||
return root, layers, nil
|
||||
}
|
||||
|
||||
// AddInMixin describes a method from which a lenth mixin is added to the
|
||||
// AddInMixin describes a method from which a length mixin is added to the
|
||||
// provided root.
|
||||
func AddInMixin(root [32]byte, length uint64) ([32]byte, error) {
|
||||
rootBuf := new(bytes.Buffer)
|
||||
|
||||
@@ -329,7 +329,7 @@ func (s *Service) setSyncContributionBits(c *ethpb.SyncCommitteeContribution) er
|
||||
}
|
||||
bitsList, ok := v.([][]byte)
|
||||
if !ok {
|
||||
return errors.New("could not covert cached value to []bitfield.Bitvector")
|
||||
return errors.New("could not convert cached value to []bitfield.Bitvector")
|
||||
}
|
||||
has, err := bitListOverlaps(bitsList, c.AggregationBits)
|
||||
if err != nil {
|
||||
@@ -354,7 +354,7 @@ func (s *Service) hasSeenSyncContributionBits(c *ethpb.SyncCommitteeContribution
|
||||
}
|
||||
bitsList, ok := v.([][]byte)
|
||||
if !ok {
|
||||
return false, errors.New("could not covert cached value to []bitfield.Bitvector128")
|
||||
return false, errors.New("could not convert cached value to []bitfield.Bitvector128")
|
||||
}
|
||||
return bitListOverlaps(bitsList, c.AggregationBits.Bytes())
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ func (m MetadataV0) MetadataObjV0() *pb.MetaDataV0 {
|
||||
return m.md
|
||||
}
|
||||
|
||||
// MetadataObjV1 returns the inner metatdata object in its type
|
||||
// MetadataObjV1 returns the inner metadata object in its type
|
||||
// specified form. If it doesn't exist then we return nothing.
|
||||
func (_ MetadataV0) MetadataObjV1() *pb.MetaDataV1 {
|
||||
return nil
|
||||
@@ -147,7 +147,7 @@ func (_ MetadataV1) MetadataObjV0() *pb.MetaDataV0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MetadataObjV1 returns the inner metatdata object in its type
|
||||
// MetadataObjV1 returns the inner metadata object in its type
|
||||
// specified form. If it doesn't exist then we return nothing.
|
||||
func (m MetadataV1) MetadataObjV1() *pb.MetaDataV1 {
|
||||
return m.md
|
||||
|
||||
@@ -14,7 +14,7 @@ var _ heap.Interface = &queue{}
|
||||
|
||||
// some tests rely on the ordering of items from this method
|
||||
func testCases() (tc []*Item) {
|
||||
// create a slice of items with priority / times offest by these seconds
|
||||
// create a slice of items with priority / times offset by these seconds
|
||||
for i, m := range []time.Duration{
|
||||
5,
|
||||
183600, // 51 hours
|
||||
|
||||
@@ -78,7 +78,7 @@ func TestValidatorRegister_OK(t *testing.T) {
|
||||
merkleTreeIndex[i] = binary.LittleEndian.Uint64(idx)
|
||||
}
|
||||
|
||||
assert.Equal(t, uint64(0), merkleTreeIndex[0], "Deposit event total desposit count miss matched")
|
||||
assert.Equal(t, uint64(1), merkleTreeIndex[1], "Deposit event total desposit count miss matched")
|
||||
assert.Equal(t, uint64(2), merkleTreeIndex[2], "Deposit event total desposit count miss matched")
|
||||
assert.Equal(t, uint64(0), merkleTreeIndex[0], "Deposit event total deposit count mismatched")
|
||||
assert.Equal(t, uint64(1), merkleTreeIndex[1], "Deposit event total deposit count mismatched")
|
||||
assert.Equal(t, uint64(2), merkleTreeIndex[2], "Deposit event total deposit count mismatched")
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ func (cf *VersionedUnmarshaler) UnmarshalBeaconState(marshaled []byte) (s state.
|
||||
}
|
||||
|
||||
var beaconBlockSlot = fieldSpec{
|
||||
// ssz variable length offset (not to be confused with the fieldSpec offest) is a uint32
|
||||
// ssz variable length offset (not to be confused with the fieldSpec offset) is a uint32
|
||||
// variable length. Offsets come before fixed length data, so that's 4 bytes at the beginning
|
||||
// then signature is 96 bytes, 4+96 = 100
|
||||
offset: 100,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Continous Integration script to check that BUILD.bazel files are as expected
|
||||
# Continuous Integration script to check that BUILD.bazel files are as expected
|
||||
# when generated from gazelle.
|
||||
|
||||
# Duplicate redirect 5 to stdout so that it can be captured, but still printed
|
||||
|
||||
@@ -155,7 +155,7 @@ cat << EOF
|
||||
|
||||
-c Move discovered coverage reports to the trash
|
||||
-z FILE Upload specified file directly to Codecov and bypass all report generation.
|
||||
This is inteded to be used only with a pre-formatted Codecov report and is not
|
||||
This is intended to be used only with a pre-formatted Codecov report and is not
|
||||
expected to work under any other circumstances.
|
||||
-Z Exit with 1 if not successful. Default will Exit with 0
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ if git diff-index --quiet HEAD --; then
|
||||
echo "nothing to push, exiting early"
|
||||
exit 0
|
||||
else
|
||||
echo "changes detected, commiting and pushing to ethereumapis"
|
||||
echo "changes detected, committing and pushing to ethereumapis"
|
||||
fi
|
||||
|
||||
# Push to the mirror repository
|
||||
|
||||
@@ -12,7 +12,7 @@ type Scraper interface {
|
||||
|
||||
// An Updater can take the io.Reader created by Scraper and
|
||||
// send it to a data sink for consumption. An Updater is used
|
||||
// for instance ot send the scraped data for a beacon-node to
|
||||
// for instance to send the scraped data for a beacon-node to
|
||||
// a remote client-stats endpoint.
|
||||
type Updater interface {
|
||||
Update(io.Reader) error
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
"github.com/prysmaticlabs/prysm/v4/time/slots"
|
||||
)
|
||||
|
||||
// IsForkNextEpoch checks if an alloted fork is in the following epoch.
|
||||
// IsForkNextEpoch checks if an allotted fork is in the following epoch.
|
||||
func IsForkNextEpoch(genesisTime time.Time, genesisValidatorsRoot []byte) (bool, error) {
|
||||
if genesisTime.IsZero() {
|
||||
return false, errors.New("genesis time is not set")
|
||||
|
||||
@@ -740,7 +740,7 @@ message ListValidatorAssignmentsRequest {
|
||||
}
|
||||
// 48 byte validator public keys to filter assignments for the given epoch.
|
||||
repeated bytes public_keys = 3 [(ethereum.eth.ext.ssz_size) = "?,48"];
|
||||
// Validator indicies to filter assignments for the given epoch.
|
||||
// Validator indices to filter assignments for the given epoch.
|
||||
repeated uint64 indices = 4 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v4/consensus-types/primitives.ValidatorIndex"];
|
||||
|
||||
// The maximum number of ValidatorAssignments to return in the response.
|
||||
|
||||
@@ -10,7 +10,7 @@ At the core of Ethereum Serenity lies the "Beacon Chain", a proof-of-stake based
|
||||
|---------|---------|---------|-------------|
|
||||
| eth | BeaconChain | v1alpha1 | This service is used to retrieve critical data relevant to the Ethereum Beacon Chain, including the most recent head block, current pending deposits, the chain state and more. |
|
||||
| eth | Node | v1alpha1 | The Node service returns information about the Ethereum node itself, including versioning and general information as well as network sync status and a list of services currently implemented on the node.
|
||||
| eth | Validator | v1alpha1 | This API provides the information a validator needs to retrieve throughout its lifecycle, including recieved assignments from the network, its current index in the state, as well the rewards and penalties that have been applied to it.
|
||||
| eth | Validator | v1alpha1 | This API provides the information a validator needs to retrieve throughout its lifecycle, including received assignments from the network, its current index in the state, as well the rewards and penalties that have been applied to it.
|
||||
|
||||
### JSON Mapping
|
||||
|
||||
|
||||
@@ -243,7 +243,7 @@ func (r *testRunner) waitForMatchingHead(ctx context.Context, timeout time.Durat
|
||||
for {
|
||||
select {
|
||||
case <-dctx.Done():
|
||||
// deadline ensures that the test eventually exits when beacon node fails to sync in a resonable timeframe
|
||||
// deadline ensures that the test eventually exits when beacon node fails to sync in a reasonable timeframe
|
||||
elapsed := time.Since(start)
|
||||
return fmt.Errorf("deadline exceeded after %s waiting for known good block to appear in checkpoint-synced node", elapsed)
|
||||
default:
|
||||
|
||||
@@ -69,7 +69,7 @@ func validatorsAreActive(ec *types.EvaluationContext, conns ...*grpc.ClientConn)
|
||||
expectedCount := params.BeaconConfig().MinGenesisActiveValidatorCount
|
||||
receivedCount := uint64(len(validators.ValidatorList))
|
||||
if expectedCount != receivedCount {
|
||||
return fmt.Errorf("expected validator count to be %d, recevied %d", expectedCount, receivedCount)
|
||||
return fmt.Errorf("expected validator count to be %d, received %d", expectedCount, receivedCount)
|
||||
}
|
||||
|
||||
effBalanceLowCount := 0
|
||||
|
||||
4
third_party/usb/usb_disabled.go
vendored
4
third_party/usb/usb_disabled.go
vendored
@@ -16,7 +16,7 @@
|
||||
package usb
|
||||
|
||||
// Supported returns whether this platform is supported by the USB library or not.
|
||||
// The goal of this method is to allow programatically handling platforms that do
|
||||
// The goal of this method is to allow programmatically handling platforms that do
|
||||
// not support USB and not having to fall back to build constraints.
|
||||
func Supported() bool {
|
||||
return false
|
||||
@@ -43,7 +43,7 @@ func EnumerateHid(vendorID uint16, productID uint16) ([]DeviceInfo, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// Open connects to a previsouly discovered USB device.
|
||||
// Open connects to a previously discovered USB device.
|
||||
func (info DeviceInfo) Open() (Device, error) {
|
||||
return nil, ErrUnsupportedPlatform
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ func displayHeads(clients map[string]pb.BeaconChainClient) {
|
||||
}
|
||||
}
|
||||
|
||||
// compare heads between all RPC end points, log the missmatch if there's one.
|
||||
// compare heads between all RPC end points, log the mismatch if there's one.
|
||||
func compareHeads(clients map[string]pb.BeaconChainClient) {
|
||||
endpt1 := randomEndpt(clients)
|
||||
head1, err := clients[endpt1].GetChainHead(context.Background(), &emptypb.Empty{})
|
||||
@@ -101,7 +101,7 @@ func compareHeads(clients map[string]pb.BeaconChainClient) {
|
||||
log.Fatal(err)
|
||||
}
|
||||
if !reflect.DeepEqual(head1, head2) {
|
||||
log.Error("Uh oh! Heads missmatched!")
|
||||
log.Error("Uh oh! Heads mismatched!")
|
||||
logHead(endpt1, head1)
|
||||
logHead(endpt2, head2)
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
var (
|
||||
numKeys = flag.Int("num-keys", 0, "Number of validator private/withdrawal keys to generate")
|
||||
startIndex = flag.Uint64("start-index", 0, "Start index for the determinstic keygen algorithm")
|
||||
startIndex = flag.Uint64("start-index", 0, "Start index for the deterministic keygen algorithm")
|
||||
random = flag.Bool("random", false, "Randomly generate keys")
|
||||
outputJSON = flag.String("output-json", "", "JSON file to write output to")
|
||||
overwrite = flag.Bool("overwrite", false, "If the key file exists, it will be overwritten")
|
||||
|
||||
@@ -31,7 +31,7 @@ const (
|
||||
RoleAggregator
|
||||
// RoleSyncCommittee means that the validator should submit a sync committee message.
|
||||
RoleSyncCommittee
|
||||
// RoleSyncCommitteeAggregator means the valiator should aggregate sync committee messages and submit a sync committee contribution.
|
||||
// RoleSyncCommitteeAggregator means the validator should aggregate sync committee messages and submit a sync committee contribution.
|
||||
RoleSyncCommitteeAggregator
|
||||
)
|
||||
|
||||
|
||||
@@ -226,7 +226,7 @@ func TestKeyReload_NoActiveKey(t *testing.T) {
|
||||
assert.Equal(t, true, v.HandleKeyReloadCalled)
|
||||
// HandleKeyReloadCalled in the FakeValidator returns true if one of the keys is equal to the
|
||||
// ActiveKey. Since we are using a key we know is not active, it should return false, which
|
||||
// sould cause the account change handler to call WaitForActivationCalled.
|
||||
// should cause the account change handler to call WaitForActivationCalled.
|
||||
assert.Equal(t, 1, v.WaitForActivationCalled)
|
||||
}
|
||||
|
||||
|
||||
@@ -222,7 +222,7 @@ func TestWaitForChainStart_SetsGenesisInfo(t *testing.T) {
|
||||
assert.Equal(t, genesis, v.genesisTime, "Unexpected chain start time")
|
||||
assert.NotNil(t, v.ticker, "Expected ticker to be set, received nil")
|
||||
|
||||
// Make sure theres no errors running if its the same data.
|
||||
// Make sure there are no errors running if it is the same data.
|
||||
client.EXPECT().WaitForChainStart(
|
||||
gomock.Any(),
|
||||
&emptypb.Empty{},
|
||||
@@ -264,7 +264,7 @@ func TestWaitForChainStart_SetsGenesisInfo_IncorrectSecondTry(t *testing.T) {
|
||||
|
||||
genesisValidatorsRoot = bytesutil.ToBytes32([]byte("badvalidators"))
|
||||
|
||||
// Make sure theres no errors running if its the same data.
|
||||
// Make sure there are no errors running if it is the same data.
|
||||
client.EXPECT().WaitForChainStart(
|
||||
gomock.Any(),
|
||||
&emptypb.Empty{},
|
||||
|
||||
@@ -13,7 +13,7 @@ func (s *Store) SaveGenesisValidatorsRoot(_ context.Context, genValRoot []byte)
|
||||
bkt := tx.Bucket(genesisInfoBucket)
|
||||
enc := bkt.Get(genesisValidatorsRootKey)
|
||||
if len(enc) != 0 {
|
||||
return fmt.Errorf("cannot overwite existing genesis validators root: %#x", enc)
|
||||
return fmt.Errorf("cannot overwrite existing genesis validators root: %#x", enc)
|
||||
}
|
||||
return bkt.Put(genesisValidatorsRootKey, genValRoot)
|
||||
})
|
||||
|
||||
@@ -151,7 +151,7 @@ func logValidatorWebAuth(validatorWebAddr, token string, tokenPath string) {
|
||||
url.QueryEscape(token),
|
||||
)
|
||||
log.Infof(
|
||||
"Once your validator process is runinng, navigate to the link below to authenticate with " +
|
||||
"Once your validator process is running, navigate to the link below to authenticate with " +
|
||||
"the Prysm web interface",
|
||||
)
|
||||
log.Info(webAuthURL)
|
||||
|
||||
@@ -112,7 +112,7 @@ func Test_initializeAuthToken(t *testing.T) {
|
||||
}
|
||||
|
||||
// "createTokenString" now uses jwt.RegisteredClaims instead of jwt.StandardClaims (deprecated),
|
||||
// make sure emtpy jwt.RegisteredClaims and empty jwt.StandardClaims generates the same token.
|
||||
// make sure empty jwt.RegisteredClaims and empty jwt.StandardClaims generates the same token.
|
||||
func Test_UseRegisteredClaimInsteadOfStandClaims(t *testing.T) {
|
||||
jwtsecret, err := hex.DecodeString("12345678900123456789abcdeffedcba")
|
||||
require.NoError(t, err)
|
||||
|
||||
Reference in New Issue
Block a user