diff --git a/beacon-chain/blockchain/service.go b/beacon-chain/blockchain/service.go index e804c08569..1afc2ca08f 100644 --- a/beacon-chain/blockchain/service.go +++ b/beacon-chain/blockchain/service.go @@ -171,14 +171,17 @@ func (c *ChainService) updateHead(processedBlock <-chan *types.Block) { newHead = block headUpdated = true } - } else { // 2a. Pick the block with the higher last_finalized_slot. // 2b. If same, pick the block with the higher last_justified_slot. - if blockcState.LastFinalizedSlot() > currentcState.LastFinalizedSlot() { + } else if blockcState.LastFinalizedSlot() > currentcState.LastFinalizedSlot() { + newHead = block + headUpdated = true + } else if blockcState.LastFinalizedSlot() == currentcState.LastFinalizedSlot() { + if blockcState.LastJustifiedSlot() > currentcState.LastJustifiedSlot() { newHead = block headUpdated = true - } else if blockcState.LastFinalizedSlot() == currentcState.LastFinalizedSlot() { - if blockcState.LastJustifiedSlot() > currentcState.LastJustifiedSlot() { + } else if blockcState.LastJustifiedSlot() == currentcState.LastJustifiedSlot() { + if block.SlotNumber() > currentHead.SlotNumber() { newHead = block headUpdated = true } @@ -269,6 +272,7 @@ func (c *ChainService) blockProcessing(processedBlock chan<- *types.Block) { // and apply a block scoring function. var didCycleTransition bool for cState.IsCycleTransition(block.SlotNumber()) { + log.Infof("executing state transition for slot %d", block.SlotNumber()) cState, err = cState.NewStateRecalculations( aState, block, @@ -300,7 +304,7 @@ func (c *ChainService) blockProcessing(processedBlock chan<- *types.Block) { continue } - log.Infof("Finished processing received block: %#x", blockHash) + log.Infof("Processed block: %#x", blockHash) c.unfinalizedBlocks[blockHash] = &statePair{ crystallizedState: cState, diff --git a/beacon-chain/blockchain/service_test.go b/beacon-chain/blockchain/service_test.go index ff2ab9a188..30e1665a52 100644 --- a/beacon-chain/blockchain/service_test.go +++ b/beacon-chain/blockchain/service_test.go @@ -215,7 +215,7 @@ func TestRunningChainService(t *testing.T) { exitRoutine <- true testutil.AssertLogsContain(t, hook, "Chain service context closed, exiting goroutine") testutil.AssertLogsContain(t, hook, "Block points to nil parent") - testutil.AssertLogsContain(t, hook, "Finished processing received block") + testutil.AssertLogsContain(t, hook, "Processed block") } func TestDoesPOWBlockExist(t *testing.T) { diff --git a/beacon-chain/casper/incentives.go b/beacon-chain/casper/incentives.go index f95daef425..9b3d1011c5 100644 --- a/beacon-chain/casper/incentives.go +++ b/beacon-chain/casper/incentives.go @@ -21,8 +21,8 @@ func CalculateRewards( timeSinceFinality uint64) []*pb.ValidatorRecord { totalDeposit := TotalActiveValidatorDeposit(validators) activeValidators := ActiveValidatorIndices(validators) - rewardQuotient := uint64(RewardQuotient(validators)) - penaltyQuotient := uint64(quadraticPenaltyQuotient()) + rewardQuotient := RewardQuotient(validators) + penaltyQuotient := quadraticPenaltyQuotient() log.Debugf("Applying rewards and penalties for the validators for slot %d", slot) if timeSinceFinality <= 3*params.GetConfig().CycleLength { @@ -86,7 +86,7 @@ func SlotMaxInterestRate(validators []*pb.ValidatorRecord) float64 { // quadraticPenaltyQuotient is the quotient that will be used to apply penalties to offline // validators. func quadraticPenaltyQuotient() uint64 { - dropTimeFactor := params.GetConfig().SqrtExpDropTime / params.GetConfig().SlotDuration + dropTimeFactor := params.GetConfig().SqrtExpDropTime return dropTimeFactor * dropTimeFactor } @@ -95,7 +95,7 @@ func quadraticPenaltyQuotient() uint64 { func QuadraticPenalty(numberOfSlots uint64) uint64 { slotFactor := (numberOfSlots * numberOfSlots) / 2 penaltyQuotient := quadraticPenaltyQuotient() - return slotFactor / uint64(penaltyQuotient) + return slotFactor / penaltyQuotient } // RewardValidatorCrosslink applies rewards to validators part of a shard committee for voting on a shard. diff --git a/beacon-chain/casper/incentives_test.go b/beacon-chain/casper/incentives_test.go index b43a59689a..688c17e496 100644 --- a/beacon-chain/casper/incentives_test.go +++ b/beacon-chain/casper/incentives_test.go @@ -116,7 +116,7 @@ func TestSlotMaxInterestRate(t *testing.T) { func TestQuadraticPenaltyQuotient(t *testing.T) { penaltyQuotient := quadraticPenaltyQuotient() - if penaltyQuotient != uint64(math.Pow(math.Pow(2, 13), 2)) { + if penaltyQuotient != uint64(math.Pow(2, 32)) { t.Errorf("incorrect penalty quotient %d", penaltyQuotient) } } diff --git a/beacon-chain/casper/sharding.go b/beacon-chain/casper/sharding.go index f42fafbab8..92a524f8c0 100644 --- a/beacon-chain/casper/sharding.go +++ b/beacon-chain/casper/sharding.go @@ -8,8 +8,8 @@ import ( ) // ShuffleValidatorsToCommittees shuffles validator indices and splits them by slot and shard. -func ShuffleValidatorsToCommittees(seed common.Hash, activeValidators []*pb.ValidatorRecord, crosslinkStartShard uint64) ([]*pb.ShardAndCommitteeArray, error) { - indices := ActiveValidatorIndices(activeValidators) +func ShuffleValidatorsToCommittees(seed common.Hash, validators []*pb.ValidatorRecord, crosslinkStartShard uint64) ([]*pb.ShardAndCommitteeArray, error) { + indices := ActiveValidatorIndices(validators) // split the shuffled list for slot. shuffledValidators, err := utils.ShuffleIndices(seed, indices) @@ -29,8 +29,12 @@ func InitialShardAndCommitteesForSlots(validators []*pb.ValidatorRecord) ([]*pb. return nil, err } - // Starting with 2 cycles (128 slots) with the same committees. - return append(committees, committees...), nil + // Initialize with 3 cycles of the same committees. + initialCommittees := make([]*pb.ShardAndCommitteeArray, 0, 3*params.GetConfig().CycleLength) + initialCommittees = append(initialCommittees, committees...) + initialCommittees = append(initialCommittees, committees...) + initialCommittees = append(initialCommittees, committees...) + return initialCommittees, nil } // splitBySlotShard splits the validator list into evenly sized committees and assigns each diff --git a/beacon-chain/casper/sharding_test.go b/beacon-chain/casper/sharding_test.go index 6738d5e11b..077333a0d0 100644 --- a/beacon-chain/casper/sharding_test.go +++ b/beacon-chain/casper/sharding_test.go @@ -77,7 +77,7 @@ func TestInitialShardAndCommiteeForSlots(t *testing.T) { t.Fatalf("unable to get initial shard committees %v", err) } - if uint64(len(shardAndCommitteeArray)) != 2*params.GetConfig().CycleLength { + if uint64(len(shardAndCommitteeArray)) != 3*params.GetConfig().CycleLength { t.Errorf("shard committee slots are not as expected: %d instead of %d", len(shardAndCommitteeArray), 2*params.GetConfig().CycleLength) } diff --git a/beacon-chain/casper/validator.go b/beacon-chain/casper/validator.go index f95b9ffe8e..7ce7caf086 100644 --- a/beacon-chain/casper/validator.go +++ b/beacon-chain/casper/validator.go @@ -23,7 +23,7 @@ func InitialValidators() []*pb.ValidatorRecord { for i := 0; i < params.GetConfig().BootstrappedValidatorsCount; i++ { validators[i] = &pb.ValidatorRecord{ Status: uint64(params.Active), - Balance: uint64(params.GetConfig().DepositSize), + Balance: uint64(params.GetConfig().DepositSize) * uint64(params.GetConfig().Gwei), WithdrawalAddress: []byte{}, Pubkey: []byte{}, RandaoCommitment: randaoReveal[:], @@ -35,55 +35,41 @@ func InitialValidators() []*pb.ValidatorRecord { // ActiveValidatorIndices filters out active validators based on validator status // and returns their indices in a list. func ActiveValidatorIndices(validators []*pb.ValidatorRecord) []uint32 { - var indices = make([]uint32, len(validators)) + indices := make([]uint32, 0, len(validators)) for i := 0; i < len(validators); i++ { if validators[i].Status == uint64(params.Active) { indices = append(indices, uint32(i)) } - } - return indices[len(validators):] -} -// ExitedValidatorIndices filters out exited validators based on validator status -// and returns their indices in a list. -func ExitedValidatorIndices(validators []*pb.ValidatorRecord) []uint32 { - var indices = make([]uint32, len(validators)) - for i := 0; i < len(validators); i++ { - if validators[i].Status == uint64(params.PendingExit) { - indices = append(indices, uint32(i)) - } } - return indices[len(validators):] -} - -// QueuedValidatorIndices filters out queued validators based on validator status -// and returns their indices in a list. -func QueuedValidatorIndices(validators []*pb.ValidatorRecord) []uint32 { - var indices = make([]uint32, len(validators)) - for i := 0; i < len(validators); i++ { - if validators[i].Status == uint64(params.PendingActivation) { - indices = append(indices, uint32(i)) - } - } - return indices[len(validators):] + return indices } // GetShardAndCommitteesForSlot returns the attester set of a given slot. func GetShardAndCommitteesForSlot(shardCommittees []*pb.ShardAndCommitteeArray, lastStateRecalc uint64, slot uint64) (*pb.ShardAndCommitteeArray, error) { + cycleLength := params.GetConfig().CycleLength + var lowerBound uint64 - if lastStateRecalc >= params.GetConfig().CycleLength { - lowerBound = lastStateRecalc - params.GetConfig().CycleLength + if lastStateRecalc >= cycleLength { + lowerBound = lastStateRecalc - cycleLength } - upperBound := lastStateRecalc + params.GetConfig().CycleLength + upperBound := lastStateRecalc + 2*cycleLength if slot < lowerBound || slot >= upperBound { - return nil, fmt.Errorf("cannot return attester set of given slot, input slot %v has to be in between %v and %v", + return nil, fmt.Errorf("slot %d out of bounds: %d <= slot < %d", slot, lowerBound, upperBound, ) } - return shardCommittees[slot-lowerBound], nil + // If in the previous or current cycle, simply calculate offset + if slot < lastStateRecalc+2*cycleLength { + return shardCommittees[slot-lowerBound], nil + } + + // Otherwise, use the 3rd cycle + index := lowerBound + 2*cycleLength + slot%cycleLength + return shardCommittees[index], nil } // AreAttesterBitfieldsValid validates that the length of the attester bitfield matches the attester indices @@ -195,9 +181,9 @@ func ValidatorSlotAndRole(pubKey []byte, validators []*pb.ValidatorRecord, shard // TotalActiveValidatorDeposit returns the total deposited amount in Gwei for all active validators. func TotalActiveValidatorDeposit(validators []*pb.ValidatorRecord) uint64 { var totalDeposit uint64 - activeValidators := ActiveValidatorIndices(validators) + indices := ActiveValidatorIndices(validators) - for _, index := range activeValidators { + for _, index := range indices { totalDeposit += validators[index].GetBalance() } return totalDeposit @@ -211,19 +197,6 @@ func TotalActiveValidatorDepositInEth(validators []*pb.ValidatorRecord) uint64 { return depositInEth } -// CommitteeInShardAndSlot returns the shard committee for a a particular slot index and shard. -func CommitteeInShardAndSlot(slotIndex uint64, shardID uint64, shardCommitteeArray []*pb.ShardAndCommitteeArray) ([]uint32, error) { - shardCommittee := shardCommitteeArray[slotIndex].ArrayShardAndCommittee - - for i := 0; i < len(shardCommittee); i++ { - if shardID == shardCommittee[i].Shard { - return shardCommittee[i].Committee, nil - } - } - - return nil, fmt.Errorf("unable to find committee based on slot index: %v, and Shard: %v", slotIndex, shardID) -} - // VotedBalanceInAttestation checks for the total balance in the validator set and the balances of the voters in the // attestation. func VotedBalanceInAttestation(validators []*pb.ValidatorRecord, indices []uint32, diff --git a/beacon-chain/casper/validator_test.go b/beacon-chain/casper/validator_test.go index 58cf0db1f1..35dacb36ad 100644 --- a/beacon-chain/casper/validator_test.go +++ b/beacon-chain/casper/validator_test.go @@ -3,7 +3,6 @@ package casper import ( "bytes" "math/big" - "reflect" "testing" "github.com/prysmaticlabs/prysm/beacon-chain/params" @@ -51,7 +50,7 @@ func TestHasVoted(t *testing.T) { func TestInitialValidators(t *testing.T) { validators := InitialValidators() for _, validator := range validators { - if validator.GetBalance() != uint64(params.GetConfig().DepositSize) { + if validator.GetBalance() != uint64(params.GetConfig().DepositSize)*uint64(params.GetConfig().Gwei) { t.Fatalf("deposit size of validator is not expected %d", validator.GetBalance()) } if validator.GetStatus() != uint64(params.Active) { @@ -59,50 +58,6 @@ func TestInitialValidators(t *testing.T) { } } } -func TestValidatorIndices(t *testing.T) { - data := &pb.CrystallizedState{ - Validators: []*pb.ValidatorRecord{ - {Pubkey: []byte{}, Status: uint64(params.Active)}, // active. - {Pubkey: []byte{}, Status: uint64(params.Active)}, // active. - {Pubkey: []byte{}, Status: uint64(params.Active)}, // active. - {Pubkey: []byte{}, Status: uint64(params.Active)}, // active. - {Pubkey: []byte{}, Status: uint64(params.Active)}, // active. - {Pubkey: []byte{}, Status: uint64(params.PendingActivation)}, // queued. - }, - ValidatorSetChangeSlot: 1, - } - - if !reflect.DeepEqual(ActiveValidatorIndices(data.Validators), []uint32{0, 1, 2, 3, 4}) { - t.Errorf("active validator indices should be [0 1 2 3 4], got: %v", ActiveValidatorIndices(data.Validators)) - } - if !reflect.DeepEqual(QueuedValidatorIndices(data.Validators), []uint32{5}) { - t.Errorf("queued validator indices should be [5], got: %v", QueuedValidatorIndices(data.Validators)) - } - if len(ExitedValidatorIndices(data.Validators)) != 0 { - t.Errorf("exited validator indices to be empty, got: %v", ExitedValidatorIndices(data.Validators)) - } - - data = &pb.CrystallizedState{ - Validators: []*pb.ValidatorRecord{ - {Pubkey: []byte{}, Status: uint64(params.Active)}, // active. - {Pubkey: []byte{}, Status: uint64(params.Active)}, // active. - {Pubkey: []byte{}, Status: uint64(params.PendingActivation)}, // queued. - {Pubkey: []byte{}, Status: uint64(params.PendingActivation)}, // queued. - {Pubkey: []byte{}, Status: uint64(params.PendingExit)}, // exited. - {Pubkey: []byte{}, Status: uint64(params.PendingExit)}, // exited. - }, - } - - if !reflect.DeepEqual(ActiveValidatorIndices(data.Validators), []uint32{0, 1}) { - t.Errorf("active validator indices should be [0, 1], got: %v", ActiveValidatorIndices(data.Validators)) - } - if !reflect.DeepEqual(QueuedValidatorIndices(data.Validators), []uint32{2, 3}) { - t.Errorf("queued validator indices should be [2, 3], got: %v", QueuedValidatorIndices(data.Validators)) - } - if !reflect.DeepEqual(ExitedValidatorIndices(data.Validators), []uint32{4, 5}) { - t.Errorf("exited validator indices should be [4, 5], got: %v", ExitedValidatorIndices(data.Validators)) - } -} func TestAreAttesterBitfieldsValid(t *testing.T) { attestation := &pb.AggregatedAttestation{ @@ -297,47 +252,6 @@ func TestTotalActiveValidatorDeposit(t *testing.T) { } } -func TestCommitteeInShardAndSlot(t *testing.T) { - - testCommittee := []uint32{20, 21, 22, 23, 24, 25, 26} - - shardCommittees := []*pb.ShardAndCommitteeArray{ - {ArrayShardAndCommittee: []*pb.ShardAndCommittee{ - {Shard: 0, Committee: []uint32{0, 1, 2, 3, 4, 5, 6}}, - {Shard: 1, Committee: []uint32{7, 8, 9, 10, 11, 12, 13}}, - {Shard: 3, Committee: []uint32{14, 15, 16, 17, 18, 19}}, - }}, - {ArrayShardAndCommittee: []*pb.ShardAndCommittee{ - {Shard: 3, Committee: testCommittee}, - {Shard: 4, Committee: []uint32{27, 28, 29, 30, 31, 32, 33}}, - {Shard: 5, Committee: []uint32{34, 35, 36, 37, 38, 39}}, - }}, - {ArrayShardAndCommittee: []*pb.ShardAndCommittee{ - {Shard: 3, Committee: []uint32{40, 41, 42, 43, 44, 45, 46}}, - {Shard: 7, Committee: []uint32{47, 48, 49, 50, 51, 52, 53}}, - {Shard: 8, Committee: []uint32{54, 55, 56, 57, 58, 59}}, - }}, - } - _, err := CommitteeInShardAndSlot(2, 5, shardCommittees) - if err == nil { - t.Fatalf("function did not return error even though committee for shard does not exist") - } - - committee, err := CommitteeInShardAndSlot(1, 3, shardCommittees) - if err != nil { - t.Fatalf("unable to get committees for shard: %v", err) - } - - if len(committee) != len(testCommittee) { - t.Fatalf("the committees are not of the same sizes %d : %d", len(committee), len(testCommittee)) - } - for i, indice := range committee { - if indice != testCommittee[i] { - t.Errorf("retrieved indice is not the same as the one put in the committee %d , %d", indice, testCommittee[i]) - } - } -} - func TestVotedBalanceInAttestation(t *testing.T) { var validators []*pb.ValidatorRecord defaultBalance := uint64(1e9) diff --git a/beacon-chain/params/config.go b/beacon-chain/params/config.go index 722c62c208..a2f58821ac 100644 --- a/beacon-chain/params/config.go +++ b/beacon-chain/params/config.go @@ -45,7 +45,7 @@ var defaultConfig = &Config{ Gwei: 1e9, DepositSize: 32, MinDeposit: 16, - SlotDuration: uint64(8), + SlotDuration: uint64(16), MinCommiteeSize: uint64(128), BootstrappedValidatorsCount: 1000, MinValidatorSetChangeInterval: uint64(256), @@ -63,7 +63,7 @@ var demoConfig = &Config{ Gwei: 1e9, DepositSize: 32, MinDeposit: 16, - SlotDuration: uint64(8), + SlotDuration: uint64(2), MinCommiteeSize: uint64(3), MinValidatorSetChangeInterval: uint64(256), BaseRewardQuotient: uint64(32768), diff --git a/beacon-chain/types/block.go b/beacon-chain/types/block.go index 6b47bbcc9e..7dbbfef366 100644 --- a/beacon-chain/types/block.go +++ b/beacon-chain/types/block.go @@ -181,14 +181,12 @@ func (b *Block) IsValid( cState.LastStateRecalculationSlot(), b.SlotNumber()) if err != nil { - log.Errorf("Cannot get proposer index %v", err) + log.Errorf("Cannot get proposer index: %v", err) return false } - log.Infof("Proposer index: %v", proposerIndex) if enableAttestationValidity { // verify proposer from last slot is in the first attestation object in AggregatedAttestation. - log.Infof("Proposer index: %v", proposerIndex) if isBitSet, err := bitutil.CheckBit(b.Attestations()[0].AttesterBitfield, int(proposerIndex)); !isBitSet { log.Errorf("Can not locate proposer in the first attestation of AttestionRecord %v", err) return false diff --git a/beacon-chain/types/crystallized_state.go b/beacon-chain/types/crystallized_state.go index 9fabb7640a..3fb7233389 100644 --- a/beacon-chain/types/crystallized_state.go +++ b/beacon-chain/types/crystallized_state.go @@ -232,18 +232,22 @@ func (c *CrystallizedState) isValidatorSetChange(slotNumber uint64) bool { // getAttesterIndices fetches the attesters for a given attestation record. func (c *CrystallizedState) getAttesterIndices(attestation *pb.AggregatedAttestation) ([]uint32, error) { - var lowerBound uint64 - if c.LastStateRecalculationSlot() >= params.GetConfig().CycleLength { - lowerBound = c.LastStateRecalculationSlot() - params.GetConfig().CycleLength - } - upperBound := c.LastStateRecalculationSlot() + params.GetConfig().CycleLength - - if attestation.GetSlot() < lowerBound || attestation.GetSlot() >= upperBound { - return nil, fmt.Errorf("attestation slot %d out of bound: %d <= slot < %d", attestation.GetSlot(), lowerBound, upperBound) + shardCommittees, err := casper.GetShardAndCommitteesForSlot( + c.ShardAndCommitteesForSlots(), + c.LastStateRecalculationSlot(), + attestation.GetSlot()) + if err != nil { + return nil, fmt.Errorf("unable to fetch ShardAndCommittees for slot %d: %v", attestation.Slot, err) } - slotIndex := attestation.Slot - lowerBound - return casper.CommitteeInShardAndSlot(slotIndex, attestation.GetShard(), c.data.GetShardAndCommitteesForSlots()) + shardCommitteesArray := shardCommittees.ArrayShardAndCommittee + for i := 0; i < len(shardCommitteesArray); i++ { + if attestation.Shard == shardCommitteesArray[i].Shard { + return shardCommitteesArray[i].Committee, nil + } + } + + return nil, fmt.Errorf("unable to find committee for shard %d", attestation.Shard) } // NewStateRecalculations computes the new crystallized state, given the previous crystallized state diff --git a/genesis.json b/genesis.json index 4489e19e5c..50e6dc0870 100644 --- a/genesis.json +++ b/genesis.json @@ -2,61 +2,61 @@ "validators": [ { "pubkey": "QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFB", - "balance": "32", + "balance": "32000000000", "exitSlot": "999999999999999999", "status": "1" }, { "pubkey": "QkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJC", - "balance": "32", + "balance": "32000000000", "exitSlot": "999999999999999999", "status": "1" }, { "pubkey": "Q0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0ND", - "balance": "32", + "balance": "32000000000", "exitSlot": "999999999999999999", "status": "1" }, { "pubkey": "RERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERE", - "balance": "32", + "balance": "32000000000", "exitSlot": "999999999999999999", "status": "1" }, { "pubkey": "RUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVF", - "balance": "32", + "balance": "32000000000", "exitSlot": "999999999999999999", "status": "1" }, { "pubkey": "RkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZG", - "balance": "32", + "balance": "32000000000", "exitSlot": "999999999999999999", "status": "1" }, { "pubkey": "R0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dH", - "balance": "32", + "balance": "32000000000", "exitSlot": "999999999999999999", "status": "1" }, { "pubkey": "SEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhI", - "balance": "32", + "balance": "32000000000", "exitSlot": "999999999999999999", "status": "1" }, { "pubkey": "SUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJ", - "balance": "32", + "balance": "32000000000", "exitSlot": "999999999999999999", "status": "1" }, { "pubkey": "SkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpK", - "balance": "32", + "balance": "32000000000", "exitSlot": "999999999999999999", "status": "1" } diff --git a/validator/params/config.go b/validator/params/config.go index 0fb9f01603..b4fc3f4157 100644 --- a/validator/params/config.go +++ b/validator/params/config.go @@ -19,7 +19,7 @@ func DefaultConfig() *Config { // DemoConfig for running the system under shorter defaults. func DemoConfig() *Config { return &Config{ - SlotDuration: 8.0, + SlotDuration: 2.0, CycleLength: 5, } }