Skip to content
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

Improve agent logging #1797

Merged
merged 26 commits into from
Feb 12, 2023
Merged

Improve agent logging #1797

merged 26 commits into from
Feb 12, 2023

Conversation

mattiekat
Copy link
Contributor

@mattiekat mattiekat commented Feb 9, 2023

Description

Lots of changes to logging...

  • added custom debug logging to a number of types to help pare down the garbage printed
  • byte slices should now print as hex (e.g. metadata, body, ...)
  • tweaked a few log levels
  • eliminated reqwest's debug logging unless trace logging is enabled
  • tweaked logging defaults in case the operator does not configure it
  • improved logging of failure to fetch metadata
  • updated ethers to also support these changes and make things even more readable
  • added new utilities for formatting addresses based on domains
  • added new utility for formatting byte slices
  • limits max release tracing level (to save on overhead for trace level)
  • changes our log level to debug
  • some work on standardizing log messages

Drive-by changes

A few minor changes to code flow to make it easier to read, all changes outside of logging should be logically equivalent.

Related issues

Backward compatibility

Are these changes backward compatible?

Yes

Are there any infrastructure implications, e.g. changes that would prohibit deploying older commits using this infra tooling?

None

Testing

What kind of testing have these changes undergone?

Manual - been using e2e test to view what the logs look like

@mattiekat mattiekat changed the title Improve logging Improve agent logging Feb 9, 2023
@mattiekat mattiekat marked this pull request as ready for review February 9, 2023 23:29
Copy link
Contributor

@asaj asaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! Just some nits and clarifying questions, looking forward to shipping this :)

rust/agents/relayer/Cargo.toml Show resolved Hide resolved
rust/agents/relayer/src/msg/serial_submitter.rs Outdated Show resolved Hide resolved
rust/hyperlane-core/src/db/hyperlane_db.rs Outdated Show resolved Hide resolved
rust/hyperlane-core/src/types/message.rs Show resolved Hide resolved
rust/hyperlane-core/src/types/message.rs Show resolved Hide resolved
rust/hyperlane-core/src/types/message.rs Show resolved Hide resolved
rust/utils/run-locally/src/main.rs Show resolved Hide resolved
@mattiekat mattiekat requested a review from asaj February 10, 2023 20:56
Copy link
Contributor

@asaj asaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@github-actions
Copy link
Contributor

Solidity Coverage Report

Coverage after merging mattie/improve-relayer-logs into main will be
77.73% 0.00%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
contracts
   Create2Factory.sol0%100%0%0%101–102, 110, 112, 33, 58, 64–65, 77–78, 98
   GasRouter.sol73.33%100%50%100%
   HyperlaneConnectionClient.sol52.50%100%43.75%58.33%100–101, 131, 160, 164–165, 85–86, 98–99
   Mailbox.sol77.61%100%48%95.24%231, 275
   OwnableMulticall.sol50%100%40%66.67%18
   PausableReentrancyGuard.sol95.24%100%90%100%
   Router.sol80%100%69.57%88.89%46, 53, 64
   ValidatorAnnounce.sol76%100%42.86%88.89%55–56
contracts/igps
   InterchainGasPaymaster.sol91.30%100%77.78%100%
   OverheadIgp.sol63.16%100%45.45%87.50%45
contracts/isms
   MultisigIsm.sol82%100%51.52%97.01%337, 339
contracts/libs
   Call.sol0%100%0%0%13–18, 24–29, 39, 41–44, 48–50
   EnumerableMapExtended.sol36.36%100%28.57%50%45, 61, 69–70
   Merkle.sol91.04%100%50%98.25%44
   Message.sol60.61%100%45.45%90.91%109
   MinimalProxy.sol66.67%100%50%100%
   MultisigIsmMetadata.sol70.59%100%50%100%
   TypeCasts.sol30.77%100%33.33%28.57%11–13, 17–18
   ValidatorAnnouncements.sol75%100%50%100%
contracts/middleware
   InterchainAccountRouter.sol58.33%100%33.33%76.19%107, 40, 42–43, 59
   InterchainQueryRouter.sol67.74%100%33.33%76%105–109, 65
contracts/middleware/liquidity-layer
   LiquidityLayerRouter.sol73.08%100%40%93.75%34
contracts/middleware/liquidity-layer/adapters
   CircleBridgeAdapter.sol35.59%100%17.65%42.86%169, 176, 178, 185, 191–192, 194–195, 200–201, 203, 211–212, 214–215, 221–222, 224, 58–59, 75, 77–78, 81
   PortalAdapter.sol52.27%100%20%68.97%192, 199, 201, 52–53, 69, 71–73

@asaj asaj merged commit 8105913 into main Feb 12, 2023
@asaj asaj deleted the mattie/improve-relayer-logs branch February 12, 2023 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants