This repository has been archived by the owner on Apr 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
feat: support json output for query signers command #338
Merged
Merged
Changes from 3 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
275f4dd
feat: support json output for query signers command
rach-id b174b36
chore: lint
rach-id 9531b71
chore: lint
rach-id e75850a
chore: use logger instead of println
rach-id 0cad2db
chore: better printing
rach-id aebc2d7
chore: remove unused function
rach-id fdb2969
chore: add done message to printing
rach-id a8abfb2
chore: better logging underscore
rach-id 60e2419
fix: use the correct signature
rach-id File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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 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.
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.
[blocking question]
this is likely fine for most cases, but does this require one file per query? should we instead use something like
this way, we can continually append to a single file
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.
That makes sense to me, @mojtaba-esk what do you think? Which would make your life easier?
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.
the above suggestion will work both ways I believe, where if we specify a different file name with each query, it will create different files. If you use the file name, only then will it append.
Its likely that the standard library is doing something similar under the hood of
os.Create
, but this is more explicit and saferThere 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.
I'm thinking about this, and i wonder if the output file, if we keep appending to it, will it be a correct json output?
Do we care about that?
@evan-forbes
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.
Example output from updated implementation:
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.
Thanks @sweexordious This output makes it easy to process with the
knack-updater
tool.Just a question: we need to run the command once to get all the evm addresses and their signing status up to the time right?
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.
Cool 👍
You need to run it for different nonces. The way the QGB works is via having multiple attestations, referenced by their nonce, signed by the orchestrators (which are run by the validators).
Thus, we need to check each nonce apart to know who signed it and who didn't
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.
0cad2db
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.
yeah good point, it is purely dependant on what @mojtaba-esk is okay with atm, but in the future we might want to add some delimiter to make it easier to parse. either that or use something simlar to json lines.
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.
The delimiter is already
\n
, so we should be good