-
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
chore(platform): make bls sig compatibility an optional feature #2440
Conversation
WalkthroughThis pull request introduces modifications to the Dockerfile and several Rust modules in the Changes
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms (19)
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: 1
🧹 Nitpick comments (8)
packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v2.rs (1)
14-19
: Consider adding Rust doc comments to clarify intent.
Though this struct adequately fixes the oversight, a docstring further explaining how it differs from V1 would improve maintainability.packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v0.rs (1)
104-104
: Conditional BLS public key field is well-structured.
This approach gracefully toggles signature support. Consider adding a doc comment explaining behavior whenbls-signatures
is disabled.packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/quorum_config_for_saving_v0.rs (1)
6-12
: Consider struct field visibility
QuorumConfigForSavingV0
fields are private. If you need to read or modify these fields externally, consider making them public or providing dedicated accessors.packages/rs-drive-abci/src/platform_types/platform_state/v0/old_structures/mod.rs (1)
Line range hint
51-67
: Graceful error handling
Theexpect(...)
call when convertingthreshold_public_key
assumes no corruption. Consider returning an error or logging a warning for robustness if unexpected data is encountered.packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v1.rs (2)
Line range hint
19-40
: Optional previous info
Wrappingprevious_quorums
in anOption
behind a feature gate is neat. Consider how modules that rely on older quorums behave if the feature is disabled.
51-61
: Data visibility
Whenbls-signatures
is off, you discard theprevious_quorums
. A log message or metric could help detect data unavailability situations.packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/mod.rs (2)
6-8
: Multiple saved-set versions
Bringing inSignatureVerificationQuorumSetForSavingV2
acknowledges ongoing versioning. Ensure you have a migration strategy across versions.
148-150
: Collapsing V2 into V0
When converting back,V2
is mapped toV0
. If there's a reason for discarding version distinctions at runtime, add documentation for clarity.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
Cargo.lock
is excluded by!**/*.lock
📒 Files selected for processing (9)
Dockerfile
(1 hunks)packages/rs-drive-abci/Cargo.toml
(2 hunks)packages/rs-drive-abci/src/platform_types/platform_state/v0/old_structures/mod.rs
(6 hunks)packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/mod.rs
(3 hunks)packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v0.rs
(4 hunks)packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v1.rs
(4 hunks)packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v2.rs
(1 hunks)packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/mod.rs
(1 hunks)packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/quorum_config_for_saving_v0.rs
(1 hunks)
🧰 Additional context used
📓 Learnings (7)
packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/mod.rs (1)
Learnt from: QuantumExplorer
PR: dashpay/platform#2257
File: packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v1.rs:17-19
Timestamp: 2024-11-20T09:56:20.579Z
Learning: In the `SignatureVerificationQuorumSetForSavingV1` struct, the use of `V0` versions for the `config` and `previous_quorums` fields (`QuorumConfigForSavingV0` and `PreviousPastQuorumsForSavingV0`) is intentional.
packages/rs-drive-abci/Cargo.toml (1)
Learnt from: shumkov
PR: dashpay/platform#2375
File: packages/rs-drive-abci/Cargo.toml:61-63
Timestamp: 2024-12-05T09:29:38.918Z
Learning: In the `drive-abci` package, avoid adding unused dependencies like `hashbrown` to `Cargo.toml`. The team relies on CI to detect dependency version issues.
packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v0.rs (2)
Learnt from: QuantumExplorer
PR: dashpay/platform#2257
File: packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v1.rs:17-19
Timestamp: 2024-11-20T09:56:20.579Z
Learning: In the `SignatureVerificationQuorumSetForSavingV1` struct, the use of `V0` versions for the `config` and `previous_quorums` fields (`QuorumConfigForSavingV0` and `PreviousPastQuorumsForSavingV0`) is intentional.
Learnt from: QuantumExplorer
PR: dashpay/platform#2257
File: packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving.rs:148-151
Timestamp: 2024-11-20T16:05:40.200Z
Learning: In `packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving.rs`, when converting public keys from `QuorumForSavingV0` to `VerificationQuorum`, it's acceptable to use `.expect()` for public key conversion, as the conversion has been verified and panics are acceptable in this context.
packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v1.rs (1)
Learnt from: QuantumExplorer
PR: dashpay/platform#2257
File: packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v1.rs:17-19
Timestamp: 2024-11-20T09:56:20.579Z
Learning: In the `SignatureVerificationQuorumSetForSavingV1` struct, the use of `V0` versions for the `config` and `previous_quorums` fields (`QuorumConfigForSavingV0` and `PreviousPastQuorumsForSavingV0`) is intentional.
packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/mod.rs (1)
Learnt from: QuantumExplorer
PR: dashpay/platform#2257
File: packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v1.rs:17-19
Timestamp: 2024-11-20T09:56:20.579Z
Learning: In the `SignatureVerificationQuorumSetForSavingV1` struct, the use of `V0` versions for the `config` and `previous_quorums` fields (`QuorumConfigForSavingV0` and `PreviousPastQuorumsForSavingV0`) is intentional.
packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/quorum_config_for_saving_v0.rs (1)
Learnt from: QuantumExplorer
PR: dashpay/platform#2257
File: packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v1.rs:17-19
Timestamp: 2024-11-20T09:56:20.579Z
Learning: In the `SignatureVerificationQuorumSetForSavingV1` struct, the use of `V0` versions for the `config` and `previous_quorums` fields (`QuorumConfigForSavingV0` and `PreviousPastQuorumsForSavingV0`) is intentional.
packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v2.rs (1)
Learnt from: QuantumExplorer
PR: dashpay/platform#2257
File: packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v1.rs:17-19
Timestamp: 2024-11-20T09:56:20.579Z
Learning: In the `SignatureVerificationQuorumSetForSavingV1` struct, the use of `V0` versions for the `config` and `previous_quorums` fields (`QuorumConfigForSavingV0` and `PreviousPastQuorumsForSavingV0`) is intentional.
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: Rust packages (drive-abci) / Unused dependencies
- GitHub Check: Rust packages (drive-abci) / Tests
- GitHub Check: Rust packages (drive-abci) / Check each feature
- GitHub Check: Rust packages (drive-abci) / Linting
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build JS packages / Build JS
🔇 Additional comments (21)
packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v2.rs (4)
10-13
: Good explanation of the versioning rationale.
The inline comment clearly states why a new version was introduced and how it addresses the old library usage. No issues found.
21-25
: Straightforward variant implementation.
ThisFrom
trait ensures the V2 variant is properly encapsulated. Looks good.
27-41
: Conversion logic from V0 to V2 is consistent.
Mapping fields into new types withmap
for optional values is clean and concise. Nice work.
43-57
: Reverse conversion preserves data seamlessly.
Using symmetricalFrom
conversions back to V0 preserves fields. No immediate concerns.packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v0.rs (4)
1-2
: Verify that referencingQuorumConfigForSavingV0
aligns with the new modules.
While the usage of V0 config in multiple versions is stated to be intentional, confirm no duplication or merge conflicts arise with future expansions.
116-116
: Use of.expect()
is consistent with known design.
Per prior learnings, this intentional panic is acceptable given verified conversions.
121-122
: Fallback to default public key for non-BLS builds.
Ensure this default is acceptable for any internal logic that expects a valid public key when signatures are actually used.
136-136
: Conversion back tobls_signatures::PublicKey
is appropriate.
Again,.expect()
usage aligns with the guaranteed convertibility.packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/mod.rs (1)
1-4
: Versioned module structure is clear.
Introducingfor_saving_v2
and reorganizing these modules helps clarify the evolution of quorum set logic. Nicely done.packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/quorum_config_for_saving_v0.rs (3)
1-5
: Use consistent serialization approach
You're mixingbincode::Encode
withdpp::platform_serialization::de::Decode
. Ensure there's no hidden mismatch or versioning conflict.
14-23
: Straightforward conversion
The field mapping betweenQuorumConfig
andQuorumConfigForSavingV0
is direct and maintains consistency.
25-34
: Field order consistency
The reverse conversion follows a consistent field order, reducing potential confusion when converting back toQuorumConfig
.packages/rs-drive-abci/src/platform_types/platform_state/v0/old_structures/mod.rs (3)
35-41
: Conditional field usage
Using#[cfg(feature = "bls-signatures")]
forthreshold_public_key
and defaulting to extra fields otherwise is a good approach for forward compatibility. Ensure that toggling this feature doesn't conflict with existing data.
Line range hint
78-98
: Optional public key
Embedding an optionalbls_signatures::PublicKey
is fine. Verify that your testing covers both with and without thebls-signatures
feature to ensure no regression.
111-112
: Fallback consistency
Whenbls-signatures
is disabled, the public key is set toNone
. Please verify there are no code paths that incorrectly assume a public key is always present.packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v1.rs (2)
1-9
: Guarded imports
The#[cfg(feature = "bls-signatures")]
gating helps keep the code clean. Validate all gating points to ensure the build remains consistent in both modes.
100-142
: Smooth version transitions
PreviousPastQuorumsForSavingV1
and itsFrom
implementations are consistent. No immediate issues spotted.packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/mod.rs (2)
125-126
: Introducing V2
AddingV2
is logical for enhanced functionality. Confirm you have end-to-end handling (serialization, deserialization, tests) for this new version.
133-133
: Jump from V0 to V2
SkippingV1
when convertingSignatureVerificationQuorumSet::V0
toSignatureVerificationQuorumSetForSaving::V2
is unusual. Double-check there's no missing conversion logic.packages/rs-drive-abci/Cargo.toml (1)
109-109
: Verify the necessity of bls-signatures in mocks feature.The
mocks
feature includesbls-signatures
, which means it will always be compiled when mocks are enabled, potentially conflicting with the goal of making BLS signatures optional.Do you need BLS signatures for all mocks, or should it be a separate mock feature? Consider splitting it into a separate
bls-mocks
feature if BLS-specific mocking is needed.Dockerfile (1)
467-467
: LGTM! Good improvement to feature flag handling.The changes correctly implement the optional feature strategy by:
- Disabling default features in both release and non-release profiles
- Explicitly enabling only required features (console,grovedbg) in non-release profile
Also applies to: 470-470
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
🧹 Nitpick comments (1)
packages/rs-dpp/Cargo.toml (1)
Line range hint
89-89
: Review the feature flag dependencies on BLS signaturesThe feature flags structure makes BLS signatures optional as intended, but several features depend on it:
message-signature-verification
core-types
random-public-keys
This means that enabling any of these features will implicitly enable BLS signatures. Consider documenting this dependency chain in the README or module documentation.
Also applies to: 90-90, 91-91, 92-92, 93-93, 94-94, 95-95, 96-96, 97-97, 98-98, 99-99, 100-100, 101-101, 102-102, 103-103, 104-104, 105-105, 106-106, 107-107, 108-108, 109-109, 110-110, 111-111, 112-112, 113-113, 114-114, 115-115, 116-116, 117-117, 118-118, 119-119, 120-120, 121-121, 122-122, 123-123, 124-124, 125-125, 126-126, 127-127, 128-128, 129-129, 130-130, 131-131, 132-132, 133-133, 134-134, 135-135, 136-136
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
Cargo.lock
is excluded by!**/*.lock
📒 Files selected for processing (6)
packages/rs-dpp/Cargo.toml
(1 hunks)packages/rs-dpp/src/util/cbor_value/canonical.rs
(1 hunks)packages/rs-drive-abci/Cargo.toml
(3 hunks)packages/rs-drive/Cargo.toml
(1 hunks)packages/rs-platform-value/Cargo.toml
(1 hunks)packages/rs-sdk/Cargo.toml
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- packages/rs-drive-abci/Cargo.toml
⏰ Context from checks skipped due to timeout of 90000ms (20)
- GitHub Check: Rust packages (wasm-dpp) / Formatting
- GitHub Check: Rust packages (wasm-dpp) / Detect immutable structure changes
- GitHub Check: Rust packages (drive-abci) / Unused dependencies
- GitHub Check: Rust packages (drive-abci) / Tests
- GitHub Check: Rust packages (drive-abci) / Linting
- GitHub Check: Rust packages (drive-abci) / Formatting
- GitHub Check: Rust packages (drive-abci) / Check each feature
- GitHub Check: Rust packages (drive) / Unused dependencies
- GitHub Check: Rust packages (drive) / Tests
- GitHub Check: Rust packages (drive) / Linting
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Rust packages (dpp) / Linting
- GitHub Check: Rust packages (dpp) / Check each feature
- GitHub Check: Rust packages (dash-sdk) / Tests
- GitHub Check: Rust packages (dash-sdk) / Check each feature
- GitHub Check: Rust packages (dash-sdk) / Linting
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build JS packages / Build JS
🔇 Additional comments (6)
packages/rs-dpp/src/util/cbor_value/canonical.rs (1)
117-117
: Double-check behavior for null values
Removing custom serializer options might alter how nulls or undefined values are handled. Please verify that this default behavior still meets the project's serialization requirements.packages/rs-platform-value/Cargo.toml (1)
12-12
: Dependency version pin looks good
Switching from a Git reference to a stable version helps ensure reproducible builds. No issues found.packages/rs-sdk/Cargo.toml (1)
27-27
: Consistent with other crates
Thank you for aligning this dependency with the unified version approach. This improves consistency across the repository.packages/rs-drive/Cargo.toml (1)
39-39
: Maintains optional usage
Continuing to keepciborium
optional offers flexibility in feature sets. This approach aligns well with the rest of the changes.packages/rs-dpp/Cargo.toml (2)
24-24
: Verify compatibility with ciborium v0.2.2The change from a Git dependency to a versioned dependency is good practice, but we should verify that v0.2.2 maintains the required functionality from the
feat-ser-null-as-undefined
branch.Run this script to check the changelog and compare implementations:
✅ Verification successful
Verified: ciborium v0.2.2 includes the null serialization feature
The versioned dependency is compatible with the feature branch implementation. The
serialize_null_as_undefined
functionality is fully implemented and extensively tested in v0.2.2, which was published on January 24, 2024.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Compare ciborium implementations and check for breaking changes # Check if the version exists and get its publish date curl -s https://crates.io/api/v1/crates/ciborium/0.2.2 | jq '.version.created_at' # Get the feature branch commit history git clone https://github.com/qrayven/ciborium /tmp/ciborium cd /tmp/ciborium git checkout feat-ser-null-as-undefined git log --oneline feat-ser-null-as-undefinedLength of output: 476
Script:
#!/bin/bash # Check implementation and changes in v0.2.2 # Get v0.2.2 release info curl -s https://api.github.com/repos/enarx/ciborium/releases/tags/v0.2.2 | jq -r '.body' # Search for null serialization in both implementations cd /tmp/ciborium # Check feature branch implementation git grep -A 5 -B 5 "null" . # Get the main branch for v0.2.2 git fetch origin git checkout v0.2.2 git grep -A 5 -B 5 "null" .Length of output: 65891
Line range hint
89-89
: Verify feature combinations for breaking changesThe feature flag combinations look good, but we should verify that making BLS signatures optional doesn't break any existing functionality when BLS features are disabled. Key areas to check:
- Default features don't include BLS signatures
- Feature combinations that previously relied on BLS signatures still work without them
Run this script to analyze feature flag dependencies:
Also applies to: 137-137, 138-138, 139-139, 140-140, 141-141, 142-142, 143-143, 144-144, 145-145, 146-146, 147-147, 148-148, 149-149, 150-150, 151-151, 152-152, 153-153, 154-154, 155-155, 156-156, 157-157, 158-158, 159-159, 160-160, 161-161, 162-162, 163-163, 164-164, 165-165, 166-166, 167-167, 168-168, 169-169, 170-170, 171-171, 172-172, 173-173, 174-174, 175-175, 176-176, 177-177, 178-178, 179-179, 180-180, 181-181, 182-182, 183-183, 184-184, 185-185, 186-186, 187-187, 188-188, 189-189, 190-190, 191-191, 192-192, 193-193, 194-194, 195-195, 196-196, 197-197, 198-198, 199-199, 200-200, 201-201, 202-202, 203-203, 204-204, 205-205, 206-206, 207-207, 208-208, 209-209, 210-210, 211-211, 212-212, 213-213, 214-214, 215-215, 216-216, 217-217, 218-218, 219-219, 220-220, 221-221, 222-222, 223-223, 224-224, 225-225, 226-226, 227-227, 228-228, 229-229, 230-230, 231-231, 232-232, 233-233, 234-234, 235-235, 236-236, 237-237, 238-238, 239-239, 240-240, 241-241, 242-242, 243-243, 244-244, 245-245, 246-246, 247-247, 248-248, 249-249, 250-250, 251-251, 252-252, 253-253, 254-254, 255-255, 256-256, 257-257, 258-258, 259-259, 260-260, 261-261, 262-262, 263-263, 264-264, 265-265, 266-266, 267-267, 268-268, 269-269, 270-270, 271-271, 272-272, 273-273, 274-274, 275-275, 276-276, 277-277, 278-278, 279-279, 280-280, 281-281, 282-282, 283-283, 284-284, 285-285, 286-286, 287-287, 288-288, 289-289, 290-290, 291-291, 292-292, 293-293, 294-294, 295-295, 296-296, 297-297, 298-298, 299-299, 300-300, 301-301, 302-302, 303-303, 304-304, 305-305, 306-306, 307-307, 308-308, 309-309, 310-310, 311-311, 312-312, 313-313, 314-314, 315-315, 316-316, 317-317, 318-318, 319-319, 320-320, 321-321, 322-322, 323-323, 324-324, 325-325, 326-326, 327-327, 328-328, 329-329, 330-330, 331-331, 332-332, 333-333, 334-334, 335-335, 336-336, 337-337, 338-338, 339-339, 340-340, 341-341, 342-342, 343-343, 344-344, 345-345, 346-346, 347-347, 348-348, 349-349, 350-350, 351-351, 352-352, 353-353, 354-354, 355-355, 356-356, 357-357, 358-358, 359-359, 360-360, 361-361, 362-362, 363-363, 364-364, 365-365, 366-366, 367-367, 368-368, 369-369, 370-370, 371-371, 372-372, 373-373, 374-374, 375-375, 376-376, 377-377, 378-378, 379-379, 380-380, 381-381, 382-382, 383-383, 384-384, 385-385, 386-386, 387-387, 388-388, 389-389, 390-390, 391-391, 392-392, 393-393, 394-394, 395-395, 396-396, 397-397, 398-398, 399-399, 400-400, 401-401, 402-402, 403-403, 404-404, 405-405, 406-406, 407-407, 408-408, 409-409, 410-410, 411-411, 412-412, 413-413, 414-414, 415-415, 416-416, 417-417, 418-418, 419-419, 420-420, 421-421, 422-422, 423-423, 424-424, 425-425, 426-426, 427-427, 428-428, 429-429, 430-430, 431-431, 432-432, 433-433, 434-434, 435-435, 436-436, 437-437, 438-438, 439-439, 440-440, 441-441, 442-442, 443-443, 444-444, 445-445, 446-446, 447-447, 448-448, 449-449, 450-450, 451-451, 452-452, 453-453, 454-454, 455-455, 456-456, 457-457, 458-458, 459-459, 460-460, 461-461, 462-462, 463-463, 464-464, 465-465, 466-466, 467-467, 468-468, 469-469, 470-470, 471-471, 472-472, 473-473, 474-474, 475-475, 476-476, 477-477, 478-478, 479-479, 480-480, 481-481, 482-482, 483-483, 484-484, 485-485, 486-486, 487-487, 488-488, 489-489, 490-490, 491-491, 492-492, 493-493, 494-494, 495-495, 496-496, 497-497, 498-498, 499-499, 500-500, 501-501, 502-502, 503-503, 504-504, 505-505, 506-506, 507-507, 508-508, 509-509, 510-510, 511-511, 512-512, 513-513, 514-514, 515-515, 516-516, 517-517, 518-518, 519-519, 520-520, 521-521, 522-522, 523-523, 524-524, 525-525, 526-526, 527-527, 528-528, 529-529, 530-530, 531-531, 532-532, 533-533, 534-534, 535-535, 536-536, 537-537, 538-538, 539-539, 540-540, 541-541, 542-542, 543-543, 544-544, 545-545, 546-546, 547-547, 548-548, 549-549, 550-550, 551-551, 552-552, 553-553, 554-554, 555-555, 556-556, 557-557, 558-558, 559-559, 560-560, 561-561, 562-562, 563-563, 564-564, 565-565, 566-566, 567-567, 568-568, 569-569, 570-570, 571-571, 572-572, 573-573, 574-574, 575-575, 576-576, 577-577, 578-578, 579-579, 580-580, 581-581, 582-582, 583-583, 584-584, 585-585, 586-586, 587-587, 588-588, 589-589, 590-590, 591-591, 592-592, 593-593, 594-594, 595-595, 596-596, 597-597, 598-598, 599-599, 600-600, 601-601, 602-602, 603-603, 604-604, 605-605, 606-606, 607-607, 608-608, 609-609, 610-610, 611-611, 612-612, 613-613, 614-614, 615-615, 616-616, 617-617, 618-618, 619-619, 620-620, 621-621, 622-622, 623-623, 624-624, 625-625, 626-626, 627-627, 628-628, 629-629, 630-630, 631-631, 632-632, 633-633, 634-634, 635-635, 636-636, 637-637, 638-638, 639-639, 640-640, 641-641, 642-642, 643-643, 644-644, 645-645, 646-646, 647-647, 648-648, 649-649, 650-650, 651-651, 652-652, 653-653, 654-654, 655-655, 656-656, 657-657, 658-658, 659-659, 660-660, 661-661, 662-662, 663-663, 664-664, 665-665, 666-666, 667-667, 668-668, 669-669, 670-670, 671-671, 672-672, 673-673, 674-674, 675-675, 676-676, 677-677, 678-678, 679-679, 680-680, 681-681, 682-682, 683-683, 684-684, 685-685, 686-686, 687-687, 688-688, 689-689, 690-690, 691-691, 692-692, 693-693, 694-694, 695-695, 696-696, 697-697, 698-698, 699-699, 700-700, 701-701, 702-702, 703-703, 704-704, 705-705, 706-706, 707-707, 708-708, 709-709, 710-710, 711-711, 712-712, 713-713, 714-714, 715-715, 716-716, 717-717, 718-718, 719-719, 720-720, 721-721, 722-722, 723-723, 724-724, 725-725, 726-726, 727-727, 728-728, 729-729, 730-730, 731-731, 732-732, 733-733, 734-734, 735-735, 736-736, 737-737, 738-738, 739-739, 740-740, 741-741, 742-742, 743-743, 744-744, 745-745, 746-746, 747-747, 748-748, 749-749, 750-750, 751-751, 752-752, 753-753, 754-754, 755-755, 756-756, 757-757, 758-758, 759-759, 760-760, 761-761, 762-762, 763-763, 764-764, 765-765, 766-766, 767-767, 768-768, 769-769, 770-770, 771-771, 772-772, 773-773, 774-774, 775-775, 776-776, 777-777, 778-778, 779-779, 780-780, 781-781, 782-782, 783-783, 784-784, 785-785, 786-786, 787-787, 788-788, 789-789, 790-790, 791-791, 792-792, 793-793, 794-794, 795-795, 796-796, 797-797, 798-798, 799-799, 800-800, 801-801, 802-802, 803-803, 804-804, 805-805, 806-806, 807-807, 808-808, 809-809, 810-810, 811-811, 812-812, 813-813, 814-814, 815-815, 816-816, 817-817, 818-818, 819-819, 820-820, 821-821, 822-822, 823-823, 824-824, 825-825, 826-826, 827-827, 828-828, 829-829, 830-830, 831-831, 832-832, 833-833, 834-834, 835-835, 836-836, 837-837, 838-838, 839-839, 840-840, 841-841, 842-842, 843-843, 844-844, 845-845, 846-846, 847-847, 848-848, 849-849, 850-850, 851-851, 852-852, 853-853, 854-854, 855-855, 856-856, 857-857, 858-858, 859-859, 860-860, 861-861, 862-862, 863-863, 864-864, 865-865, 866-866, 867-867, 868-868, 869-869, 870-870, 871-871, 872-872, 873-873, 874-874, 875-875, 876-876, 877-877, 878-878, 879-879, 880-880, 881-881, 882-882, 883-883, 884-884, 885-885, 886-886, 887-887, 888-888, 889-889, 890-890, 891-891, 892-892, 893-893, 894-894, 895-895, 896-896, 897-897, 898-898, 899-899, 900-900, 901-901, 902-902, 903-903, 904-904, 905-905, 906-906, 907-907, 908-908, 909-909, 910-910, 911-911, 912-912, 913-913, 914-914, 915-915, 916-916, 917-917, 918-918, 919-919, 920-920, 921-921, 922-922, 923-923, 924-924, 925-925, 926-926, 927-927, 928-928, 929-929, 930-930, 931-931, 932-932, 933-933, 934-934, 935-935, 936-936, 937-937, 938-938, 939-939, 940-940, 941-941, 942-942, 943-943, 944-944, 945-945, 946-946, 947-947, 948-948, 949-949, 950-950, 951-951, 952-952, 953-953, 954-954, 955-955, 956-956, 957-957, 958-958, 959-959, 960-960, 961-961, 962-962, 963-963, 964-964, 965-965, 966-966, 967-967, 968-968, 969-969, 970-970, 971-971, 972-972, 973-973, 974-974, 975-975, 976-976, 977-977, 978-978, 979-979, 980-980, 981-981, 982-982, 983-983, 984-984, 985-985, 986-986, 987-987, 988-988, 989-989, 990-990, 991-991, 992-992, 993-993, 994-994, 995-995, 996-996, 997-997, 998-998, 999-999, 1000-1000
✅ Verification successful
BLS signatures are properly optional with clean feature separation
The verification confirms that making BLS signatures optional is safe:
- BLS is not included in default features
- All BLS functionality is properly feature-gated with appropriate fallbacks
- Disabling BLS features returns clear "not supported" errors rather than breaking functionality
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Analyze feature flag dependencies and test different feature combinations # Find all files that might be affected by BLS feature flag rg -l "cfg\(feature\s*=\s*\"bls-signatures\"" # Find all files that might be using BLS-related functionality rg -l "bls|signature|verify"Length of output: 56732
Script:
#!/bin/bash # Check default features in Cargo.toml echo "=== Checking default features in Cargo.toml ===" rg -A 10 "^\[features\]" packages/rs-dpp/Cargo.toml # Look for any unconditional BLS usage (not wrapped in cfg feature) echo -e "\n=== Checking for unconditional BLS usage ===" rg "bls" -B 2 -A 2 --no-filename packages/rs-dpp/src/ | grep -v "cfg(feature" # Examine feature flag patterns echo -e "\n=== Examining BLS feature flag patterns ===" rg "#\[cfg\(feature\s*=\s*\"bls-signatures\"\)\]" -B 2 -A 2Length of output: 33457
Approved your changes @shumkov |
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Refactor
ciborium
.Chores
Checklist:
For repository code-owners and collaborators only