Skip to content

Fix of external SDK crate override bug#312

Open
Sdoba16 wants to merge 1 commit intoBlockstreamResearch:masterfrom
Sdoba16:fix/crate-override
Open

Fix of external SDK crate override bug#312
Sdoba16 wants to merge 1 commit intoBlockstreamResearch:masterfrom
Sdoba16:fix/crate-override

Conversation

@Sdoba16
Copy link
Copy Markdown
Collaborator

@Sdoba16 Sdoba16 commented May 5, 2026

Closes #310
Previously, users could interact directly with the DependencyMap API in SimplicityHL, they could manually set the crate keyword to any path they want. This happened because the insert method allowed adding the crate alias without throwing any validation errors.

Fix
Made the insert method inside the DependencyMap struct private to external crates. Instead, implement the From<Vec> trait to handle conversions and perform all necessary validations at that stage.

Added test to detect the bug.

@Sdoba16 Sdoba16 requested review from KyrylR and LesterEvSe May 5, 2026 10:42
@Sdoba16 Sdoba16 marked this pull request as ready for review May 5, 2026 10:49
@Sdoba16 Sdoba16 requested a review from delta1 as a code owner May 5, 2026 10:49
@Sdoba16 Sdoba16 self-assigned this May 5, 2026
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.

Bug: Users can override the crate keyword as a DRP name

1 participant