Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ updates:
interval: "weekly"
day: "monday"
time: "09:00"
# wait 7 days for stability
cooldown:
default-days: 7

# grouping: bundle updates into one PR rather than one at a time
groups:
java-dependencies:
patterns:
- "*"
# Optional: exclude major versions so we can review these
# update-types:
# - "minor"
# - "patch"

open-pull-requests-limit: 5
labels:
- "dependencies"
4 changes: 3 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
{
"description": "Pin all GitHub Actions to SHA digests",
"matchManagers": ["github-actions"],
"pinDigests": true
"pinDigests": true,
"minimumReleaseAge": "7 days",
"groupName": "Renovatebot GHA Updates"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void handle(Envelope envelope) {
"Envelope %s in BadPacketHandler, requirements are satisfied!",
envelope.getIdString()));

LOG.debug(
LOG.trace(
() ->
String.format(
"Bad packet: %s in envelope #%s: %s",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void handle(Envelope envelope) {
try {

if (session.getWhoAreYouChallenge().isEmpty()) {
LOG.debug(String.format("Outbound WhoAreYou challenge not found for session %s", session));
LOG.trace(String.format("Outbound WhoAreYou challenge not found for session %s", session));
markHandshakeAsFailed(envelope, session);
return;
}
Expand All @@ -90,7 +90,7 @@ public void handle(Envelope envelope) {

Optional<NodeRecord> enr = packet.getHeader().getAuthData().getNodeRecord(nodeRecordFactory);
if (!enr.map(NodeRecord::isValid).orElse(true)) {
LOG.debug(
LOG.trace(
String.format(
"Node record not valid for message [%s] from node %s in status %s",
packet, session.getNodeRecord(), session.getState()));
Expand All @@ -100,15 +100,15 @@ public void handle(Envelope envelope) {
final Optional<NodeRecord> nodeRecordMaybe = session.getNodeRecord().or(() -> enr);
// Check the node record matches the ID we expect
if (!nodeRecordMaybe.map(r -> r.getNodeId().equals(session.getNodeId())).orElse(false)) {
LOG.debug(
LOG.trace(
"Incorrect node ID for message [{}] from node {} in status {}",
packet,
session.getNodeRecord(),
session.getState());
markHandshakeAsFailed(envelope, session);
return;
} else if (!enr.map(addressAccessPolicy::allow).orElse(true)) {
LOG.debug(
LOG.trace(
"Rejecting handshake from node {} because the ENR was disallowed: {}",
session.getNodeRecord(),
enr);
Expand All @@ -127,7 +127,7 @@ public void handle(Envelope envelope) {
(Bytes) nodeRecord.get(EnrField.PKEY_SECP256K1));

if (!idNonceVerifyResult) {
LOG.debug(
LOG.trace(
String.format(
"ID signature not valid for message [%s] from node %s in status %s",
packet, session.getNodeRecord(), session.getState()));
Expand All @@ -145,7 +145,7 @@ public void handle(Envelope envelope) {
enr.ifPresent(session::onNodeRecordReceived);
NextTaskHandler.tryToSendAwaitTaskIfAny(session, outgoingPipeline, scheduler);
} catch (Exception ex) {
LOG.debug(
LOG.trace(
String.format(
"Failed to read message [%s] from node %s in status %s",
packet, session.getNodeRecord(), session.getState()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void handle(Envelope envelope) {
String.format(
"Failed to read message [%s] from node %s in status %s",
packet, session.getNodeRecord(), session.getState());
LOG.debug(error, ex);
LOG.trace(error, ex);
envelope.remove(Field.PACKET_MESSAGE);
envelope.put(Field.BAD_PACKET, packet);
} catch (Throwable t) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void handle(Envelope envelope) {
if (parcel.getPacket().getBytes().size() > IncomingDataPacker.MAX_PACKET_SIZE) {
LOG.error("Outgoing packet is too large, dropping it: {}", parcel.getPacket());
} else if (!addressAccessPolicy.allow(parcel.getDestination())) {
LOG.debug(
LOG.trace(
"Dropping outgoing packet to disallowed destination: {}", parcel.getDestination());
} else {
outgoingSink.next(parcel);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void handle(final Envelope envelope) {
final InetSocketAddress sender = envelope.get(Field.REMOTE_SENDER);
if (!addressAccessPolicy.allow(sender)) {
envelope.remove(Field.INCOMING);
LOG.debug("Ignoring message from disallowed source {}", sender);
LOG.trace("Ignoring message from disallowed source {}", sender);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void handle(Envelope envelope) {
String.format(
"Failed to read message [%s] from node %s in status %s",
unknownPacket, session.getNodeRecord(), session.getState());
LOG.debug(error, ex);
LOG.trace(error, ex);
envelope.put(Field.BAD_PACKET, unknownPacket);
envelope.put(Field.BAD_EXCEPTION, ex);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void handle(final Envelope envelope) {
boolean nonceMatches =
session.getLastOutboundNonce().map(whoAreYouNonce::equals).orElse(false);
if (!nonceMatches) {
LOG.debug(
LOG.trace(
"Verification not passed for message [{}] from node {} in status {}",
whoAreYouPacket,
nodeRecord,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public synchronized List<NodeRecord> getFoundNodes() {

private boolean isValid(final NodeRecord record) {
if (!record.isValid()) {
LOG.debug("Rejecting invalid node record {}", record);
LOG.trace("Rejecting invalid node record {}", record);
return false;
}
return true;
Expand All @@ -82,7 +82,7 @@ private boolean isValid(final NodeRecord record) {
private boolean hasCorrectDistance(final NodeSession session, final NodeRecord nodeRecordV5) {
final int actualDistance = Functions.logDistance(nodeRecordV5.getNodeId(), session.getNodeId());
if (!distances.contains(actualDistance)) {
LOG.debug(
LOG.trace(
"Rejecting node record {} received from {} because distance was not in {}.",
nodeRecordV5.getNodeId(),
session.getNodeId(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ private synchronized void resetHandshakeState() {

/** Updates request info. Thread-safe. */
public synchronized void cancelAllRequests(final String message) {
LOG.debug(() -> String.format("Cancelling all requests in session %s", this));
LOG.trace(() -> String.format("Cancelling all requests in session %s", this));
final Set<Bytes> requestIdsCopy = new HashSet<>(requestIdStatuses.keySet());
requestIdsCopy.forEach(
requestId -> {
Expand Down
Loading