Skip to content

Commit

Permalink
Merge branch 'develop' into peerDAS
Browse files Browse the repository at this point in the history
  • Loading branch information
nalepae committed Jan 16, 2025
2 parents 6fb349e + e07341e commit f6b1fb1
Show file tree
Hide file tree
Showing 23 changed files with 175 additions and 211 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ Fixes #
**Acknowledgements**

- [ ] I have read [CONTRIBUTING.md](https://github.com/prysmaticlabs/prysm/blob/develop/CONTRIBUTING.md).
- [ ] I have made an appropriate entry to [CHANGELOG.md](https://github.com/prysmaticlabs/prysm/blob/develop/CHANGELOG.md).
- [ ] I have included a uniquely named [changelog fragment file](https://github.com/prysmaticlabs/prysm/blob/develop/CONTRIBUTING.md#maintaining-changelogmd).
- [ ] I have added a description to this PR with sufficient context for reviewers to understand this PR.
46 changes: 23 additions & 23 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
name: CI
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: changelog

on:
pull_request:
branches:
- develop
branches: [ "develop" ]

jobs:
changed_files:
runs-on: ubuntu-latest
name: Check CHANGELOG.md
run-changelog-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: changelog modified
id: changelog-modified
- name: Checkout source code
uses: actions/checkout@v3

- name: Download unclog binary
uses: dsaltares/fetch-gh-release-asset@aa2ab1243d6e0d5b405b973c89fa4d06a2d0fff7 # 1.1.2
with:
repo: OffchainLabs/unclog
file: "unclog"

- name: Get new changelog files
id: new-changelog-files
uses: tj-actions/changed-files@v45
with:
files: CHANGELOG.md
files: |
changelog/**.md
- name: List all changed files
- name: Run lint command
env:
ALL_CHANGED_FILES: ${{ steps.changelog-modified.outputs.all_changed_files }}
run: |
if [[ ${ALL_CHANGED_FILES[*]} =~ (^|[[:space:]])"CHANGELOG.md"($|[[:space:]]) ]];
then
echo "CHANGELOG.md was modified.";
exit 0;
else
echo "CHANGELOG.md was not modified.";
echo "Please see CHANGELOG.md and follow the instructions to add your changes to that file."
echo "In some rare scenarios, a changelog entry is not required and this CI check can be ignored."
exit 1;
fi
ALL_ADDED_MARKDOWN: ${{ steps.new-changelog-files.outputs.added_files }}
run: chmod +x unclog && ./unclog check -fragment-env=ALL_ADDED_MARKDOWN
64 changes: 0 additions & 64 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,70 +4,6 @@ All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

## [Unreleased](https://github.com/prysmaticlabs/prysm/compare/v5.2.0...HEAD)

### Added

- Added proper gas limit check for header from the builder.
- Added an error field to log `Finished building block`.
- Implemented a new `EmptyExecutionPayloadHeader` function.
- `Finished building block`: Display error only if not nil.
- Added support to update target and max blob count to different values per hard fork config.
- Log before blob filesystem cache warm-up.
- New design for the attestation pool. [PR](https://github.com/prysmaticlabs/prysm/pull/14324)
- Add field param placeholder for Electra blob target and max to pass spec tests.
- Add EIP-7691: Blob throughput increase.
- SSZ files generation: Remove the `// Hash: ...` header.
- DB optimization for saving light client bootstraps (save unique sync committees only).
- Trace IDONTWANT Messages in Pubsub.
- Add Fulu fork boilerplate.
- Separate type for unaggregated network attestations. [PR](https://github.com/prysmaticlabs/prysm/pull/14659)
- Update spec tests to v1.5.0-beta.0.

### Changed

- Process light client finality updates only for new finalized epochs instead of doing it for every block.
- Refactor subnets subscriptions.
- Refactor RPC handlers subscriptions.
- Go deps upgrade, from `ioutil` to `io`
- Move successfully registered validator(s) on builder log to debug.
- Update some test files to use `crypto/rand` instead of `math/rand`
- Enforce Compound prefix (0x02) for target when processing pending consolidation request.
- Limit consolidating by validator's effective balance.
- Use 16-bit random value for proposer and sync committee selection filter.
- Re-organize the content of the `*.proto` files (No functional change).
- Updated spec definitions for `process_slashings` in godocs. Simplified `ProcessSlashings` API.
- Updated spec definition electra `process_registry_updates`.
- Updated Electra spec definition for `process_epoch`.
- Update our `go-libp2p-pubsub` dependency.
- Re-organize the content of files to ease the creation of a new fork boilerplate.
- Fixed Metadata errors for peers connected via QUIC.
- Process light client finality updates only for new finalized epochs instead of doing it for every block.
- Update blobs by rpc topics from V2 to V1.
- Updated geth to 1.14 ~
- E2e tests start from bellatrix

### Deprecated


### Removed

- Cleanup ProcessSlashings method to remove unnecessary argument.
- Remove `/proto/eth/v2` directory. [PR](https://github.com/prysmaticlabs/prysm/pull/14765)
- Remove `/memsize/` pprof endpoint as it will no longer be supported in go 1.23, geth also removed in https://github.com/ethereum/go-ethereum/commit/e4675771eda550e7eeb63a8884816982c1980644

### Fixed

- Added check to prevent nil pointer deference or out of bounds array access when validating the BLSToExecutionChange on an impossibly nil validator.
- EIP-7691: Ensure new blobs subnets are subscribed on epoch in advance.
- Fix kzg commitment inclusion proof depth minimal value.

### Security

- go version upgrade to 1.22.10 for CVE CVE-2024-34156
- Update golang.org/x/crypto to v0.31.0 to address CVE-2024-45337
- Update golang.org/x/net to v0.33.0 to address CVE-2024-45338

## [v5.2.0](https://github.com/prysmaticlabs/prysm/compare/v5.1.2...v5.2.0)

Updating to this release is highly recommended, especially for users running v5.1.1 or v5.1.2.
Expand Down
16 changes: 5 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Navigate to your fork of the repo on GitHub. On the upper left where the current

**16. Add an entry to CHANGELOG.md.**

If your change is user facing, you must include a CHANGELOG.md entry. See the [Maintaining CHANGELOG.md](#maintaining-changelogmd) section for more information.
All PRs must must include a changelog fragment file in the `changelog` directory. If your change is not user-facing or should not be mentioned in the changelog for some other reason, you may use the `Ignored` changelog section in your fragment's header to satisfy this requirement without altering the final release changelog. See the [Maintaining CHANGELOG.md](#maintaining-changelogmd) section for more information.

**17. Create a pull request.**

Expand Down Expand Up @@ -177,16 +177,10 @@ $ git push myrepo feature-in-progress-branch -f

## Maintaining CHANGELOG.md

This project follows the changelog guidelines from [keepachangelog.com](https://keepachangelog.com/en/1.1.0/).

All PRs with user facing changes should have an entry in the CHANGELOG.md file and the change should be categorized in the appropriate category within the "Unreleased" section. The categories are:

- `Added` for new features.
- `Changed` for changes in existing functionality.
- `Deprecated` for soon-to-be removed features.
- `Removed` for now removed features.
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities. Please see the [Security Policy](SECURITY.md) for responsible disclosure before adding a change with this category.
This project follows the changelog guidelines from [keepachangelog.com](https://keepachangelog.com/en/1.1.0/). In order to minimize conflicts and workflow headaches, we chose to implement a changelog management
strategy that uses changelog "fragment" files, managed by our changelog management tool called `unclog`. Each PR must include a new changelog fragment file in the `changelog` directory, as specified by unclog's
[README.md](https://github.com/OffchainLabs/unclog?tab=readme-ov-file#what-is-a-changelog-fragment). As the `unclog` README suggests in the [Best Practices](https://github.com/OffchainLabs/unclog?tab=readme-ov-file#best-practices) section,
the standard naming convention for your PR's fragment file, to avoid conflicting with another fragment file, is `changelog/<github user name>_<PR branch name>.md`.

### Releasing

Expand Down
10 changes: 5 additions & 5 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ filegroup(
url = "https://github.com/ethereum/EIPs/archive/5480440fe51742ed23342b68cf106cefd427e39d.tar.gz",
)

consensus_spec_version = "v1.5.0-beta.0"
consensus_spec_version = "v1.5.0-alpha.10"

bls_test_version = "v0.1.1"

Expand All @@ -243,7 +243,7 @@ filegroup(
visibility = ["//visibility:public"],
)
""",
integrity = "sha256-HdMlTN3wv+hUMCkIRPk+EHcLixY1cSZlvkx3obEp4AM=",
integrity = "sha256-NtWIhbO/mVMb1edq5jqABL0o8R1tNFiuG8PCMAsUHcs=",
url = "https://github.com/ethereum/consensus-spec-tests/releases/download/%s/general.tar.gz" % consensus_spec_version,
)

Expand All @@ -259,7 +259,7 @@ filegroup(
visibility = ["//visibility:public"],
)
""",
integrity = "sha256-eX/ihmHQ+OvfoGJxSMgy22yAU3SZ3xjsX0FU0EaZrSs=",
integrity = "sha256-DFlFlnzls1bBrDm+/xD8NK2ivvkhxR+rSNVLLqScVKc=",
url = "https://github.com/ethereum/consensus-spec-tests/releases/download/%s/minimal.tar.gz" % consensus_spec_version,
)

Expand All @@ -275,7 +275,7 @@ filegroup(
visibility = ["//visibility:public"],
)
""",
integrity = "sha256-k3Onf42vOzIqyddecR6G82sDy3mmDA+R8RN66QjB0GI=",
integrity = "sha256-G9ENPF8udZL/BqRHbi60GhFPnZDPZAH6UjcjRiOlvbk=",
url = "https://github.com/ethereum/consensus-spec-tests/releases/download/%s/mainnet.tar.gz" % consensus_spec_version,
)

Expand All @@ -290,7 +290,7 @@ filegroup(
visibility = ["//visibility:public"],
)
""",
integrity = "sha256-N/d4AwdOSlb70Dr+2l20dfXxNSzJDj/qKA9Rkn8Gb5w=",
integrity = "sha256-ClOLKkmAcEi8/uKi6LDeqthask5+E3sgxVoA0bqmQ0c=",
strip_prefix = "consensus-specs-" + consensus_spec_version[1:],
url = "https://github.com/ethereum/consensus-specs/archive/refs/tags/%s.tar.gz" % consensus_spec_version,
)
Expand Down
80 changes: 10 additions & 70 deletions beacon-chain/core/time/slot_epoch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,76 +84,6 @@ func TestNextEpoch_OK(t *testing.T) {
}
}

func TestCanUpgradeToAltair(t *testing.T) {
params.SetupTestConfigCleanup(t)
bc := params.BeaconConfig()
bc.AltairForkEpoch = 5
params.OverrideBeaconConfig(bc)
tests := []struct {
name string
slot primitives.Slot
want bool
}{
{
name: "not epoch start",
slot: 1,
want: false,
},
{
name: "not altair epoch",
slot: params.BeaconConfig().SlotsPerEpoch,
want: false,
},
{
name: "altair epoch",
slot: primitives.Slot(params.BeaconConfig().AltairForkEpoch) * params.BeaconConfig().SlotsPerEpoch,
want: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := time.CanUpgradeToAltair(tt.slot); got != tt.want {
t.Errorf("canUpgradeToAltair() = %v, want %v", got, tt.want)
}
})
}
}

func TestCanUpgradeBellatrix(t *testing.T) {
params.SetupTestConfigCleanup(t)
bc := params.BeaconConfig()
bc.BellatrixForkEpoch = 5
params.OverrideBeaconConfig(bc)
tests := []struct {
name string
slot primitives.Slot
want bool
}{
{
name: "not epoch start",
slot: 1,
want: false,
},
{
name: "not bellatrix epoch",
slot: params.BeaconConfig().SlotsPerEpoch,
want: false,
},
{
name: "bellatrix epoch",
slot: primitives.Slot(params.BeaconConfig().BellatrixForkEpoch) * params.BeaconConfig().SlotsPerEpoch,
want: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := time.CanUpgradeToBellatrix(tt.slot); got != tt.want {
t.Errorf("CanUpgradeToBellatrix() = %v, want %v", got, tt.want)
}
})
}
}

func TestCanProcessEpoch_TrueOnEpochsLastSlot(t *testing.T) {
tests := []struct {
slot primitives.Slot
Expand Down Expand Up @@ -273,6 +203,16 @@ func TestCanUpgradeTo(t *testing.T) {
forkEpoch *primitives.Epoch
upgradeFunc func(primitives.Slot) bool
}{
{
name: "Altair",
forkEpoch: &beaconConfig.AltairForkEpoch,
upgradeFunc: time.CanUpgradeToAltair,
},
{
name: "Bellatrix",
forkEpoch: &beaconConfig.BellatrixForkEpoch,
upgradeFunc: time.CanUpgradeToBellatrix,
},
{
name: "Capella",
forkEpoch: &beaconConfig.CapellaForkEpoch,
Expand Down
8 changes: 4 additions & 4 deletions beacon-chain/p2p/discovery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,10 +370,10 @@ func TestStaticPeering_PeersAreAdded(t *testing.T) {
}

func TestHostIsResolved(t *testing.T) {
// As defined in RFC 2606 , example.org is a
// reserved example domain name.
exampleHost := "example.org"
exampleIP := "93.184.215.14"
// ip.addr.tools - construct domain names that resolve to any given IP address
// ex: 192-0-2-1.ip.addr.tools resolves to 192.0.2.1.
exampleHost := "96-7-129-13.ip.addr.tools"
exampleIP := "96.7.129.13"

s := &Service{
cfg: &Config{
Expand Down
4 changes: 1 addition & 3 deletions beacon-chain/rpc/eth/config/handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ func TestGetSpec(t *testing.T) {
data, ok := resp.Data.(map[string]interface{})
require.Equal(t, true, ok)

assert.Equal(t, 165, len(data))
assert.Equal(t, 164, len(data))
for k, v := range data {
t.Run(k, func(t *testing.T) {
switch k {
Expand Down Expand Up @@ -538,8 +538,6 @@ func TestGetSpec(t *testing.T) {
assert.Equal(t, "9", v)
case "MAX_REQUEST_BLOB_SIDECARS_ELECTRA":
assert.Equal(t, "1152", v)
case "MAX_REQUEST_BLOB_SIDECARS_FULU":
assert.Equal(t, "1536", v)
case "NUMBER_OF_CUSTODY_GROUPS":
assert.Equal(t, "128", v)
case "CUSTODY_REQUIREMENT":
Expand Down
2 changes: 1 addition & 1 deletion beacon-chain/sync/rate_limiter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

func TestNewRateLimiter(t *testing.T) {
rlimiter := newRateLimiter(mockp2p.NewTestP2P(t))
assert.Equal(t, 17, len(rlimiter.limiterMap), "correct number of topics not registered")
assert.Equal(t, 15, len(rlimiter.limiterMap), "correct number of topics not registered")
}

func TestNewRateLimiter_FreeCorrectly(t *testing.T) {
Expand Down
4 changes: 0 additions & 4 deletions beacon-chain/sync/rpc_blob_sidecars_by_range.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,6 @@ func (s *Service) blobSidecarsByRangeRPCHandler(ctx context.Context, msg interfa
wQuota = beaconConfig.MaxRequestBlobSidecarsElectra
}

if currentEpoch >= beaconConfig.FuluForkEpoch {
wQuota = beaconConfig.MaxRequestBlobSidecarsFulu
}

for batch, ok = batcher.next(ctx, stream); ok; batch, ok = batcher.next(ctx, stream) {
batchStart := time.Now()
wQuota, err = s.streamBlobBatch(ctx, batch, wQuota, stream)
Expand Down
8 changes: 0 additions & 8 deletions beacon-chain/sync/rpc_blob_sidecars_by_root.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,6 @@ func validateBlobByRootRequest(blobIdents types.BlobSidecarsByRootReq, slot prim
epoch := slots.ToEpoch(slot)
blobIdentCount := uint64(len(blobIdents))

if epoch >= beaconConfig.FuluForkEpoch {
if blobIdentCount > beaconConfig.MaxRequestBlobSidecarsFulu {
return types.ErrMaxBlobReqExceeded
}

return nil
}

if epoch >= beaconConfig.ElectraForkEpoch {
if blobIdentCount > beaconConfig.MaxRequestBlobSidecarsElectra {
return types.ErrMaxBlobReqExceeded
Expand Down
8 changes: 0 additions & 8 deletions beacon-chain/sync/rpc_send_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,6 @@ func SendBlobsByRangeRequest(ctx context.Context, tor blockchain.TemporalOracle,
max = beaconConfig.MaxRequestBlobSidecarsElectra
}

if startEpoch >= beaconConfig.FuluForkEpoch {
max = beaconConfig.MaxRequestBlobSidecarsFulu
}

if max > req.Count*maxBlobsPerBlock {
max = req.Count * maxBlobsPerBlock
}
Expand Down Expand Up @@ -224,10 +220,6 @@ func SendBlobSidecarByRoot(
max = beaconConfig.MaxRequestBlobSidecarsElectra
}

if epoch >= beaconConfig.FuluForkEpoch {
max = beaconConfig.MaxRequestBlobSidecarsFulu
}

maxBlobCount := beaconConfig.MaxBlobsPerBlock(slot)
if max > uint64(len(*req)*maxBlobCount) {
max = uint64(len(*req) * maxBlobCount)
Expand Down
Loading

0 comments on commit f6b1fb1

Please sign in to comment.