Compare commits

...

3 Commits

Author SHA1 Message Date
Preston Van Loon
f4ecb8d994 Changelog fragment 2025-05-29 11:23:02 -05:00
Preston Van Loon
1168cddf08 Make use of some unused contexts 2025-05-29 11:21:53 -05:00
Preston Van Loon
9b626864f0 Spectests: Use a flat structure for faster test ingestion (#15313)
* Flatten spectests directory: Move all spectests to a single directory per network.

Commands ran:
```
cd testing/spectest/
```

Then for each network, I ran the following command twice.

```
find . -type f -name '*_test.go' -exec bash -c '
  for file; do
    dir=$(dirname "$file")
    base=$(basename "$file" _test.go)
    new_name="./${dir#./}__${base}_test.go"
    git mv "$file" "$new_name"
  done
' bash {} +
```

Then updated the packages with a command like

```
sed -i 's/package [a-zA-Z0-9_]\+/package mainnet/g' *.go
```

Updated commit from 5edadd7b to address @Kasey's feedback.

* Fix panic when checking types. String is not compatible with DeepEqual.

* Docs: add commentary on the filename convention

* Add a section about nightly tests to the spectest readme. Ref https://github.com/OffchainLabs/prysm/pull/15312

* Set shard_count to optimal value... one!

* Changelog fragment

* use latest unclog release

* Update spectest build instructions after #9122

---------

Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
2025-05-29 14:17:34 +00:00
609 changed files with 1099 additions and 3050 deletions

View File

@@ -18,7 +18,7 @@ jobs:
uses: dsaltares/fetch-gh-release-asset@aa2ab1243d6e0d5b405b973c89fa4d06a2d0fff7 # 1.1.2
with:
repo: OffchainLabs/unclog
version: "tags/v0.1.3"
version: "tags/v0.1.5"
file: "unclog"
- name: Get new changelog files

View File

@@ -285,10 +285,7 @@ func (s *Service) headState(ctx context.Context) state.BeaconState {
// This returns a read only version of the head state.
// It does not perform a copy of the head state.
// This is a lock free version.
func (s *Service) headStateReadOnly(ctx context.Context) state.ReadOnlyBeaconState {
_, span := trace.StartSpan(ctx, "blockChain.headStateReadOnly")
defer span.End()
func (s *Service) headStateReadOnly(_ context.Context) state.ReadOnlyBeaconState {
return s.head.state
}

View File

@@ -29,8 +29,11 @@ func (s *Store) SaveBackfillStatus(ctx context.Context, bf *dbval.BackfillStatus
// BackfillStatus retrieves the most recently saved version of the BackfillStatus protobuf struct.
// This is used to persist information about backfill status across restarts.
func (s *Store) BackfillStatus(ctx context.Context) (*dbval.BackfillStatus, error) {
_, span := trace.StartSpan(ctx, "BeaconDB.BackfillStatus")
ctx, span := trace.StartSpan(ctx, "BeaconDB.BackfillStatus")
defer span.End()
if ctx.Err() != nil {
return nil, ctx.Err() // Abort db lookup if context is done.
}
bf := &dbval.BackfillStatus{}
err := s.db.View(func(tx *bolt.Tx) error {
bucket := tx.Bucket(blocksBucket)

View File

@@ -64,10 +64,15 @@ func (s *Store) getBlock(ctx context.Context, blockRoot [32]byte, tx *bolt.Tx) (
// at the time the chain was started, used to initialize the database and chain
// without syncing from genesis.
func (s *Store) OriginCheckpointBlockRoot(ctx context.Context) ([32]byte, error) {
_, span := trace.StartSpan(ctx, "BeaconDB.OriginCheckpointBlockRoot")
ctx, span := trace.StartSpan(ctx, "BeaconDB.OriginCheckpointBlockRoot")
defer span.End()
var root [32]byte
if ctx.Err() != nil {
return root, ctx.Err()
}
err := s.db.View(func(tx *bolt.Tx) error {
bkt := tx.Bucket(blocksBucket)
rootSlice := bkt.Get(originCheckpointBlockRootKey)
@@ -868,7 +873,7 @@ type slotRoot struct {
// slotRootsInRange returns slot and block root pairs of length min(batchSize, end-slot)
// If batchSize < 0, the limit check will be skipped entirely.
func (s *Store) slotRootsInRange(ctx context.Context, start, end primitives.Slot, batchSize int) ([]slotRoot, error) {
_, span := trace.StartSpan(ctx, "BeaconDB.slotRootsInRange")
ctx, span := trace.StartSpan(ctx, "BeaconDB.slotRootsInRange")
defer span.End()
if end < start {
return nil, errInvalidSlotRange
@@ -882,6 +887,9 @@ func (s *Store) slotRootsInRange(ctx context.Context, start, end primitives.Slot
bkt := tx.Bucket(blockSlotIndicesBucket)
c := bkt.Cursor()
for k, v := c.Seek(key); ; /* rely on internal checks to exit */ k, v = c.Prev() {
if ctx.Err() != nil {
return ctx.Err()
}
if len(k) == 0 && len(v) == 0 {
// The `edge`` variable and this `if` deal with 2 edge cases:
// - Seeking past the end of the bucket (the `end` param is higher than the highest slot).
@@ -988,7 +996,7 @@ func blockRootsBySlotRange(
bkt *bolt.Bucket,
startSlotEncoded, endSlotEncoded, startEpochEncoded, endEpochEncoded, slotStepEncoded interface{},
) ([][]byte, error) {
_, span := trace.StartSpan(ctx, "BeaconDB.blockRootsBySlotRange")
ctx, span := trace.StartSpan(ctx, "BeaconDB.blockRootsBySlotRange")
defer span.End()
// Return nothing when all slot parameters are missing
@@ -1035,6 +1043,9 @@ func blockRootsBySlotRange(
roots := make([][]byte, 0, rootsRange)
c := bkt.Cursor()
for k, v := c.Seek(min); conditional(k, max); k, v = c.Next() {
if ctx.Err() != nil {
return nil, ctx.Err()
}
slot := bytesutil.BytesToSlotBigEndian(k)
if step > 1 {
if slot.SubSlot(startSlot).Mod(step) != 0 {
@@ -1053,9 +1064,13 @@ func blockRootsBySlotRange(
// blockRootsBySlot retrieves the block roots by slot
func blockRootsBySlot(ctx context.Context, tx *bolt.Tx, slot primitives.Slot) ([][32]byte, error) {
_, span := trace.StartSpan(ctx, "BeaconDB.blockRootsBySlot")
ctx, span := trace.StartSpan(ctx, "BeaconDB.blockRootsBySlot")
defer span.End()
if ctx.Err() != nil {
return nil, ctx.Err()
}
bkt := tx.Bucket(blockSlotIndicesBucket)
key := bytesutil.SlotToBytesBigEndian(slot)
c := bkt.Cursor()
@@ -1077,10 +1092,13 @@ func blockRootsBySlot(ctx context.Context, tx *bolt.Tx, slot primitives.Slot) ([
// objects. If a certain filter criterion does not apply to
// blocks, an appropriate error is returned.
func createBlockIndicesFromFilters(ctx context.Context, f *filters.QueryFilter) (map[string][]byte, error) {
_, span := trace.StartSpan(ctx, "BeaconDB.createBlockIndicesFromFilters")
ctx, span := trace.StartSpan(ctx, "BeaconDB.createBlockIndicesFromFilters")
defer span.End()
indicesByBucket := make(map[string][]byte)
for k, v := range f.Filters() {
if ctx.Err() != nil {
return nil, ctx.Err()
}
switch k {
case filters.ParentRoot:
parentRoot, ok := v.([]byte)

View File

@@ -772,10 +772,13 @@ func (s *Store) validatorEntries(ctx context.Context, blockRoot [32]byte) ([]*et
// retrieves and assembles the state information from multiple buckets.
func (s *Store) stateBytes(ctx context.Context, blockRoot [32]byte) ([]byte, error) {
_, span := trace.StartSpan(ctx, "BeaconDB.stateBytes")
ctx, span := trace.StartSpan(ctx, "BeaconDB.stateBytes")
defer span.End()
var dst []byte
err := s.db.View(func(tx *bolt.Tx) error {
if ctx.Err() != nil {
return ctx.Err()
}
bkt := tx.Bucket(stateBucket)
stBytes := bkt.Get(blockRoot[:])
if len(stBytes) == 0 {

View File

@@ -196,7 +196,7 @@ func (c *AttCaches) AggregatedAttestationsBySlotIndex(
slot primitives.Slot,
committeeIndex primitives.CommitteeIndex,
) []*ethpb.Attestation {
_, span := trace.StartSpan(ctx, "operations.attestations.kv.AggregatedAttestationsBySlotIndex")
ctx, span := trace.StartSpan(ctx, "operations.attestations.kv.AggregatedAttestationsBySlotIndex")
defer span.End()
atts := make([]*ethpb.Attestation, 0)
@@ -204,6 +204,9 @@ func (c *AttCaches) AggregatedAttestationsBySlotIndex(
c.aggregatedAttLock.RLock()
defer c.aggregatedAttLock.RUnlock()
for _, as := range c.aggregatedAtt {
if ctx.Err() != nil {
return atts // Exit early with whatever we have, if the context is done.
}
if as[0].Version() == version.Phase0 && slot == as[0].GetData().Slot && committeeIndex == as[0].GetData().CommitteeIndex {
for _, a := range as {
att, ok := a.(*ethpb.Attestation)
@@ -225,7 +228,7 @@ func (c *AttCaches) AggregatedAttestationsBySlotIndexElectra(
slot primitives.Slot,
committeeIndex primitives.CommitteeIndex,
) []*ethpb.AttestationElectra {
_, span := trace.StartSpan(ctx, "operations.attestations.kv.AggregatedAttestationsBySlotIndexElectra")
ctx, span := trace.StartSpan(ctx, "operations.attestations.kv.AggregatedAttestationsBySlotIndexElectra")
defer span.End()
atts := make([]*ethpb.AttestationElectra, 0)
@@ -233,6 +236,9 @@ func (c *AttCaches) AggregatedAttestationsBySlotIndexElectra(
c.aggregatedAttLock.RLock()
defer c.aggregatedAttLock.RUnlock()
for _, as := range c.aggregatedAtt {
if ctx.Err() != nil {
return atts // Exit early with whatever we have, if the context is done.
}
if as[0].Version() >= version.Electra && slot == as[0].GetData().Slot && as[0].CommitteeBitsVal().BitAt(uint64(committeeIndex)) {
for _, a := range as {
att, ok := a.(*ethpb.AttestationElectra)

View File

@@ -34,7 +34,7 @@ func NewPool() *Pool {
func (p *Pool) PendingAttesterSlashings(ctx context.Context, state state.ReadOnlyBeaconState, noLimit bool) []ethpb.AttSlashing {
p.lock.Lock()
defer p.lock.Unlock()
_, span := trace.StartSpan(ctx, "operations.PendingAttesterSlashing")
ctx, span := trace.StartSpan(ctx, "operations.PendingAttesterSlashing")
defer span.End()
// Update prom metric.
@@ -54,6 +54,9 @@ func (p *Pool) PendingAttesterSlashings(ctx context.Context, state state.ReadOnl
}
pending := make([]ethpb.AttSlashing, 0, maxSlashings)
for i := 0; i < len(p.pendingAttesterSlashing); i++ {
if ctx.Err() != nil {
break // Stop processing work...
}
if uint64(len(pending)) >= maxSlashings {
break
}
@@ -89,7 +92,7 @@ func (p *Pool) PendingAttesterSlashings(ctx context.Context, state state.ReadOnl
func (p *Pool) PendingProposerSlashings(ctx context.Context, state state.ReadOnlyBeaconState, noLimit bool) []*ethpb.ProposerSlashing {
p.lock.Lock()
defer p.lock.Unlock()
_, span := trace.StartSpan(ctx, "operations.PendingProposerSlashing")
ctx, span := trace.StartSpan(ctx, "operations.PendingProposerSlashing")
defer span.End()
// Update prom metric.
@@ -102,6 +105,9 @@ func (p *Pool) PendingProposerSlashings(ctx context.Context, state state.ReadOnl
}
pending := make([]*ethpb.ProposerSlashing, 0, maxSlashings)
for i := 0; i < len(p.pendingProposerSlashing); i++ {
if ctx.Err() != nil {
break // Stop processing work...
}
if uint64(len(pending)) >= maxSlashings {
break
}

3
changelog/pvl-ctx.md Normal file
View File

@@ -0,0 +1,3 @@
### Changed
- Add a context liveness check to some methods that iterate over objects or do expensive work. The routine can end early if the request is no longer alive.

View File

@@ -0,0 +1,3 @@
### Ignored
- Changed spectest tests to a single directory per config (mainnet, general, minimal). This has a significant reduction in runtime due to runfile tree generation only happening 3 times rather than dozens of times.

View File

@@ -21,7 +21,7 @@ const (
)
func ComputeBlockBodyFieldRoots(ctx context.Context, blockBody *BeaconBlockBody) ([][]byte, error) {
_, span := trace.StartSpan(ctx, "blocks.ComputeBlockBodyFieldRoots")
ctx, span := trace.StartSpan(ctx, "blocks.ComputeBlockBodyFieldRoots")
defer span.End()
if blockBody == nil {
@@ -49,6 +49,9 @@ func ComputeBlockBodyFieldRoots(ctx context.Context, blockBody *BeaconBlockBody)
}
for i := range fieldRoots {
if ctx.Err() != nil {
return nil, ctx.Err()
}
fieldRoots[i] = make([]byte, 32)
}

View File

@@ -2,15 +2,29 @@
Spec testing vectors: https://github.com/ethereum/consensus-spec-tests
To run all `mainnet` spec tests:
To run all spectests:
```bash
bazel test //... --test_tag_filters=spectest
```
Minimal tests require `--define ssz=minimal` setting and are not triggered
automatically when `//...` is selected. One can run minimal tests manually, though:
## Adding new tests
New tests must adhere to the following filename convention:
```bash
bazel query 'tests(attr("tags", "minimal, spectest", //...))' | xargs bazel test --define ssz=minimal
```
{mainnet/minimal/general}/$fork__$package__$test_test.go
```
An example test is the phase0 epoch processing test for effective balance updates. This test has a spectest path of `{mainnet, minimal}/phase0/epoch_processing/effective_balance_updates/pyspec_tests`.
There are tests for mainnet and minimal config, so for each config we will add a file by the name of `phase0__epoch_processing__effective_balance_updates_test.go` since the fork is `phase0`, the package is `epoch_processing`, and the test is `effective_balance_updates`.
## Running nightly spectests
Since [PR 15312](https://github.com/OffchainLabs/prysm/pull/15312), Prysm has support to download "nightly" spectests from github via a starlark rule configuration by environment variable.
Set `--repo_env=CONSENSUS_SPEC_TESTS_VERSION=nightly` when running spectest to download the "nightly" spectests.
Note: A GITHUB_TOKEN environment variable is required to be set. The github token must be a [fine grained token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token).
```
bazel test //... --test_tag_filters=spectest --repo_env=CONSENSUS_SPEC_TESTS_VERSION=nightly
```

View File

@@ -2,11 +2,8 @@ load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "small",
srcs = ["verify_blob_kzg_proof_batch_test.go"],
data = [
"@consensus_spec_tests//:test_data",
],
srcs = ["deneb__kzg__verify_blob_kzg_proof_batch_test.go"],
data = ["@consensus_spec_tests//:test_data"],
tags = ["spectest"],
deps = [
"//beacon-chain/blockchain/kzg:go_default_library",

View File

@@ -0,0 +1,283 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
srcs = [
"altair__epoch_processing__effective_balance_updates_test.go",
"altair__epoch_processing__eth1_data_reset_test.go",
"altair__epoch_processing__historical_roots_update_test.go",
"altair__epoch_processing__inactivity_updates_test.go",
"altair__epoch_processing__justification_and_finalization_test.go",
"altair__epoch_processing__participation_flag_updates_test.go",
"altair__epoch_processing__randao_mixes_reset_test.go",
"altair__epoch_processing__registry_updates_test.go",
"altair__epoch_processing__rewards_and_penalties_test.go",
"altair__epoch_processing__slashings_reset_test.go",
"altair__epoch_processing__slashings_test.go",
"altair__finality__finality_test.go",
"altair__fork_helper__upgrade_to_altair_test.go",
"altair__fork_transition__transition_test.go",
"altair__forkchoice__forkchoice_test.go",
"altair__light_client__single_merkle_proof_test.go",
"altair__operations__attestation_test.go",
"altair__operations__attester_slashing_test.go",
"altair__operations__block_header_test.go",
"altair__operations__deposit_test.go",
"altair__operations__proposer_slashing_test.go",
"altair__operations__sync_committee_test.go",
"altair__operations__voluntary_exit_test.go",
"altair__random__random_test.go",
"altair__rewards__rewards_test.go",
"altair__sanity__blocks_test.go",
"altair__sanity__slots_test.go",
"altair__ssz_static__ssz_static_test.go",
"bellatrix__epoch_processing__effective_balance_updates_test.go",
"bellatrix__epoch_processing__eth1_data_reset_test.go",
"bellatrix__epoch_processing__historical_roots_update_test.go",
"bellatrix__epoch_processing__inactivity_updates_test.go",
"bellatrix__epoch_processing__justification_and_finalization_test.go",
"bellatrix__epoch_processing__participation_flag_updates_test.go",
"bellatrix__epoch_processing__randao_mixes_reset_test.go",
"bellatrix__epoch_processing__registry_updates_test.go",
"bellatrix__epoch_processing__rewards_and_penalties_test.go",
"bellatrix__epoch_processing__slashings_reset_test.go",
"bellatrix__epoch_processing__slashings_test.go",
"bellatrix__finality__finality_test.go",
"bellatrix__fork_helper__upgrade_to_altair_test.go",
"bellatrix__fork_transition__transition_test.go",
"bellatrix__forkchoice__forkchoice_test.go",
"bellatrix__light_client__single_merkle_proof_test.go",
"bellatrix__operations__attestation_test.go",
"bellatrix__operations__attester_slashing_test.go",
"bellatrix__operations__block_header_test.go",
"bellatrix__operations__deposit_test.go",
"bellatrix__operations__execution_payload_test.go",
"bellatrix__operations__proposer_slashing_test.go",
"bellatrix__operations__sync_committee_test.go",
"bellatrix__operations__voluntary_exit_test.go",
"bellatrix__random__random_test.go",
"bellatrix__rewards__rewards_test.go",
"bellatrix__sanity__blocks_test.go",
"bellatrix__sanity__slots_test.go",
"bellatrix__ssz_static__ssz_static_test.go",
"capella__epoch_processing__effective_balance_updates_test.go",
"capella__epoch_processing__eth1_data_reset_test.go",
"capella__epoch_processing__historical_summaries_update_test.go",
"capella__epoch_processing__inactivity_updates_test.go",
"capella__epoch_processing__justification_and_finalization_test.go",
"capella__epoch_processing__participation_flag_updates_test.go",
"capella__epoch_processing__randao_mixes_reset_test.go",
"capella__epoch_processing__registry_updates_test.go",
"capella__epoch_processing__rewards_and_penalties_test.go",
"capella__epoch_processing__slashings_reset_test.go",
"capella__epoch_processing__slashings_test.go",
"capella__finality__finality_test.go",
"capella__fork_helper__upgrade_to_capella_test.go",
"capella__fork_transition__transition_test.go",
"capella__forkchoice__forkchoice_test.go",
"capella__light_client__single_merkle_proof_test.go",
"capella__operations__attestation_test.go",
"capella__operations__attester_slashing_test.go",
"capella__operations__block_header_test.go",
"capella__operations__bls_to_execution_change_test.go",
"capella__operations__deposit_test.go",
"capella__operations__execution_payload_test.go",
"capella__operations__proposer_slashing_test.go",
"capella__operations__sync_committee_test.go",
"capella__operations__voluntary_exit_test.go",
"capella__operations__withdrawals_test.go",
"capella__random__random_test.go",
"capella__rewards__rewards_test.go",
"capella__sanity__blocks_test.go",
"capella__sanity__slots_test.go",
"capella__ssz_static__ssz_static_test.go",
"deneb__epoch_processing__effective_balance_updates_test.go",
"deneb__epoch_processing__eth1_data_reset_test.go",
"deneb__epoch_processing__historical_summaries_update_test.go",
"deneb__epoch_processing__inactivity_updates_test.go",
"deneb__epoch_processing__justification_and_finalization_test.go",
"deneb__epoch_processing__participation_flag_updates_test.go",
"deneb__epoch_processing__randao_mixes_reset_test.go",
"deneb__epoch_processing__registry_updates_test.go",
"deneb__epoch_processing__rewards_and_penalties_test.go",
"deneb__epoch_processing__slashings_reset_test.go",
"deneb__epoch_processing__slashings_test.go",
"deneb__finality__finality_test.go",
"deneb__fork_helper__upgrade_to_deneb_test.go",
"deneb__fork_transition__transition_test.go",
"deneb__forkchoice__forkchoice_test.go",
"deneb__light_client__single_merkle_proof_test.go",
"deneb__merkle_proof__merkle_proof_test.go",
"deneb__operations__attestation_test.go",
"deneb__operations__attester_slashing_test.go",
"deneb__operations__block_header_test.go",
"deneb__operations__bls_to_execution_change_test.go",
"deneb__operations__deposit_test.go",
"deneb__operations__execution_payload_test.go",
"deneb__operations__proposer_slashing_test.go",
"deneb__operations__sync_committee_test.go",
"deneb__operations__voluntary_exit_test.go",
"deneb__operations__withdrawals_test.go",
"deneb__random__random_test.go",
"deneb__rewards__rewards_test.go",
"deneb__sanity__blocks_test.go",
"deneb__sanity__slots_test.go",
"deneb__ssz_static__ssz_static_test.go",
"electra__epoch_processing__effective_balance_updates_test.go",
"electra__epoch_processing__eth1_data_reset_test.go",
"electra__epoch_processing__historical_summaries_update_test.go",
"electra__epoch_processing__inactivity_updates_test.go",
"electra__epoch_processing__justification_and_finalization_test.go",
"electra__epoch_processing__participation_flag_updates_test.go",
"electra__epoch_processing__pending_consolidations_test.go",
"electra__epoch_processing__pending_deposits_updates_test.go",
"electra__epoch_processing__randao_mixes_reset_test.go",
"electra__epoch_processing__registry_updates_test.go",
"electra__epoch_processing__rewards_and_penalties_test.go",
"electra__epoch_processing__slashings_reset_test.go",
"electra__epoch_processing__slashings_test.go",
"electra__finality__finality_test.go",
"electra__fork_helper__upgrade_to_electra_test.go",
"electra__fork_transition__transition_test.go",
"electra__forkchoice__forkchoice_test.go",
"electra__light_client__single_merkle_proof_test.go",
"electra__merkle_proof__merkle_proof_test.go",
"electra__operations__attestation_test.go",
"electra__operations__attester_slashing_test.go",
"electra__operations__block_header_test.go",
"electra__operations__bls_to_execution_change_test.go",
"electra__operations__consolidation_test.go",
"electra__operations__deposit_requests_test.go",
"electra__operations__deposit_test.go",
"electra__operations__execution_layer_withdrawals_test.go",
"electra__operations__execution_payload_test.go",
"electra__operations__proposer_slashing_test.go",
"electra__operations__sync_committee_test.go",
"electra__operations__voluntary_exit_test.go",
"electra__operations__withdrawals_test.go",
"electra__random__random_test.go",
"electra__rewards__rewards_test.go",
"electra__sanity__blocks_test.go",
"electra__sanity__slots_test.go",
"electra__ssz_static__ssz_static_test.go",
"fulu__epoch_processing__effective_balance_updates_test.go",
"fulu__epoch_processing__eth1_data_reset_test.go",
"fulu__epoch_processing__historical_summaries_update_test.go",
"fulu__epoch_processing__inactivity_updates_test.go",
"fulu__epoch_processing__justification_and_finalization_test.go",
"fulu__epoch_processing__participation_flag_updates_test.go",
"fulu__epoch_processing__pending_consolidations_test.go",
"fulu__epoch_processing__pending_deposits_updates_test.go",
"fulu__epoch_processing__randao_mixes_reset_test.go",
"fulu__epoch_processing__registry_updates_test.go",
"fulu__epoch_processing__rewards_and_penalties_test.go",
"fulu__epoch_processing__slashings_reset_test.go",
"fulu__epoch_processing__slashings_test.go",
"fulu__finality__finality_test.go",
"fulu__fork__upgrade_to_fulu_test.go",
"fulu__forkchoice__forkchoice_test.go",
"fulu__merkle_proof__merkle_proof_test.go",
"fulu__networking__custody_groups_test.go",
"fulu__operations__attestation_test.go",
"fulu__operations__attester_slashing_test.go",
"fulu__operations__block_header_test.go",
"fulu__operations__bls_to_execution_change_test.go",
"fulu__operations__consolidation_test.go",
"fulu__operations__deposit_requests_test.go",
"fulu__operations__deposit_test.go",
"fulu__operations__execution_layer_withdrawals_test.go",
"fulu__operations__execution_payload_test.go",
"fulu__operations__proposer_slashing_test.go",
"fulu__operations__sync_committee_test.go",
"fulu__operations__voluntary_exit_test.go",
"fulu__operations__withdrawals_test.go",
"fulu__random__random_test.go",
"fulu__rewards__rewards_test.go",
"fulu__sanity__blocks_test.go",
"fulu__sanity__slots_test.go",
"fulu__ssz_static__ssz_static_test.go",
"phase0__epoch_processing__effective_balance_updates_test.go",
"phase0__epoch_processing__epoch_processing_test.go",
"phase0__epoch_processing__eth1_data_reset_test.go",
"phase0__epoch_processing__historical_roots_update_test.go",
"phase0__epoch_processing__justification_and_finalization_test.go",
"phase0__epoch_processing__participation_record_updates_test.go",
"phase0__epoch_processing__randao_mixes_reset_test.go",
"phase0__epoch_processing__registry_updates_test.go",
"phase0__epoch_processing__rewards_and_penalties_test.go",
"phase0__epoch_processing__slashings_reset_test.go",
"phase0__epoch_processing__slashings_test.go",
"phase0__finality__finality_test.go",
"phase0__operations__attestation_test.go",
"phase0__operations__attester_slashing_test.go",
"phase0__operations__block_header_test.go",
"phase0__operations__deposit_test.go",
"phase0__operations__proposer_slashing_test.go",
"phase0__operations__voluntary_exit_test.go",
"phase0__random__random_test.go",
"phase0__rewards__rewards_test.go",
"phase0__sanity__blocks_test.go",
"phase0__sanity__slots_test.go",
"phase0__ssz_static__ssz_static_test.go",
],
data = ["@consensus_spec_tests//:test_data"],
tags = ["spectest"],
deps = [
"//config/params:go_default_library",
"//runtime/version:go_default_library",
"//testing/spectest/shared/altair/epoch_processing:go_default_library",
"//testing/spectest/shared/altair/finality:go_default_library",
"//testing/spectest/shared/altair/fork:go_default_library",
"//testing/spectest/shared/altair/operations:go_default_library",
"//testing/spectest/shared/altair/rewards:go_default_library",
"//testing/spectest/shared/altair/sanity:go_default_library",
"//testing/spectest/shared/altair/ssz_static:go_default_library",
"//testing/spectest/shared/bellatrix/epoch_processing:go_default_library",
"//testing/spectest/shared/bellatrix/finality:go_default_library",
"//testing/spectest/shared/bellatrix/fork:go_default_library",
"//testing/spectest/shared/bellatrix/operations:go_default_library",
"//testing/spectest/shared/bellatrix/rewards:go_default_library",
"//testing/spectest/shared/bellatrix/sanity:go_default_library",
"//testing/spectest/shared/bellatrix/ssz_static:go_default_library",
"//testing/spectest/shared/capella/epoch_processing:go_default_library",
"//testing/spectest/shared/capella/finality:go_default_library",
"//testing/spectest/shared/capella/fork:go_default_library",
"//testing/spectest/shared/capella/operations:go_default_library",
"//testing/spectest/shared/capella/rewards:go_default_library",
"//testing/spectest/shared/capella/sanity:go_default_library",
"//testing/spectest/shared/capella/ssz_static:go_default_library",
"//testing/spectest/shared/common/forkchoice:go_default_library",
"//testing/spectest/shared/common/light_client:go_default_library",
"//testing/spectest/shared/deneb/epoch_processing:go_default_library",
"//testing/spectest/shared/deneb/finality:go_default_library",
"//testing/spectest/shared/deneb/fork:go_default_library",
"//testing/spectest/shared/deneb/merkle_proof:go_default_library",
"//testing/spectest/shared/deneb/operations:go_default_library",
"//testing/spectest/shared/deneb/rewards:go_default_library",
"//testing/spectest/shared/deneb/sanity:go_default_library",
"//testing/spectest/shared/deneb/ssz_static:go_default_library",
"//testing/spectest/shared/electra/epoch_processing:go_default_library",
"//testing/spectest/shared/electra/finality:go_default_library",
"//testing/spectest/shared/electra/fork:go_default_library",
"//testing/spectest/shared/electra/merkle_proof:go_default_library",
"//testing/spectest/shared/electra/operations:go_default_library",
"//testing/spectest/shared/electra/rewards:go_default_library",
"//testing/spectest/shared/electra/sanity:go_default_library",
"//testing/spectest/shared/electra/ssz_static:go_default_library",
"//testing/spectest/shared/fulu/epoch_processing:go_default_library",
"//testing/spectest/shared/fulu/finality:go_default_library",
"//testing/spectest/shared/fulu/fork:go_default_library",
"//testing/spectest/shared/fulu/merkle_proof:go_default_library",
"//testing/spectest/shared/fulu/networking:go_default_library",
"//testing/spectest/shared/fulu/operations:go_default_library",
"//testing/spectest/shared/fulu/rewards:go_default_library",
"//testing/spectest/shared/fulu/sanity:go_default_library",
"//testing/spectest/shared/fulu/ssz_static:go_default_library",
"//testing/spectest/shared/phase0/epoch_processing:go_default_library",
"//testing/spectest/shared/phase0/finality:go_default_library",
"//testing/spectest/shared/phase0/operations:go_default_library",
"//testing/spectest/shared/phase0/rewards:go_default_library",
"//testing/spectest/shared/phase0/sanity:go_default_library",
"//testing/spectest/shared/phase0/ssz_static:go_default_library",
],
)

View File

@@ -1,25 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "small",
srcs = [
"effective_balance_updates_test.go",
"eth1_data_reset_test.go",
"historical_roots_update_test.go",
"inactivity_updates_test.go",
"justification_and_finalization_test.go",
"participation_flag_updates_test.go",
"randao_mixes_reset_test.go",
"registry_updates_test.go",
"rewards_and_penalties_test.go",
"slashings_reset_test.go",
"slashings_test.go",
],
data = glob(["*.yaml"]) + [
"@consensus_spec_tests//:test_data",
],
shard_count = 4,
tags = ["spectest"],
deps = ["//testing/spectest/shared/altair/epoch_processing:go_default_library"],
)

View File

@@ -1,14 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "medium",
timeout = "short",
srcs = ["finality_test.go"],
data = glob(["*.yaml"]) + [
"@consensus_spec_tests//:test_data",
],
shard_count = 4,
tags = ["spectest"],
deps = ["//testing/spectest/shared/altair/finality:go_default_library"],
)

View File

@@ -1,13 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "small",
srcs = ["upgrade_to_altair_test.go"],
data = glob(["*.yaml"]) + [
"@consensus_spec_tests//:test_data",
],
shard_count = 4,
tags = ["spectest"],
deps = ["//testing/spectest/shared/altair/fork:go_default_library"],
)

View File

@@ -1,12 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
timeout = "short",
srcs = ["transition_test.go"],
data = glob(["*.yaml"]) + [
"@consensus_spec_tests//:test_data",
],
tags = ["spectest"],
deps = ["//testing/spectest/shared/altair/fork:go_default_library"],
)

View File

@@ -1,16 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "enormous",
timeout = "short",
srcs = ["forkchoice_test.go"],
data = glob(["*.yaml"]) + [
"@consensus_spec_tests//:test_data",
],
tags = ["spectest"],
deps = [
"//runtime/version:go_default_library",
"//testing/spectest/shared/common/forkchoice:go_default_library",
],
)

View File

@@ -1,15 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "small",
srcs = ["single_merkle_proof_test.go"],
data = glob(["*.yaml"]) + [
"@consensus_spec_tests//:test_data",
],
tags = ["spectest"],
deps = [
"//runtime/version:go_default_library",
"//testing/spectest/shared/common/light_client:go_default_library",
],
)

View File

@@ -1,21 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "small",
srcs = [
"attestation_test.go",
"attester_slashing_test.go",
"block_header_test.go",
"deposit_test.go",
"proposer_slashing_test.go",
"sync_committee_test.go",
"voluntary_exit_test.go",
],
data = glob(["*.yaml"]) + [
"@consensus_spec_tests//:test_data",
],
shard_count = 4,
tags = ["spectest"],
deps = ["//testing/spectest/shared/altair/operations:go_default_library"],
)

View File

@@ -1,13 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "medium",
timeout = "short",
srcs = ["random_test.go"],
data = glob(["*.yaml"]) + [
"@consensus_spec_tests//:test_data",
],
tags = ["spectest"],
deps = ["//testing/spectest/shared/altair/sanity:go_default_library"],
)

View File

@@ -1,12 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "small",
srcs = ["rewards_test.go"],
data = glob(["*.yaml"]) + [
"@consensus_spec_tests//:test_data",
],
tags = ["spectest"],
deps = ["//testing/spectest/shared/altair/rewards:go_default_library"],
)

View File

@@ -1,16 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "medium",
timeout = "short",
srcs = [
"blocks_test.go",
"slots_test.go",
],
data = glob(["*.yaml"]) + [
"@consensus_spec_tests//:test_data",
],
tags = ["spectest"],
deps = ["//testing/spectest/shared/altair/sanity:go_default_library"],
)

View File

@@ -1,12 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "small",
srcs = ["ssz_static_test.go"],
data = glob(["*.yaml"]) + [
"@consensus_spec_tests//:test_data",
],
tags = ["spectest"],
deps = ["//testing/spectest/shared/altair/ssz_static:go_default_library"],
)

View File

@@ -1,4 +1,4 @@
package finality
package mainnet
import (
"testing"

View File

@@ -1,4 +1,4 @@
package operations
package mainnet
import (
"testing"

View File

@@ -1,4 +1,4 @@
package random
package mainnet
import (
"testing"

View File

@@ -1,4 +1,4 @@
package rewards
package mainnet
import (
"testing"

View File

@@ -1,4 +1,4 @@
package sanity
package mainnet
import (
"testing"

View File

@@ -1,4 +1,4 @@
package sanity
package mainnet
import (
"testing"

View File

@@ -1,25 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "small",
srcs = [
"effective_balance_updates_test.go",
"eth1_data_reset_test.go",
"historical_roots_update_test.go",
"inactivity_updates_test.go",
"justification_and_finalization_test.go",
"participation_flag_updates_test.go",
"randao_mixes_reset_test.go",
"registry_updates_test.go",
"rewards_and_penalties_test.go",
"slashings_reset_test.go",
"slashings_test.go",
],
data = glob(["*.yaml"]) + [
"@consensus_spec_tests//:test_data",
],
shard_count = 4,
tags = ["spectest"],
deps = ["//testing/spectest/shared/bellatrix/epoch_processing:go_default_library"],
)

View File

@@ -1,14 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "medium",
timeout = "short",
srcs = ["finality_test.go"],
data = glob(["*.yaml"]) + [
"@consensus_spec_tests//:test_data",
],
shard_count = 4,
tags = ["spectest"],
deps = ["//testing/spectest/shared/bellatrix/finality:go_default_library"],
)

View File

@@ -1,13 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "small",
srcs = ["upgrade_to_altair_test.go"],
data = glob(["*.yaml"]) + [
"@consensus_spec_tests//:test_data",
],
shard_count = 4,
tags = ["spectest"],
deps = ["//testing/spectest/shared/bellatrix/fork:go_default_library"],
)

View File

@@ -1,12 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "small",
srcs = ["transition_test.go"],
data = glob(["*.yaml"]) + [
"@consensus_spec_tests//:test_data",
],
tags = ["spectest"],
deps = ["//testing/spectest/shared/bellatrix/fork:go_default_library"],
)

View File

@@ -1,16 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "enormous",
timeout = "short",
srcs = ["forkchoice_test.go"],
data = glob(["*.yaml"]) + [
"@consensus_spec_tests//:test_data",
],
tags = ["spectest"],
deps = [
"//runtime/version:go_default_library",
"//testing/spectest/shared/common/forkchoice:go_default_library",
],
)

View File

@@ -1,15 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "small",
srcs = ["single_merkle_proof_test.go"],
data = glob(["*.yaml"]) + [
"@consensus_spec_tests//:test_data",
],
tags = ["spectest"],
deps = [
"//runtime/version:go_default_library",
"//testing/spectest/shared/common/light_client:go_default_library",
],
)

View File

@@ -1,22 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "small",
srcs = [
"attestation_test.go",
"attester_slashing_test.go",
"block_header_test.go",
"deposit_test.go",
"execution_payload_test.go",
"proposer_slashing_test.go",
"sync_committee_test.go",
"voluntary_exit_test.go",
],
data = glob(["*.yaml"]) + [
"@consensus_spec_tests//:test_data",
],
shard_count = 4,
tags = ["spectest"],
deps = ["//testing/spectest/shared/bellatrix/operations:go_default_library"],
)

View File

@@ -1,13 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "medium",
timeout = "short",
srcs = ["random_test.go"],
data = glob(["*.yaml"]) + [
"@consensus_spec_tests//:test_data",
],
tags = ["spectest"],
deps = ["//testing/spectest/shared/bellatrix/sanity:go_default_library"],
)

View File

@@ -1,12 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "small",
srcs = ["rewards_test.go"],
data = glob(["*.yaml"]) + [
"@consensus_spec_tests//:test_data",
],
tags = ["spectest"],
deps = ["//testing/spectest/shared/bellatrix/rewards:go_default_library"],
)

View File

@@ -1,16 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "medium",
timeout = "short",
srcs = [
"blocks_test.go",
"slots_test.go",
],
data = glob(["*.yaml"]) + [
"@consensus_spec_tests//:test_data",
],
tags = ["spectest"],
deps = ["//testing/spectest/shared/bellatrix/sanity:go_default_library"],
)

View File

@@ -1,12 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "small",
srcs = ["ssz_static_test.go"],
data = glob(["*.yaml"]) + [
"@consensus_spec_tests//:test_data",
],
tags = ["spectest"],
deps = ["//testing/spectest/shared/bellatrix/ssz_static:go_default_library"],
)

View File

@@ -1,4 +1,4 @@
package random
package mainnet
import (
"testing"

View File

@@ -1,4 +1,4 @@
package rewards
package mainnet
import (
"testing"

View File

@@ -1,4 +1,4 @@
package sanity
package mainnet
import (
"testing"

View File

@@ -1,4 +1,4 @@
package sanity
package mainnet
import (
"testing"

View File

@@ -1,25 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "small",
srcs = [
"effective_balance_updates_test.go",
"eth1_data_reset_test.go",
"historical_summaries_update_test.go",
"inactivity_updates_test.go",
"justification_and_finalization_test.go",
"participation_flag_updates_test.go",
"randao_mixes_reset_test.go",
"registry_updates_test.go",
"rewards_and_penalties_test.go",
"slashings_reset_test.go",
"slashings_test.go",
],
data = [
"@consensus_spec_tests//:test_data",
],
shard_count = 4,
tags = ["spectest"],
deps = ["//testing/spectest/shared/capella/epoch_processing:go_default_library"],
)

View File

@@ -1,14 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "medium",
timeout = "short",
srcs = ["finality_test.go"],
data = [
"@consensus_spec_tests//:test_data",
],
shard_count = 1,
tags = ["spectest"],
deps = ["//testing/spectest/shared/capella/finality:go_default_library"],
)

View File

@@ -1,13 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "small",
srcs = ["upgrade_to_capella_test.go"],
data = [
"@consensus_spec_tests//:test_data",
],
shard_count = 1,
tags = ["spectest"],
deps = ["//testing/spectest/shared/capella/fork:go_default_library"],
)

View File

@@ -1,12 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "small",
srcs = ["transition_test.go"],
data = [
"@consensus_spec_tests//:test_data",
],
tags = ["spectest"],
deps = ["//testing/spectest/shared/capella/fork:go_default_library"],
)

View File

@@ -1,16 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "enormous",
timeout = "short",
srcs = ["forkchoice_test.go"],
data = [
"@consensus_spec_tests//:test_data",
],
tags = ["spectest"],
deps = [
"//runtime/version:go_default_library",
"//testing/spectest/shared/common/forkchoice:go_default_library",
],
)

View File

@@ -1,15 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "small",
srcs = ["single_merkle_proof_test.go"],
data = glob(["*.yaml"]) + [
"@consensus_spec_tests//:test_data",
],
tags = ["spectest"],
deps = [
"//runtime/version:go_default_library",
"//testing/spectest/shared/common/light_client:go_default_library",
],
)

View File

@@ -1,24 +0,0 @@
load("@prysm//tools/go:def.bzl", "go_test")
go_test(
name = "go_default_test",
size = "small",
srcs = [
"attestation_test.go",
"attester_slashing_test.go",
"block_header_test.go",
"bls_to_execution_change_test.go",
"deposit_test.go",
"execution_payload_test.go",
"proposer_slashing_test.go",
"sync_committee_test.go",
"voluntary_exit_test.go",
"withdrawals_test.go",
],
data = [
"@consensus_spec_tests//:test_data",
],
shard_count = 4,
tags = ["spectest"],
deps = ["//testing/spectest/shared/capella/operations:go_default_library"],
)

Some files were not shown because too many files have changed in this diff Show More