Skip to content

Commit d5fd7be

Browse files
authored
Merge branch 'develop' into lc-finality
2 parents b324322 + 1d8ffad commit d5fd7be

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ The format is based on Keep a Changelog, and this project adheres to Semantic Ve
3333
- Added a Prometheus error counter metric for SSE requests.
3434
- Save light client updates and bootstraps in DB.
3535
- Added more comprehensive tests for `BlockToLightClientHeader`. [PR](https://github.com/prysmaticlabs/prysm/pull/14699)
36+
- Added an error field to log `Finished building block`.
3637
- Implemented a new `EmptyExecutionPayloadHeader` function.
3738

3839
### Changed
@@ -76,7 +77,6 @@ The format is based on Keep a Changelog, and this project adheres to Semantic Ve
7677
- Updated `Blobs` endpoint to return additional metadata fields.
7778
- Made QUIC the default method to connect with peers.
7879
- Check kzg commitments align with blobs and proofs for beacon api end point.
79-
- Increase Max Payload Size in Gossip.
8080
- Revert "Proposer checks gas limit before accepting builder's bid".
8181
- Updated quic-go to v0.48.2 .
8282
- Process light client finality updates only for new finalized epochs instead of doing it for every block.

beacon-chain/p2p/encoder/ssz.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ var _ NetworkEncoding = (*SszNetworkEncoder)(nil)
1818
// MaxGossipSize allowed for gossip messages.
1919
var MaxGossipSize = params.BeaconConfig().GossipMaxSize // 10 Mib.
2020
var MaxChunkSize = params.BeaconConfig().MaxChunkSize // 10 Mib.
21-
var MaxUncompressedPayloadSize = 2 * MaxGossipSize // 20 Mib.
2221

2322
// This pool defines the sync pool for our buffered snappy writers, so that they
2423
// can be constantly reused.
@@ -44,8 +43,8 @@ func (_ SszNetworkEncoder) EncodeGossip(w io.Writer, msg fastssz.Marshaler) (int
4443
if err != nil {
4544
return 0, err
4645
}
47-
if uint64(len(b)) > MaxUncompressedPayloadSize {
48-
return 0, errors.Errorf("gossip message exceeds max gossip size: %d bytes > %d bytes", len(b), MaxUncompressedPayloadSize)
46+
if uint64(len(b)) > MaxGossipSize {
47+
return 0, errors.Errorf("gossip message exceeds max gossip size: %d bytes > %d bytes", len(b), MaxGossipSize)
4948
}
5049
b = snappy.Encode(nil /*dst*/, b)
5150
return w.Write(b)
@@ -82,7 +81,7 @@ func doDecode(b []byte, to fastssz.Unmarshaler) error {
8281

8382
// DecodeGossip decodes the bytes to the protobuf gossip message provided.
8483
func (_ SszNetworkEncoder) DecodeGossip(b []byte, to fastssz.Unmarshaler) error {
85-
b, err := DecodeSnappy(b, MaxUncompressedPayloadSize)
84+
b, err := DecodeSnappy(b, MaxGossipSize)
8685
if err != nil {
8786
return err
8887
}

beacon-chain/p2p/encoder/ssz_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ func TestSszNetworkEncoder_FailsSnappyLength(t *testing.T) {
555555
e := &encoder.SszNetworkEncoder{}
556556
att := &ethpb.Fork{}
557557
data := make([]byte, 32)
558-
binary.PutUvarint(data, encoder.MaxUncompressedPayloadSize+32)
558+
binary.PutUvarint(data, encoder.MaxGossipSize+32)
559559
err := e.DecodeGossip(data, att)
560560
require.ErrorContains(t, "snappy message exceeds max size", err)
561561
}

beacon-chain/rpc/prysm/v1alpha1/validator/proposer.go

+1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ func (vs *Server) GetBeaconBlock(ctx context.Context, req *ethpb.BlockRequest) (
103103
"slot": req.Slot,
104104
"sinceSlotStartTime": time.Since(t),
105105
"validator": sBlk.Block().ProposerIndex(),
106+
"err": err,
106107
}).Info("Finished building block")
107108
if err != nil {
108109
return nil, errors.Wrap(err, "could not build block in parallel")

0 commit comments

Comments
 (0)