-
Notifications
You must be signed in to change notification settings - Fork 74
feat: monitorv2 signer check support #776
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add a new AUTHOR column to display block authors: - Shows miner address for PoW blocks (non-zero miner field) - Shows validator signer for PoA blocks (extracted from extra data via Ecrecover) - Falls back to "N/A" if signer extraction fails Key improvements: - Add getCachedSigner() method with thread-safe caching to avoid expensive repeated Ecrecover operations during table updates - Refactor updateTable() to use dynamic column rendering via getColumnValue() helper instead of hardcoded column assignments - Replace hardcoded column count (10) with len(t.columns) for maintainability - Add required imports for hex encoding and polymetrics package This eliminates UI stuttering on PoA chains by caching signer results per block hash, ensuring each block's author is computed only once.
The p2p sensor was panicking when processing transactions without an explicit chain ID (legacy transactions). This fix: - Adds chainID field to JSONDatabase and Datastore structs - Uses the network ID as chain ID when creating database instances - Falls back to the database's chain ID when a transaction doesn't have one - Prevents panic from calling LatestSignerForChainID with nil This ensures proper handling of all transaction types during p2p monitoring.
The previous fix didn't fully address the issue when NetworkID is 0. When NetworkID is 0, we were still creating a chainID of 0 which causes LatestSignerForChainID to panic. This fix: - Checks if chainID is 0 and treats it the same as nil - Only attempts sender recovery when we have a valid non-zero chainID - Gracefully handles transactions when chainID cannot be determined This prevents the panic "invalid chainID 0" in the p2p sensor when processing pooled transactions.
Signed-off-by: Ji Hwan <jkim@polygon.technology>
Signed-off-by: Ji Hwan <jkim@polygon.technology>
Signed-off-by: Ji Hwan <jkim@polygon.technology>
Signed-off-by: Ji Hwan <jkim@polygon.technology>
leovct
approved these changes
Nov 10, 2025
Member
leovct
left a comment
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.
lgtm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add feature to observe signers for Bor block production
AUTHORcolumn value from theminervalue in the block. If it's0x0address, the value is fetched from the validator signatures where applicable (e.g. Polygon Chain)polycli dockerlogger