-
Notifications
You must be signed in to change notification settings - Fork 39
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
fix(sdk): testnet chain sync failed #2236
Conversation
WalkthroughThe pull request updates the version of the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration 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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (2)
packages/bench-suite/package.json (2)
Line range hint
1-3
: Consider updating the package version.The package version remains at 1.4.0-dev.7 despite the dependency update. If the @dashevo/dashcore-lib update introduces significant changes or new features that affect this package, consider incrementing the package version accordingly.
Line range hint
7-7
: Implement or remove the empty lint script.An empty lint script has been added. This appears to be a placeholder for future implementation.
Consider either implementing the lint script or removing it if it's not needed at this time. If you plan to implement it later, you might want to add a TODO comment explaining the intended linting setup.
Example implementation:
"lint": "eslint ."
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
⛔ Files ignored due to path filters (3)
.yarn/cache/@dashevo-dashcore-lib-npm-0.21.3-8c8abba924-28e2731ac6.zip
is excluded by!**/.yarn/**
,!**/*.zip
.yarn/cache/@dashevo-dashcore-lib-npm-0.22.0-9a6dd273b9-ac9e268f6e.zip
is excluded by!**/.yarn/**
,!**/*.zip
yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
📒 Files selected for processing (10)
- .pnp.cjs (10 hunks)
- packages/bench-suite/package.json (1 hunks)
- packages/dapi/package.json (1 hunks)
- packages/dash-spv/package.json (1 hunks)
- packages/dashmate/package.json (1 hunks)
- packages/js-dapi-client/package.json (1 hunks)
- packages/js-dash-sdk/package.json (1 hunks)
- packages/platform-test-suite/package.json (1 hunks)
- packages/wallet-lib/package.json (1 hunks)
- packages/wasm-dpp/package.json (1 hunks)
🧰 Additional context used
🔇 Additional comments (23)
.pnp.cjs (10)
2554-2554
: LGTM: Version update for @dashevo/dashcore-libThe update of
@dashevo/dashcore-lib
to version0.22.0
is correct and consistent with the PR objectives.
2592-2592
: LGTM: Consistent version updateThe update of
@dashevo/dashcore-lib
to version0.22.0
is consistent with the previous changes and maintains the intended update across the file.
2637-2637
: LGTM: Consistent version update maintainedThe update of
@dashevo/dashcore-lib
to version0.22.0
continues to be consistent with the previous changes, ensuring a uniform update across the file.
2729-2729
: LGTM: Version update consistency maintainedThe update of
@dashevo/dashcore-lib
to version0.22.0
remains consistent, ensuring a comprehensive update across all relevant dependencies.
2756-2759
: LGTM: Version update with package location changeThe update of
@dashevo/dashcore-lib
to version0.22.0
is consistent with previous changes. The package location path has been correctly updated to reflect the new version:./.yarn/cache/@dashevo-dashcore-lib-npm-0.22.0-9a6dd273b9-ac9e268f6e.zip/node_modules/@dashevo/dashcore-lib/
This change ensures that the correct version of the package is referenced.
2942-2942
: LGTM: Consistent version updateThe update of
@dashevo/dashcore-lib
to version0.22.0
continues to be consistent, maintaining the uniform update across the file.
3037-3037
: LGTM: Version update consistency maintainedThe update of
@dashevo/dashcore-lib
to version0.22.0
remains consistent, ensuring a comprehensive update across all relevant dependencies.
3099-3099
: LGTM: Consistent version updateThe update of
@dashevo/dashcore-lib
to version0.22.0
continues to be consistent, maintaining the uniform update across the file.
8476-8476
: LGTM: Version update consistency maintainedThe update of
@dashevo/dashcore-lib
to version0.22.0
remains consistent, ensuring a comprehensive update across all relevant dependencies.
8555-8555
: LGTM: Consistent version update completedThe update of
@dashevo/dashcore-lib
to version0.22.0
is consistent in this final hunk, completing the comprehensive update across all relevant dependencies in the file.Overall, the changes in this file successfully update the
@dashevo/dashcore-lib
package from version0.21.3
to0.22.0
across all necessary locations. This update is in line with the PR objectives to incorporate recent transaction changes and resolve the testnet chain sync issue.packages/dash-spv/package.json (1)
17-17
: LGTM. Verify consistency across the project.The update of
@dashevo/dashcore-lib
from~0.21.3
to~0.22.0
aligns with the PR objectives to incorporate recent transaction changes and resolve the testnet chain sync issue.Please run the following script to verify that this change is consistent across all relevant package.json files in the project:
Don't forget to update the changelog if this version bump introduces any notable changes or fixes.
✅ Verification successful
Consistency Verified.
All instances of
@dashevo/dashcore-lib
have been updated to~0.22.0
across the project.Don't forget to update the changelog if this version bump introduces any notable changes or fixes.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for consistency of @dashevo/dashcore-lib version across all package.json files # Test: Search for @dashevo/dashcore-lib in all package.json files # Expect: All occurrences should use version ~0.22.0 fd package.json --exec grep -H '"@dashevo/dashcore-lib"' {}Length of output: 741
packages/bench-suite/package.json (1)
11-11
: Verify compatibility with the updated @dashevo/dashcore-lib version.The dependency on @dashevo/dashcore-lib has been updated from ~0.21.3 to ~0.22.0. This is a minor version bump which could introduce new features or changes.
Please ensure that this update is compatible with the current codebase. Run the following script to check for any breaking changes or deprecations:
✅ Verification successful
[/run_scripts]
To gather more specific information about how these changes might affect the bench-suite package, we need to search within its files for usage of the potentially affected features.
To ensure we haven't missed any indirect usage of @dashevo/dashcore-lib or related features, let's perform one more search:
Based on the analysis, I can now provide a final response:
The update to @dashevo/dashcore-lib ~0.22.0 appears to be compatible with the bench-suite package.
The bench-suite package is already using the correct method name
platform.contracts.publish
, which aligns with the breaking change mentioned in the CHANGELOG. The package doesn't seem to use any of the other features affected by the breaking changes, such as '$id' in document indices or indexed properties.However, it's recommended to:
- Thoroughly test the functionality that uses
PrivateKey
from @dashevo/dashcore-lib to ensure it still works as expected with the new version.- Verify that the
platform.contracts.create
andplatform.contracts.publish
methods in the benchmarks are functioning correctly with the updated dependencies.While the update seems safe based on the static analysis, it's crucial to run the bench-suite tests and benchmarks to catch any potential runtime issues that may have been introduced by the update.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for breaking changes or deprecations in @dashevo/dashcore-lib # Test: Search for usage of potentially affected APIs rg --type javascript -i '(deprecated|breaking|change|update).*0\.22\.0' $(fd -e js -e ts) # Test: Check if there are any CHANGELOG entries for version 0.22.0 if fd CHANGELOG; then rg -i -A 10 '## \[0\.22\.0\]' $(fd CHANGELOG) fiLength of output: 85966
Script:
#!/bin/bash # Description: Verify usage of renamed and updated APIs in the codebase # Search for the old method name that was renamed rg 'platform\.contracts\.broadcast' $(fd -e js -e ts) # Search for Identity public key properties requirements rg 'purpose' $(fd -e js -e ts) rg 'securityLevel' $(fd -e js -e ts) # Search for usage of `$id` property in document indices rg '\$id' $(fd -e js -e ts) # Search for indexed properties requiring size constraints rg 'indexedProperties' $(fd -e js -e ts)Length of output: 461680
Script:
#!/bin/bash # Search for potentially affected features in bench-suite package # Check for usage of 'platform.contracts.broadcast' method echo "Searching for 'platform.contracts.broadcast' method:" rg "platform\.contracts\.broadcast" packages/bench-suite # Check for usage of '$id' in document indices echo "Searching for '$id' in document indices:" rg "\$id.*index" packages/bench-suite # Check for indexed properties definitions echo "Searching for indexed properties definitions:" rg "indexedProperties" packages/bench-suite # Check for usage of 'purpose' and 'securityLevel' in relation to Identity public keys echo "Searching for 'purpose' and 'securityLevel' in Identity public keys:" rg "purpose.*securityLevel" packages/bench-suiteLength of output: 664
Script:
#!/bin/bash # Search for usage of @dashevo/dashcore-lib and related features in bench-suite package echo "Searching for @dashevo/dashcore-lib usage:" rg "@dashevo/dashcore-lib" packages/bench-suite echo "Searching for any 'dashcore' related imports or requires:" rg "(import|require).*dashcore" packages/bench-suite echo "Searching for any usage of 'platform.contracts':" rg "platform\.contracts" packages/bench-suiteLength of output: 1140
packages/platform-test-suite/package.json (1)
27-27
: Approved: Version update for @dashevo/dashcore-libThe update of @dashevo/dashcore-lib from ~0.21.3 to ~0.22.0 aligns with the PR objectives to incorporate recent transaction changes for proper testnet chain synchronization.
To ensure consistency across the monorepo and identify any potential issues, please run the following verification steps:
Additionally, please ensure that:
- The test suite runs successfully with this updated version.
- There are no breaking changes introduced by this update that might affect the platform-test-suite or other dependent packages.
If any inconsistencies or issues are found, please address them before merging this PR.
✅ Verification successful
Verified: @dashevo/dashcore-lib version is consistent across the monorepo
All instances of @dashevo/dashcore-lib have been successfully updated to version ~0.22.0, ensuring consistency throughout the codebase.
Please proceed by running the test suite to confirm compatibility with the new dependency version.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check for consistency of @dashevo/dashcore-lib version across the monorepo echo "Checking @dashevo/dashcore-lib version consistency:" fd package.json | xargs grep -H "@dashevo/dashcore-lib" # List all files that import or require @dashevo/dashcore-lib echo "\nFiles using @dashevo/dashcore-lib:" rg -t js -t ts "require\(['\"]@dashevo/dashcore-lib['\"]|from ['\"]@dashevo/dashcore-lib['\"]" --files-with-matchesLength of output: 11463
packages/wasm-dpp/package.json (3)
Line range hint
3-3
: Version update looks good.The package version has been incremented to
1.4.0-dev.7
, which is appropriate for a development version and follows semantic versioning principles.
Line range hint
1-91
: No unexpected changes detected.I've reviewed the entire file, and there are no other changes beyond the version update and the dependency update. This focus aligns well with the PR objectives.
46-46
: Dependency update is consistent with PR objectives.The update of
@dashevo/dashcore-lib
from~0.21.3
to~0.22.0
aligns with the PR objectives to incorporate recent transaction changes. The use of the tilde (~
) for version range is appropriate.Let's verify the usage of this updated dependency in the codebase:
✅ Verification successful
[/run_scripts]
[/run_scripts]
[/run_scripts]
Dependency update verified successfully.
The
@dashevo/dashcore-lib
has been updated from~0.21.3
to~0.22.0
and is actively used in multiple files throughout the codebase, ensuring that the update aligns with the project's objectives and integration requirements.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of @dashevo/dashcore-lib in the codebase # Test: Search for import statements of @dashevo/dashcore-lib echo "Searching for import statements of @dashevo/dashcore-lib:" rg --type typescript --type javascript 'from\s+[\'"]@dashevo/dashcore-lib[\'"]' # Test: Search for require statements of @dashevo/dashcore-lib echo "Searching for require statements of @dashevo/dashcore-lib:" rg --type typescript --type javascript 'require\([\'"]@dashevo/dashcore-lib[\'"]'Length of output: 219
Script:
#!/bin/bash # Description: Verify the usage of @dashevo/dashcore-lib in the codebase # Test: Search for import statements of @dashevo/dashcore-lib echo "Searching for import statements of @dashevo/dashcore-lib:" rg --type typescript --type javascript "from\s+[\"']@dashevo/dashcore-lib[\"']" # Test: Search for require statements of @dashevo/dashcore-lib echo "Searching for require statements of @dashevo/dashcore-lib:" rg --type typescript --type javascript "require\([\"']@dashevo/dashcore-lib[\"']\)"Length of output: 497
Script:
#!/bin/bash # Description: Verify the usage of @dashevo/dashcore-lib in the codebase # Test: Search for import statements of @dashevo/dashcore-lib echo "Searching for import statements of @dashevo/dashcore-lib:" rg --glob '*.ts' --glob '*.js' 'from\s+[\"']@dashevo/dashcore-lib[\"']' # Test: Search for require statements of @dashevo/dashcore-lib echo "Searching for require statements of @dashevo/dashcore-lib:" rg --glob '*.ts' --glob '*.js' 'require\([\"']@dashevo/dashcore-lib[\"']\)'Length of output: 623
Script:
#!/bin/bash # Description: Verify the usage of @dashevo/dashcore-lib in the codebase # Test: Search for import statements of @dashevo/dashcore-lib echo "Searching for import statements of @dashevo/dashcore-lib:" rg --glob '*.ts' --glob '*.js' "from\\s+[\"']@dashevo/dashcore-lib[\"']" # Test: Search for require statements of @dashevo/dashcore-lib echo "Searching for require statements of @dashevo/dashcore-lib:" rg --glob '*.ts' --glob '*.js' "require\\([\"']@dashevo/dashcore-lib[\"']\\)"Length of output: 19191
packages/dapi/package.json (3)
Line range hint
3-3
: Version update looks good.The package version has been incremented to
1.4.0-dev.7
, which aligns with the PR objective of fixing the testnet chain sync issue. This version follows semantic versioning and indicates it's a development release.
Line range hint
1-89
: Verify impact on the wider project.The changes in this file are minimal and focused, which is good for reducing the risk of unintended side effects. However, updating a core library like
@dashevo/dashcore-lib
might have implications beyond thispackage.json
file.To ensure this update doesn't require changes in other parts of the project, please run the following verification script:
#!/bin/bash # Description: Check for potential areas that might be affected by the dashcore-lib update # Test: Search for files that import or require @dashevo/dashcore-lib echo "Files that import or require @dashevo/dashcore-lib:" rg --type js "(?:import|require).*@dashevo/dashcore-lib" -g '!node_modules' # Test: Search for test files that might need updating echo "Test files that mention dashcore-lib:" rg --type js "dashcore-lib" -g '*test*' -g '!node_modules' # Test: Check for any documentation files that might need updating echo "Documentation files mentioning dashcore-lib:" rg "dashcore-lib" -g '*.md' -g '!node_modules' # Note: Review the output to identify any areas that might need attention # due to the dashcore-lib update.Please review the output of this script and ensure that all affected areas of the project have been appropriately updated or verified for compatibility with the new version of
@dashevo/dashcore-lib
.
38-38
: Dependency update looks good, but verify compatibility.The update of
@dashevo/dashcore-lib
from~0.21.3
to~0.22.0
aligns with the PR objective of incorporating recent transaction changes. This minor version bump may include new features or improvements that could resolve the testnet chain sync issue.To ensure this update doesn't introduce any breaking changes or compatibility issues, please run the following verification script:
✅ Verification successful
Dependency update verified and consistent across the codebase.
All occurrences of
@dashevo/dashcore-lib
have been updated to~0.22.0
, ensuring consistency and compatibility throughout the project.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for any other occurrences of @dashevo/dashcore-lib in the codebase # and verify if they've been updated consistently. # Test: Search for other occurrences of @dashevo/dashcore-lib echo "Searching for other occurrences of @dashevo/dashcore-lib:" rg --type json '"@dashevo/dashcore-lib":\s*"[^~]' -g 'package.json' # Test: Check if there are any direct imports of @dashevo/dashcore-lib # that might be affected by this update echo "Checking for direct imports of @dashevo/dashcore-lib:" rg --type js "from\s+['\"]@dashevo/dashcore-lib['\"]" -g '!node_modules' # Note: Review the output to ensure all occurrences have been updated # and that any direct imports are still compatible with the new version.Length of output: 26146
packages/wallet-lib/package.json (1)
49-49
: LGTM: Dependency version updated as intended.The update of
@dashevo/dashcore-lib
from~0.21.3
to~0.22.0
aligns with the PR objectives to incorporate recent transaction changes for proper testnet chain synchronization.To ensure consistency and check for potential breaking changes, please run the following script:
This script will help verify the consistency of the version update across the project, check for any documented breaking changes, and look for major version bumps in the changelog. Please review the results to ensure there are no unexpected changes or inconsistencies.
✅ Verification successful
: The update of
@dashevo/dashcore-lib
to~0.22.0
is consistent across all packages, and no recent breaking changes have been identified. The dependency update aligns with the project's objectives and poses no apparent issues.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the version update across the project and check for breaking changes # Test 1: Check if the version update is consistent across all package.json files echo "Checking for consistency of @dashevo/dashcore-lib version across the project:" rg --type json -g 'package.json' '"@dashevo/dashcore-lib":\s*"~0\.22\.0"' # Test 2: Look for any BREAKING CHANGE notes in recent commit messages echo "Checking for any BREAKING CHANGE notes in recent commits:" git log -n 20 --grep="BREAKING CHANGE" # Test 3: Check if there are any major version bumps in the changelog echo "Checking for major version bumps in the changelog:" rg --type md -g 'CHANGELOG.md' '## \[(\d+)\.0\.0\]' -r '$1' | sort -rn | head -n1Length of output: 10823
packages/js-dapi-client/package.json (1)
31-31
: Dependency version update looks good.The
@dashevo/dashcore-lib
dependency has been updated from~0.21.3
to~0.22.0
. This change aligns with the PR objective to update the dashcore library to incorporate recent transaction changes.To ensure this update is consistent across the project, let's verify other occurrences of this dependency:
✅ Verification successful
Dependency version update is consistent across all package.json files.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for any inconsistent versions of @dashevo/dashcore-lib across the project # Test: Search for @dashevo/dashcore-lib in all package.json files rg --type json '"@dashevo/dashcore-lib"' -g 'package.json'Length of output: 718
packages/js-dash-sdk/package.json (1)
44-44
: LGTM! Verify compatibility and check changelog.The update of
@dashevo/dashcore-lib
from~0.21.3
to~0.22.0
aligns with the PR objectives to incorporate recent transaction changes. This minor version update suggests new features or non-breaking changes have been introduced.To ensure a smooth transition:
- Verify that this update doesn't introduce any unexpected breaking changes.
- Run the test suite, particularly focusing on components that interact with dashcore-lib.
- Review the changelog of dashcore-lib v0.22.0 for any significant changes or new features that might affect your implementation.
packages/dashmate/package.json (1)
59-59
: Version update for @dashevo/dashcore-lib looks good.The update of
@dashevo/dashcore-lib
from~0.21.3
to~0.22.0
is consistent with the PR objectives to incorporate recent transaction changes for proper testnet chain synchronization. This change aligns with the described fix for the testnet chain sync issue.To ensure this update doesn't introduce any unexpected changes or conflicts, please run the following verification script:
This script will help identify any potential areas that might need attention due to this version update.
✅ Verification successful
Version update for @dashevo/dashcore-lib has been successfully verified.
All instances of
@dashevo/dashcore-lib
are updated to~0.22.0
, and no references to the old version~0.21.3
remain.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the impact of updating @dashevo/dashcore-lib # Test 1: Check if there are any other occurrences of the old version echo "Checking for any remaining occurrences of version ~0.21.3:" rg --type json '"@dashevo/dashcore-lib":\s*"~0.21.3"' # Test 2: Verify if there are any direct dependencies on @dashevo/dashcore-lib in other package.json files echo "Checking for direct dependencies on @dashevo/dashcore-lib in other package.json files:" fd package.json | xargs rg --type json '"@dashevo/dashcore-lib":' # Test 3: Look for any import statements or require calls for @dashevo/dashcore-lib echo "Checking for import statements or require calls for @dashevo/dashcore-lib:" rg --type js '(import .* from .@dashevo/dashcore-lib.|require\(.@dashevo/dashcore-lib.\))'Length of output: 18071
Issue being fixed or feature implemented
The testnet chain is not syncing due to a failure
What was done?
How Has This Been Tested?
Running test suite against testnet
Breaking Changes
None
Checklist:
For repository code-owners and collaborators only
Summary by CodeRabbit
New Features
@dashevo/dashcore-lib
package to version0.22.0
, enhancing functionality across multiple packages.Bug Fixes