Skip to content

Commit 1e2a6a7

Browse files
authored
Increase max message size for p2p peers (#1922)
* Increase max message size for p2p peers * Bump version to 1.5.7 * Fix lines order (payload not initialized)
1 parent 53d0c2e commit 1e2a6a7

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

consensus/istanbul/core/handler.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,13 @@ func (c *core) handleMsg(payload []byte) error {
165165

166166
// Decode message and check its signature
167167
msg := new(istanbul.Message)
168-
logger.Debug("Got new message", "payload", hexutil.Encode(payload))
168+
logger.Trace("Got new message", "payload", hexutil.Encode(payload))
169169
if err := msg.FromPayload(payload, c.validateFn); err != nil {
170170
logger.Debug("Failed to decode message from payload", "err", err)
171171
return err
172172
}
173+
logger.Debug("Got new Istanbul consensus message", "code", msg.Code,
174+
"from", msg.Address[:])
173175

174176
// Only accept message if the address is valid
175177
_, src := c.current.ValidatorSet().GetByAddress(msg.Address)

eth/protocols/eth/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ func nodeInfo(chain *core.BlockChain, network uint64) *NodeInfo {
162162
func Handle(backend Backend, peer *Peer) error {
163163
for {
164164
if err := handleMessage(backend, peer); err != nil {
165-
peer.Log().Debug("Message handling failed in `eth`", "err", err)
165+
peer.Log().Warn("Message handling failed in `eth`", "err", err)
166166
return err
167167
}
168168
}

eth/protocols/eth/protocol.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const ProtocolName = "eth"
4343
var ProtocolVersions = []uint{ETH66, ETH65}
4444

4545
// maxMessageSize is the maximum cap on the size of a protocol message.
46-
const maxMessageSize = 10 * 1024 * 1024
46+
const maxMessageSize = 10 * 1024 * 1024 * 10 // Celo increase for istanbul round change certificates
4747

4848
const (
4949
// Protocol messages in eth/64 (celo65)

params/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
const (
2828
VersionMajor = 1 // Major version component of the current release
2929
VersionMinor = 5 // Minor version component of the current release
30-
VersionPatch = 6 // Patch version component of the current release
30+
VersionPatch = 7 // Patch version component of the current release
3131
VersionMeta = "stable" // Version metadata to append to the version string
3232
)
3333

0 commit comments

Comments
 (0)