Skip to content

compact-lint: same-named contracts share one artifact directory #229

Open

Description

@0xisk

📝 Details

compact-lint fill-constraints names a contract's artifact directory after the file stem alone, and reading a measurement back does not compare the recorded source. Two self-compiled files with one name in different directories both write <artifacts>/<Stem>/circuit-info.json, so the last compile wins. A later fill-constraints --no-compile then writes that contract's values into both files and exits 0.

Latent: no two contracts in compact-contracts share a file name today.

Direction: key the directory by the normalized source path, or reject two sources that map to one directory, and check the recorded source before applying a measurement.

🔢 Code to reproduce bug

With constraints.self = ["**/*.compact"], add a/Vault.compact and b/Vault.compact holding different circuits. Run compact-lint fill-constraints, then compact-lint fill-constraints --no-compile.

From #189.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions