feat: Enhance result handling and UI for found keys#124
Merged
Conversation
- Added idempotent insert for results with ON CONFLICT handling in SQL. - Introduced new SQL queries for resetting win scenarios and fetching detailed results. - Updated server logic to handle win scenarios, ensuring proper job leasing and target address management. - Enhanced result submission with detailed logging for failures. - Created new UI templates for displaying found results and integrated them into existing dashboard. - Improved data handling in the dashboard to normalize key counts and throughput values. - Updated worker logic to correctly process and submit found results, including nonce handling. - Adjusted tests to reflect changes in result submission and processing logic.
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
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.
This pull request introduces a "Win Scenario" feature for EthScanner, enabling deterministic testing by ensuring workers are assigned a job where the winning Ethereum key is guaranteed to be found. The implementation includes updates to the mock API, master server logic, and database handling to support this mode, along with improvements for idempotent result recording and enhanced dashboard result visibility.
Win Scenario and Testing Improvements:
README.md)MASTER_WIN_SCENARIOconfiguration and logic in the master server to always allocate a job with a zero prefix and nonce range containing the winning key (0x1). (go/Makefile,go/internal/config/config.go,go/internal/server/jobs.go) [1] [2] [3] [4] [5] [6] [7]esp-mock-api) to support a-winflag, returning a job that guarantees a match, and properly handles completion and job exhaustion. (go/cmd/esp-mock-api/main.go) [1] [2] [3] [4] [5] [6]Database and Result Handling:
InsertResultSQL to useON CONFLICTfor duplicate keys, allowing multiple workers to report the same key without error. (go/internal/database/sql/queries.sql,go/internal/database/queries.sql.go) [1] [2] [3]go/internal/database/sql/queries.sql,go/internal/database/queries.sql.go,go/internal/server/jobs.go) [1] [2] [3]Dashboard and Monitoring Enhancements:
go/internal/database/sql/queries.sql,go/internal/database/queries.sql.go,go/internal/server/hub.go) [1] [2] [3] [4] [5]Key Derivation Consistency:
esp32/include/eth_crypto.h)Encoded references:
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24]