-
Notifications
You must be signed in to change notification settings - Fork 178
Add on-chain witness verification + other improvements #256
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
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
Contributor
StarDumpling
commented
Mar 12, 2025
- Onchain witness verification - before using witnesses for message commitments, verify they match the witnesses in mined txs
- Add in-memory cache and local data store to speed up test execution
- Fix fees after chunker and assert tx optimization
- Remove code duplication in the client
- Add a convenience CLI command for funding UTXOs
- separate finalize and broadcast
* reduce lock scripts mem copy during encoding * wording * comment * add profiling
* Couple test tx wait time with regtest scripts - Introduce `.env.test` file to configure regtest block time - Update block generator script to read block interval from environment - Modify helper functions to dynamically load block time from `.env.test` - Add `source_network` field to `BitVMClient` to support network-specific configurations - Refactor waiting functions to use network-specific block times * Replace eprintln with println for non-error messages in tests * Update CLI args to meet `clap` library restrictions * Rename CLI application from `bitvm-cli` to `bridge` and update related documentation * Refactor key directory handling in CLI key command - Improve error message for missing HOME environment variable - Update variable names to be more relevant * Delete .env.test * Clean up verifying key argument in CLI key command * Update output messages for verifying key to improve clarity * Add path prefix in client command Update default environment to testnet * Fix the use of network when generating keys
* Fix disprove * fix musig2 tests
* compress remote data * refactor compression * typo * revert serialization error handling behavior
* use static cache for connector C * Add spend info output message * remove unsed cache_id * optimize cache write * rename read_cache / write_cache * cache naming
* CLI fixes * Introduce mock adaptor for chain service * Add missing commands to client CLI, fix statuses * Clean up Esplora URL handling * Add a comment * Create L2 chain adaptor outside client constructor * Update comment * Add `set-chain-service' command and broadcast disprove command * Refactor `get_proof()` fn * Fix conflicting 'set-chain-service' command flag * Unblock the CLI using mock chain adaptor * Revert the bridge key dir name change * Add an error message when funding UTXO is missing * Fix the Alpen signet URL 🙈 * Add missing client sync before certain commands * Replace direct `MockAdaptor` instantiation with a helper call * Rename "set-chain-service" command to "mock-l2-pegout-event" for clarity * Rustfmt * Enhance output formatting for depositor address in CLI * Improve UTXO retrieval output by adding count and handling empty results * Improve error messages for configuration reading * Add `get-operator-address` and `get-operator-utxos` commands * Improve console out messages * Remove unused import * Fix operator's commands * Remove verbose private data file console output * Remove '.' after graph ID in console output for easier copying in terminal * Add graph type in console output for clarity and make it consistent across messaging * Refactor key command handling to display current key configuration when no arguments are provided Remove hardcoded secrets from base graph module and redefine them in the test setup * Remove remaining hardcoded secrets * Add missing data sync and flush when mocking L2 event * Add missing data flush after boradcasting peg-out * Change the Alpen signet endpoint to one that accepts large txs * Remove duplicate info in console output for transaction broadcasting * Add error message for missing verifier public keys in client command * Add commands for assert_initial_* with invalid proof * removed compression profiling * Update typo in bridge/src/client/cli/utils.rs Co-authored-by: aristotleee <[email protected]> * Update `README.md` * Fix user profile CLI argument and README accordingly --------- Co-authored-by: franklynot <[email protected]> Co-authored-by: aristotleee <[email protected]>
* Add demo instructions for peg-in and peg-out processes * Add a TODO for example configuration and client setup in demo guide * Specify recommended deposit amount * Add full setup for all actors and describe UTXOs * Correct the scenario title and add final 'take 2' step in 'rejected disprove' scenario * Fix 'rejected disprove' scenario title * Update funding UTXO amounts * Add funding UTXOs info and move env setup to bottom * Use internal link for env setup section at the top * Update the internal link * Fix the link * Update wording for readability * Add successful disprove scenario instructions * Fix typo * Formatting touch-up * Make it easier to identify funding UTXOs * Fix internal links * Fix internal links again --------- Co-authored-by: StarDumpling <[email protected]>
print status when generating commitment secrets
* process commit 1&2 together * wait longer for process large txns * print status when generating commitment secrets
* fix take 1 relay fee check * ignore disprove chain * ignore disprove standalone test * make longer tests running in serial * test fixes * update disprove relay fee
* remove unnecessary argument * cache script and control block * use get_or_put to optimize cache usage * remove profiling * naming * fix merge compile error * assert commitment_public_keys is not empty * ignoring NotFound error kind * remove all old files if cache file count reach the limit * address comments * fix print on delete
* remove unnecessary argument * cache script and control block * use get_or_put to optimize cache usage * remove profiling * cache validation result * use global cache * fix dead lock * naming * fix merge compile error * assert commitment_public_keys is not empty * ignoring NotFound error kind * remove all old files if cache file count reach the limit * hash when caching * use &str * remove mut
* use local storage as remote storage * prioritize local file store * rename shared file data store to local_file * added env check * use flag instead root path * address comments * use test_data * file path separator
* Validate witness, refactor validation functions * Refactor witness validation * Fetch on-chain witness, validate witness for txs with commits * Return boolean from `validate_data()` fn * Refactor validation errors, verify error params * Fetch tx statuses and onchain txs in parallel * Fix test fee * block async validate_data in synced closure * Add witness validation tests * Fix typo * remove validation cache * Adjust relay fee, fix witness validation --------- Co-authored-by: aristotleee <[email protected]>
* Validate witness, refactor validation functions * Refactor witness validation * Fetch on-chain witness, validate witness for txs with commits * Return boolean from `validate_data()` fn * Refactor validation errors, verify error params * Fetch tx statuses and onchain txs in parallel * Fix test fee * block async validate_data in synced closure * Add witness validation tests * Fix typo * remove validation cache * Improve code clarity and reduce duplication * Fix error message --------- Co-authored-by: StarDumpling <[email protected]> Co-authored-by: aristotleee <[email protected]>
* Validate witness, refactor validation functions * Refactor witness validation * Fetch on-chain witness, validate witness for txs with commits * Return boolean from `validate_data()` fn * Refactor validation errors, verify error params * Fetch tx statuses and onchain txs in parallel * Fix test fee * block async validate_data in synced closure * Add witness validation tests * Fix typo * remove validation cache * Improve code clarity and reduce duplication * Fix error message * Add CLI command to retrieve minimum funding UTXO amounts and update demo instructions * Update DEMO_INSTRUCTIONS.md Co-authored-by: StarDumpling <[email protected]> * Reword user output for clarity --------- Co-authored-by: StarDumpling <[email protected]> Co-authored-by: aristotleee <[email protected]>
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.