-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update log levels #609
Update log levels #609
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1508,7 +1508,7 @@ func (bc *BlockChain) reorg(oldBlock, newBlock *types.Block) error { | |
logFn(msg, "number", commonBlock.Number(), "hash", commonBlock.Hash(), | ||
"drop", len(oldChain), "dropfrom", oldChain[0].Hash(), "add", len(newChain), "addfrom", newChain[0].Hash()) | ||
} else { | ||
log.Warn("Unlikely preference change (rewind to ancestor) occurred", "oldnum", oldHead.Number(), "oldhash", oldHead.Hash(), "newnum", newHead.Number(), "newhash", newHead.Hash()) | ||
log.Debug("Preference change (rewind to ancestor) occurred", "oldnum", oldHead.Number(), "oldhash", oldHead.Hash(), "newnum", newHead.Number(), "newhash", newHead.Hash()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Follows update made in Coreth to reduce this to |
||
} | ||
// Insert the new chain(except the head block(reverse order)), | ||
// taking care of the proper incremental order. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,19 +43,19 @@ func (c *crossChainHandler) HandleEthCallRequest(ctx context.Context, requesting | |
transactionArgs := ethapi.TransactionArgs{} | ||
err := json.Unmarshal(ethCallRequest.RequestArgs, &transactionArgs) | ||
if err != nil { | ||
log.Debug("error occurred with JSON unmarshalling ethCallRequest.RequestArgs", "err", err) | ||
log.Error("error occurred with JSON unmarshalling ethCallRequest.RequestArgs", "err", err) | ||
return nil, nil | ||
} | ||
|
||
result, err := ethapi.DoCall(ctx, c.backend, transactionArgs, lastAcceptedBlockNumberOrHash, nil, c.backend.RPCEVMTimeout(), c.backend.RPCGasCap()) | ||
if err != nil { | ||
log.Debug("error occurred with EthCall", "err", err, "transactionArgs", ethCallRequest.RequestArgs, "blockNumberOrHash", lastAcceptedBlockNumberOrHash) | ||
log.Error("error occurred with EthCall", "err", err, "transactionArgs", ethCallRequest.RequestArgs, "blockNumberOrHash", lastAcceptedBlockNumberOrHash) | ||
return nil, nil | ||
} | ||
|
||
executionResult, err := json.Marshal(&result) | ||
if err != nil { | ||
log.Debug("error occurred with JSON marshalling result", "err", err) | ||
log.Error("error occurred with JSON marshalling result", "err", err) | ||
Comment on lines
+46
to
+58
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These requests should only come from a VM running on the same node, so failing to serve the request should be considered a warning at this time. Note: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should these be a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is assuming that requests coming from the same node. This is a feature that's not in use atm, so it depends on if VMs that wanted to use this should only send requests that should be successful 🤔 That was my logic when updating to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As of right now, if this log showed up I'd want to know about it rather than only wanting to know about it if it showed up in a large quantity or a surge, so I'm going to leave this as is for now. We may want to change this in the future if the access pattern for it changes. |
||
return nil, nil | ||
} | ||
|
||
|
@@ -65,7 +65,7 @@ func (c *crossChainHandler) HandleEthCallRequest(ctx context.Context, requesting | |
|
||
responseBytes, err := c.crossChainCodec.Marshal(Version, response) | ||
if err != nil { | ||
log.Warn("error occurred with marshalling EthCallResponse", "err", err, "EthCallResponse", response) | ||
log.Error("error occurred with marshalling EthCallResponse", "err", err, "EthCallResponse", response) | ||
return nil, nil | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -257,7 +257,7 @@ func (client *stateSyncerClient) syncBlocks(ctx context.Context, fromHash common | |
} | ||
blocks, err := client.client.GetBlocks(ctx, nextHash, nextHeight, parentsPerRequest) | ||
if err != nil { | ||
log.Warn("could not get blocks from peer", "err", err, "nextHash", nextHash, "remaining", i+1) | ||
log.Error("could not get blocks from peer", "err", err, "nextHash", nextHash, "remaining", i+1) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This means that it has failed to sync, so this should be increased from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wouldn't it be possible for the peer to send us a malformed blocks and trigger this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The call to |
||
return err | ||
} | ||
for _, block := range blocks { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can occur if a user requests too much gas, so we should not consider it an unexpected warn log