mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-03 16:37:39 +00:00
8c04ced1a6
* fixed epoch_processing * penalize->slash * exit -> voluntary_exit * SEED_LOOKAHEAD -> MIN_SEED_LOOKAHED * ENTRY_EXIT_DELAY -> ACTIVATION_EXIT_DELAY * `INCLUDER_REWARD_QUOTIENT` -> `ATTESTATION_INCLUSION_REWARD_QUOTIEN` * LatestIndexRoots -> LatestActiveIndexRoots * `MIN_VALIDATOR_WITHDRAWAL_EPOCHS` -> `MIN_VALIDATOR_WITHDRAWAL_DELAY` * MAX_WITHDRAWALS_PER_EPOCH -> MAX_EXIT_DEQUEUES_PER_EPOCH * ETH1_DATA_VOTING_PERIOD -> EPOCHS_PER_ETH1_VOTING_PERIOD * SLOT_DURATION -> SECONDS_PER_SLOT * EPOCH_LENGTH -> SLOTS_PER_EPOCH * SLOT_DURATION -> SECONDS_PER_SLOT take 2 * rest of the misc fixes for config name changes * remove tools/bootnode/.!74296!bootnode.go * `current_epoch_start_shard` -> `current_shuffling_start_shard`, `current_shuffling_epoch`, `current_shuffling_see` * go fmt * fixed comment * updated pseudocode comments * merged master
79 lines
3.1 KiB
Go
79 lines
3.1 KiB
Go
package backend
|
|
|
|
// StateTest --
|
|
type StateTest struct {
|
|
Title string
|
|
Summary string
|
|
Fork string `yaml:"fork"`
|
|
Version string `yaml:"version"`
|
|
TestSuite string `yaml:"test_suite"`
|
|
TestCases []*StateTestCase `yaml:"test_cases"`
|
|
}
|
|
|
|
// StateTestCase --
|
|
type StateTestCase struct {
|
|
Config *StateTestConfig `yaml:"config"`
|
|
Results *StateTestResults `yaml:"results"`
|
|
}
|
|
|
|
// StateTestConfig --
|
|
type StateTestConfig struct {
|
|
SkipSlots []uint64 `yaml:"skip_slots"`
|
|
DepositSlots []uint64 `yaml:"deposit_slots"`
|
|
Deposits []*StateTestDeposit `yaml:"deposits"`
|
|
ProposerSlashings []*StateTestProposerSlashing `yaml:"proposer_slashings"`
|
|
AttesterSlashings []*StateTestAttesterSlashing `yaml:"attester_slashings"`
|
|
ValidatorExits []*StateTestValidatorExit `yaml:"validator_exits"`
|
|
SlotsPerEpoch uint64 `yaml:"slots_per_epoch"`
|
|
ShardCount uint64 `yaml:"shard_count"`
|
|
DepositsForChainStart uint64 `yaml:"deposits_for_chain_start"`
|
|
NumSlots uint64 `yaml:"num_slots"`
|
|
}
|
|
|
|
// StateTestDeposit --
|
|
type StateTestDeposit struct {
|
|
Slot uint64 `yaml:"slot"`
|
|
Amount uint64 `yaml:"amount"`
|
|
MerkleIndex uint64 `yaml:"merkle_index"`
|
|
Pubkey string `yaml:"pubkey"`
|
|
}
|
|
|
|
// StateTestProposerSlashing --
|
|
type StateTestProposerSlashing struct {
|
|
Slot uint64 `yaml:"slot"`
|
|
ProposerIndex uint64 `yaml:"proposer_index"`
|
|
Proposal1Shard uint64 `yaml:"proposal_1_shard"`
|
|
Proposal2Shard uint64 `yaml:"proposal_2_shard"`
|
|
Proposal1Slot uint64 `yaml:"proposal_1_slot"`
|
|
Proposal2Slot uint64 `yaml:"proposal_2_slot"`
|
|
Proposal1Root string `yaml:"proposal_1_root"`
|
|
Proposal2Root string `yaml:"proposal_2_root"`
|
|
}
|
|
|
|
// StateTestAttesterSlashing --
|
|
type StateTestAttesterSlashing struct {
|
|
Slot uint64 `yaml:"slot"`
|
|
SlashableAttestation1Slot uint64 `yaml:"slashable_attestation_1_slot"`
|
|
SlashableAttestation1JustifiedEpoch uint64 `yaml:"slashable_attestation_1_justified_epoch"`
|
|
SlashableAttestation1ValidatorIndices []uint64 `yaml:"slashable_attestation_1_validator_indices"`
|
|
SlashableAttestation1CustodyBitField string `yaml:"slashable_attestation_1_custody_bitfield"`
|
|
SlashableAttestation2Slot uint64 `yaml:"slashable_attestation_2_slot"`
|
|
SlashableAttestation2JustifiedEpoch uint64 `yaml:"slashable_attestation_2_justified_epoch"`
|
|
SlashableAttestation2ValidatorIndices []uint64 `yaml:"slashable_attestation_2_validator_indices"`
|
|
SlashableAttestation2CustodyBitField string `yaml:"slashable_attestation_2_custody_bitfield"`
|
|
}
|
|
|
|
// StateTestValidatorExit --
|
|
type StateTestValidatorExit struct {
|
|
Epoch uint64 `yaml:"epoch"`
|
|
ValidatorIndex uint64 `yaml:"validator_index"`
|
|
}
|
|
|
|
// StateTestResults --
|
|
type StateTestResults struct {
|
|
Slot uint64
|
|
NumValidators int `yaml:"num_validators"`
|
|
SlashedValidators []uint64 `yaml:"slashed_validators"`
|
|
ExitedValidators []uint64 `yaml:"exited_validators"`
|
|
}
|