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

feat: allow parsing Bitcoin deposit memo with inscription #2957

Merged
merged 8 commits into from
Oct 4, 2024

Conversation

lumtis
Copy link
Member

@lumtis lumtis commented Oct 2, 2024

Description

Replace #2727

Include 346c305#diff-3cf4d08d13ce73f11d3f9e415f8060d87b9098bc3837655c6b13fef77078d382R48 changes to disable on mainnet

Summary by CodeRabbit

Release Notes

  • New Features

    • Support for stateful precompiled contracts and Bitcoin inscription on testnet.
    • Introduced staking precompiled contract with event emission capabilities.
    • Enhanced Bitcoin chain support and static information for various testnets.
    • Added a new Express.js server for Bitcoin operations with /commit and /reveal endpoints.
  • Bug Fixes

    • Resolved issues with keygen ballots and improved confirmation tracking on EVM chains.
  • Tests

    • Expanded end-to-end tests for Bitcoin inscription memo extraction and precompiled contracts.
  • Documentation

    • Updated changelog to reflect recent changes and improvements.

Copy link
Contributor

coderabbitai bot commented Oct 2, 2024

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

This pull request encompasses a range of updates to the ZetaChain project, including new features, refactoring, tests, fixes, and CI improvements. Key additions are support for stateful precompiled contracts, a zetacored RPC package, and enhancements for Bitcoin inscription on testnet. The introduction of a Bitcoin Sidecar project involves a new Dockerfile and Node.js application setup. Additionally, end-to-end tests for Bitcoin inscription functionality have been added. Overall, the changes aim to enhance functionality, testing coverage, and code quality.

Changes

File Path Change Summary
changelog.md Updated to include new features like Bitcoin inscription support, stateful precompiled contracts, and staking contract.
contrib/localnet/bitcoin-sidecar/Dockerfile Introduced a multi-stage Dockerfile for building the Bitcoin Sidecar Node.js application.
contrib/localnet/bitcoin-sidecar/js/package.json Created a new package.json for the "zeta-btc-client" project, detailing dependencies and scripts.
contrib/localnet/bitcoin-sidecar/js/src/client.ts Added ZetaBtcClient class for Bitcoin interactions, including methods for network instances and transaction handling.
contrib/localnet/bitcoin-sidecar/js/src/index.ts Introduced an Express.js server with /commit and /reveal endpoints for handling Bitcoin transactions.
contrib/localnet/bitcoin-sidecar/js/src/script.ts Added ScriptBuilder class for constructing tapscripts with methods for data handling.
contrib/localnet/bitcoin-sidecar/js/src/tsconfig.json Created a TypeScript configuration file for project settings.
contrib/localnet/bitcoin-sidecar/js/src/util.ts Introduced toXOnly utility function for public key formatting.
contrib/localnet/docker-compose.yml Added bitcoin-node-sidecar service configuration to docker-compose.yml.
e2e/e2etests/e2etests.go Added new end-to-end test for extracting Bitcoin inscription memo.
e2e/e2etests/test_extract_bitcoin_inscription_memo.go Introduced TestExtractBitcoinInscriptionMemo function for validating memo extraction.
e2e/runner/bitcoin.go Enhanced Bitcoin transaction handling with new methods for inscriptions and refactored existing logic.
e2e/runner/bitcoin_inscription.go Added InscriptionBuilder struct for managing commit and reveal transactions.
zetaclient/chains/bitcoin/observer/inbound.go Introduced GetBtcEvent function and refined existing event handling logic.
zetaclient/chains/bitcoin/observer/inbound_test.go Updated tests to reflect changes in Bitcoin event handling methods.

Possibly related PRs

Suggested labels

breaking:cli, SOLANA_TESTS

Suggested reviewers

  • fbac
  • kingpinXD
  • swift1337
  • skosito
  • brewmaster012
  • ws4charlie

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

codecov bot commented Oct 3, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 66.40%. Comparing base (f0ed61d) to head (394aa65).
Report is 5 commits behind head on develop.

Files with missing lines Patch % Lines
zetaclient/chains/bitcoin/observer/inbound.go 75.00% 1 Missing ⚠️
zetaclient/chains/bitcoin/observer/witness.go 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #2957   +/-   ##
========================================
  Coverage    66.39%   66.40%           
========================================
  Files          389      389           
  Lines        21758    21766    +8     
========================================
+ Hits         14447    14454    +7     
- Misses        6584     6585    +1     
  Partials       727      727           
Files with missing lines Coverage Δ
zetaclient/chains/bitcoin/observer/inbound.go 18.90% <75.00%> (+0.78%) ⬆️
zetaclient/chains/bitcoin/observer/witness.go 71.73% <0.00%> (ø)

... and 2 files with indirect coverage changes

@lumtis lumtis added no-changelog Skip changelog CI check and removed no-changelog Skip changelog CI check labels Oct 3, 2024
@lumtis lumtis marked this pull request as ready for review October 3, 2024 13:19
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 30

🧹 Outside diff range and nitpick comments (12)
contrib/localnet/bitcoin-sidecar/Dockerfile (1)

9-14: Approve second stage with minor enhancement suggestion.

The second stage of the Dockerfile is well-structured, utilizing a lightweight Alpine image and correctly copying only the necessary files from the builder stage. The use of the array syntax in the CMD instruction is commendable.

To further optimize the image, consider the following enhancement:

Add a non-root user for running the application:

FROM node:alpine

+RUN addgroup -S appgroup && adduser -S appuser -G appgroup
+USER appuser

COPY --from=builder /home/zeta/node/dist ./dist
COPY --from=builder /home/zeta/node/node_modules ./node_modules

CMD ["node", "dist/index.js"]

This change enhances security by adhering to the principle of least privilege.

e2e/e2etests/test_extract_bitcoin_inscription_memo.go (3)

14-20: Function signature and initial setup look appropriate.

The function signature and initial setup are well-structured for an end-to-end test. The conditional mining of blocks adds flexibility for different test environments.

Consider adding error handling for the SetBtcAddress call:

err := r.SetBtcAddress(r.Name, false)
require.NoError(r, err)

33-40: Transaction inscription and block generation are well-implemented.

The process of inscribing a transaction, generating blocks, and retrieving transaction details is logically structured with appropriate error handling.

For consistency in logging, consider using a formatted string in the Info log:

r.Logger.Info().Msgf("obtained reveal txn id %s", txid)

53-57: Assertions are correct but could be more informative.

The final assertions correctly validate the number of events and the memo content. However, the equality check could benefit from a more descriptive error message.

Enhance the final assertion with a descriptive error message:

require.Equal(r, memo, event.MemoBytes, "Extracted memo does not match the original inscription memo")

This change will provide more context in case of a test failure, aiding in debugging and understanding the nature of any potential issues.

contrib/localnet/bitcoin-sidecar/js/src/script.ts (1)

23-25: Clarify the data length validation and error message

The pushData method throws an error if data.length <= 80, which may exclude valid data lengths. If this restriction is intentional, consider providing a more informative error message explaining why data of length less than or equal to 80 bytes is not supported.

Apply this diff to improve the error message:

     if (data.length <= 80) {
-        throw new Error("data length should be more than 80 bytes");
+        throw new Error("Data length must exceed 80 bytes for this operation");
     }
contrib/localnet/bitcoin-sidecar/js/src/index.ts (1)

31-33: Consider adding error handling for server startup

Adding error handling for the server startup process can help catch issues such as the port being in use or insufficient permissions.

Proposed Fix:

 app.listen(PORT, () => {
     console.log(`Server is running on http://localhost:${PORT}`);
+}).on('error', (err) => {
+    console.error('Failed to start server:', err);
+});
e2e/runner/bitcoin_inscription.go (2)

70-70: Remove debug fmt.Print statement from production code.

The fmt.Print statement on line 70 appears to be for debugging purposes. Including such statements in production code can clutter output and potentially expose sensitive information.

Apply this diff to remove the debug print:

-	fmt.Print("raw commit response ", response.Address)

105-116: Simplify response decoding by using json.Decoder directly.

In GenerateRevealTxn, you read the entire response body into a byte slice before unmarshalling:

body, err := io.ReadAll(resp.Body)
if err != nil {
	return "", errors.Wrap(err, "cannot read reveal response body")
}

// Parse the JSON response
var response revealResponse
if err := json.Unmarshal(body, &response); err != nil {
	return "", errors.Wrap(err, "cannot parse reveal response body")
}

You can streamline this by decoding the JSON response directly from the response body using json.NewDecoder:

 var response revealResponse
-if err := json.Unmarshal(body, &response); err != nil {
-	return "", errors.Wrap(err, "cannot parse reveal response body")
+if err := json.NewDecoder(resp.Body).Decode(&response); err != nil {
+	return "", fmt.Errorf("cannot parse reveal response body: %w", err)
 }

This approach is more efficient and consistent with GenerateCommitAddress.

contrib/localnet/bitcoin-sidecar/js/src/client.ts (2)

121-121: Remove redundant semicolon

There's an unnecessary semicolon at the end of the statement, which can be removed to improve code clarity.

Apply this diff to remove the extra semicolon:

-this.psbt = new Psbt({ network });;
+this.psbt = new Psbt({ network });

176-176: Correct typo in comment

Fix the typo in the comment for better readability.

-// should have a way to avoid signing but just providing mocked signautre
+// Should have a way to avoid signing by providing a mocked signature
e2e/runner/bitcoin.go (1)

307-308: Address the TODO by replacing the builder with a Go function for improved maintainability

The TODO comment indicates the intent to replace the InscriptionBuilder with a native Go function to enable instructions, as referenced in issue #2759. Implementing this change will enhance maintainability and allow for more fine-grained control over the inscription creation process.

Would you like assistance in implementing this Go function, or should we open a GitHub issue to track this task?

zetaclient/chains/bitcoin/observer/inbound.go (1)

454-454: Address the TODO: Simplify GetBtcEventWithoutWitness function

The TODO comment indicates that the GetBtcEventWithoutWitness function requires simplification. Refactoring this function can enhance its readability and maintainability by reducing complexity and improving the logical flow.

Would you like assistance in refactoring this function? I can help propose a cleaner implementation or open a GitHub issue to track this task.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between f0ed61d and 0ca4c09.

📒 Files selected for processing (15)
  • changelog.md (1 hunks)
  • contrib/localnet/bitcoin-sidecar/Dockerfile (1 hunks)
  • contrib/localnet/bitcoin-sidecar/js/package.json (1 hunks)
  • contrib/localnet/bitcoin-sidecar/js/src/client.ts (1 hunks)
  • contrib/localnet/bitcoin-sidecar/js/src/index.ts (1 hunks)
  • contrib/localnet/bitcoin-sidecar/js/src/script.ts (1 hunks)
  • contrib/localnet/bitcoin-sidecar/js/src/tsconfig.json (1 hunks)
  • contrib/localnet/bitcoin-sidecar/js/src/util.ts (1 hunks)
  • contrib/localnet/docker-compose.yml (1 hunks)
  • e2e/e2etests/e2etests.go (2 hunks)
  • e2e/e2etests/test_extract_bitcoin_inscription_memo.go (1 hunks)
  • e2e/runner/bitcoin.go (3 hunks)
  • e2e/runner/bitcoin_inscription.go (1 hunks)
  • zetaclient/chains/bitcoin/observer/inbound.go (1 hunks)
  • zetaclient/chains/bitcoin/observer/inbound_test.go (16 hunks)
✅ Files skipped from review due to trivial changes (2)
  • contrib/localnet/bitcoin-sidecar/js/package.json
  • contrib/localnet/bitcoin-sidecar/js/src/tsconfig.json
🧰 Additional context used
📓 Path-based instructions (6)
e2e/e2etests/e2etests.go (1)

Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.

e2e/e2etests/test_extract_bitcoin_inscription_memo.go (1)

Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.

e2e/runner/bitcoin.go (1)

Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.

e2e/runner/bitcoin_inscription.go (1)

Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.

zetaclient/chains/bitcoin/observer/inbound.go (1)

Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.

zetaclient/chains/bitcoin/observer/inbound_test.go (1)

Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.

📓 Learnings (1)
zetaclient/chains/bitcoin/observer/inbound.go (1)
Learnt from: ws4charlie
PR: zeta-chain/node#2899
File: zetaclient/chains/bitcoin/observer/inbound.go:131-132
Timestamp: 2024-09-19T18:25:57.534Z
Learning: ObserveInbound coverage will be improved in future refactor.
🪛 Biome
contrib/localnet/bitcoin-sidecar/js/src/client.ts

[error] 17-17: Don't use 'String' as a type.

Use lowercase primitives for consistency.
Safe fix: Use 'string' instead

(lint/complexity/noBannedTypes)


[error] 18-18: Don't use 'String' as a type.

Use lowercase primitives for consistency.
Safe fix: Use 'string' instead

(lint/complexity/noBannedTypes)


[error] 21-21: Don't use 'String' as a type.

Use lowercase primitives for consistency.
Safe fix: Use 'string' instead

(lint/complexity/noBannedTypes)

🪛 GitHub Check: codecov/patch
zetaclient/chains/bitcoin/observer/inbound.go

[warning] 448-448: zetaclient/chains/bitcoin/observer/inbound.go#L448
Added line #L448 was not covered by tests

🔇 Additional comments (8)
contrib/localnet/docker-compose.yml (1)

230-241: Enhance bitcoin-node-sidecar service configuration

The bitcoin-node-sidecar service has been successfully integrated into the Docker Compose configuration. However, there are several improvements that could enhance its robustness and integration:

  1. Add a dependency on the bitcoin service to ensure proper startup order:

    depends_on:
      - bitcoin
  2. Implement a health check to facilitate orchestration:

    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
      interval: 30s
      timeout: 10s
      retries: 3
  3. The PORT environment variable is redundant as it matches the exposed port. Consider removing it unless it's explicitly required by the application.

  4. If the service requires persistent data, consider adding a named volume:

    volumes:
      - bitcoin-sidecar-data:/app/data

    Remember to define the volume at the bottom of the file:

    volumes:
      bitcoin-sidecar-data:

These enhancements will improve the service's integration, reliability, and data persistence within the local development environment.

e2e/e2etests/e2etests.go (2)

85-85: New constant added for Bitcoin inscription memo test.

The addition of TestExtractBitcoinInscriptionMemoName constant is appropriate and follows the existing naming convention for test cases.


455-461: New end-to-end test case added for extracting Bitcoin inscription memo.

The integration of the new test case TestExtractBitcoinInscriptionMemo is well-structured and consistent with the existing test definitions. It includes a descriptive name, a clear description, and appropriate default arguments.

However, to enhance maintainability and consistency, consider the following suggestions:

  1. Add a comment above the test case to briefly explain its purpose and expected behavior.
  2. Ensure that the TestExtractBitcoinInscriptionMemo function is implemented in the corresponding test file.

Consider adding a comment above the test case for better documentation:

+// TestExtractBitcoinInscriptionMemo tests the extraction of memos from Bitcoin inscriptions.
+// This test case verifies the system's ability to parse and process inscription data correctly.
 runner.NewE2ETest(
   TestExtractBitcoinInscriptionMemoName,
   "extract memo from BTC inscription",
   []runner.ArgDefinition{
     {Description: "amount in btc", DefaultValue: "0.1"},
   },
   TestExtractBitcoinInscriptionMemo,
 ),

To ensure the TestExtractBitcoinInscriptionMemo function is implemented, run the following command:

changelog.md (5)

Line range hint 19-38: LGTM: Important fixes and improvements.

This changelog for version v12.2.4 includes several critical fixes that enhance the reliability and performance of the system. Key improvements include:

  1. Additional checks for external chain height validation.
  2. Adjustments to gas price calculations for EIP1559.
  3. Changes to WhitelistERC20 authorization.
  4. Improvements to Bitcoin transaction handling and fee estimation.

These changes address important issues and should contribute to a more stable and efficient system.


Line range hint 97-219: Major version update with significant breaking changes.

Version v12.0.0 introduces substantial changes to the system architecture and functionality:

  1. Breaking Changes:

    • Relocation of TSS and chain validation queries from crosschain to observer module.
    • Unification of observer sets across all chains.
    • Merging of observer params and core params into chain params.
    • Changes to the TSS address retrieval for Bitcoin.
  2. New Features:

    • Support for Bitcoin inscriptions.
    • Addition of state variable to track aborted zeta amount.
    • New snapshots commands.
  3. Important Fixes and Refactoring:

    • Improvements to outbound transaction handling and confirmation.
    • Refactoring of CCTX scheduler and TSS-related components.
    • Updates to various queries for better performance and pagination.

Given the extent of these changes, especially the breaking changes:

  1. A comprehensive migration guide should be provided for users upgrading from previous versions. This guide should detail:

    • Changes required in API calls due to relocated and renamed queries.
    • How to adapt to the new unified observer set structure.
    • Updates needed for systems relying on the old params structure.
  2. Thorough testing is crucial, particularly for:

    • The new Bitcoin inscription support.
    • The refactored CCTX scheduler.
    • The modified TSS address retrieval process for Bitcoin.

Please run the following verification steps:

#!/bin/bash
# Verify critical components affected by breaking changes

# Test new observer module queries
go test -v ./x/observer/... -run "TestGetChainParams|TestObserverSet"

# Verify Bitcoin inscription support
go test -v ./x/btc/... -run "TestBitcoinInscription"

# Check CCTX scheduler refactoring
go test -v ./x/crosschain/... -run "TestCCTXScheduler"

# Test TSS address retrieval for Bitcoin
go test -v ./x/observer/... -run "TestGetTssAddressForBitcoin"

echo "Ensure all tests pass and cover the new functionality and breaking changes"
  1. Update all documentation, especially API references, to reflect these changes.

  2. Consider providing a temporary compatibility layer or deprecation warnings for critical changed functionalities to ease the transition for users.


Line range hint 221-253: Approved: Important security enhancements and operational improvements.

Version v11.0.0 introduces valuable features and fixes:

  1. Security Enhancements:

    • Addition of HSM (Hardware Security Module) capability for zetaclient hot key, which significantly improves key management security.
  2. Operational Improvements:

    • New thread for monitoring zeta supply across all connected chains in real-time.
    • New transaction type for updating observers, improving flexibility in managing the observer set.
  3. Important Fixes:

    • Improvements to deposit handling for paused ZRC20 tokens.
    • Enhanced outbound transaction processing for both EVM chains and Bitcoin.

These changes contribute to a more secure and robust system. However, to ensure the reliability of these new features:

Please conduct thorough testing, particularly focusing on:

  1. HSM integration:
#!/bin/bash
# Verify HSM functionality
go test -v ./zetaclient/... -run "TestHSMKeyManagement"
  1. Zeta supply monitoring:
#!/bin/bash
# Test zeta supply monitoring thread
go test -v ./zetaclient/... -run "TestZetaSupplyMonitoring"
  1. Observer update mechanism:
#!/bin/bash
# Verify observer update functionality
go test -v ./x/observer/... -run "TestUpdateObserver"

Ensure all tests pass and cover various scenarios, including edge cases.


Line range hint 255-366: Comprehensive improvements across multiple versions.

Versions v10.1.2 and earlier introduce a wide range of enhancements:

  1. Key Features:

    • External stress testing capabilities (v10.1.2)
    • Liquidity cap settings for ZRC20 (v10.1.2)
    • Bitcoin block header and merkle proof functionality (v10.1.2)
    • TSS funds migration capability (v10.1.2)
  2. Important Fixes:

    • Improvements to gas handling and stability pool
    • Enhanced chain interactions and authorization checks
    • Fixes for various issues in transaction processing and validation
  3. Refactoring and Chores:

    • Significant refactoring of core components
    • Updates to CI processes and build configurations

Given the extensive changes across these versions:

A comprehensive testing strategy is crucial. Please implement the following:

  1. Regression Testing:
#!/bin/bash
# Run all existing tests to ensure no regressions
go test ./...
  1. Stress Testing:
#!/bin/bash
# Utilize the new external stress testing capabilities
./zetacored test stress --duration=1h --transactions=1000
  1. Liquidity Cap Verification:
#!/bin/bash
# Test ZRC20 liquidity cap functionality
go test -v ./x/fungible/... -run "TestLiquidityCap"
  1. Bitcoin Functionality:
#!/bin/bash
# Verify Bitcoin block header and merkle proof
go test -v ./x/bitcoin/... -run "TestBlockHeaderAndMerkleProof"
  1. TSS Migration:
#!/bin/bash
# Test TSS funds migration process
go test -v ./x/tss/... -run "TestFundsMigration"
  1. Gas Handling:
#!/bin/bash
# Verify gas stability pool and related fixes
go test -v ./x/gas/... -run "TestGasStabilityPool"

Ensure all tests pass and cover the full range of new features and fixes. Consider running extended tests in a staging environment to catch any potential issues that might arise from the interaction of these numerous changes.


Line range hint 40-95: Significant updates and new features introduced.

Version v12.1.0 brings substantial changes to the system:

  1. New features:

    • Modified emission distribution using fixed block rewards.
    • Support for lower gas limits in voting on inbound and outbound transactions.
  2. Important fixes:

    • Addressed issues with ballot voting, chain parameter handling, and Bitcoin deposits.
    • Improved handling of system transactions and gas fee deductions.
  3. Refactoring:

    • Significant reorganization of the zetaclient into subpackages.
    • Optimization of return statements and code simplification.

Given the extent of these changes, especially the new features and major refactoring:

It's crucial to ensure comprehensive testing has been performed. Please confirm:

  1. The new emission distribution mechanism has been thoroughly tested for correctness and performance impact.
  2. The lower gas limit feature for voting has been verified to not introduce any security vulnerabilities.
  3. All refactored components, especially in the zetaclient, have been tested for regression issues.

contrib/localnet/bitcoin-sidecar/Dockerfile Outdated Show resolved Hide resolved
contrib/localnet/bitcoin-sidecar/Dockerfile Outdated Show resolved Hide resolved
e2e/runner/bitcoin.go Show resolved Hide resolved
e2e/runner/bitcoin.go Show resolved Hide resolved
zetaclient/chains/bitcoin/observer/inbound.go Show resolved Hide resolved
zetaclient/chains/bitcoin/observer/inbound.go Show resolved Hide resolved
Copy link
Contributor

@ws4charlie ws4charlie left a comment

Choose a reason for hiding this comment

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

looks good

@lumtis lumtis added this pull request to the merge queue Oct 4, 2024
Merged via the queue into develop with commit 1a32f05 Oct 4, 2024
34 of 35 checks passed
@lumtis lumtis deleted the feat/bitcoin-inscriptions branch October 4, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for passing data from Bitcoin as inscriptions
4 participants