clarinet icon indicating copy to clipboard operation
clarinet copied to clipboard

Deployment plan flip-flopping

Open obycode opened this issue 5 months ago • 1 comments
trafficstars

Describe the bug The epoch for a requirement contract in a project is flip-flopping between 2.0 and 2.1. When I run clarinet check, it sets the epoch to 2.0. When I run npm test, it sets the epoch to 2.1.

To Reproduce Steps to reproduce the behavior:

  1. Create a new project: clarinet new foo && cd foo
  2. Add a contract: `clarinet contract new foo
  3. Add the SIP-010 contract as a requirement: clarinet requirements add SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-010-trait-ft-standard
  4. Check the contract: clarinet check
  5. View the deployment plan: cat deployments/default.simnet-plan.yaml
...
    - id: 0
      transactions:
        - emulated-contract-publish:
            contract-name: sip-010-trait-ft-standard
            emulated-sender: SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE
            path: "./.cache/requirements/SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-010-trait-ft-standard.clar"
            clarity-version: 1
      epoch: "2.0"
...
  1. Run the tests: npm install && npm test
  2. View the deployment plan: cat deployments/default.simnet-plan.yaml
...
    - id: 0
      transactions:
        - emulated-contract-publish:
            contract-name: sip-010-trait-ft-standard
            emulated-sender: SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE
            path: "./.cache/requirements/SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-010-trait-ft-standard.clar"
            clarity-version: 1
      epoch: "2.1"
...

Expected behavior The deployment plan should not change. 2.0 seems to be the correct epoch in this case.

obycode avatar May 31 '25 19:05 obycode