dfinity / ICRC-1

A fungible token standard developed by the Ledger & Tokenization working group for the IC.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue running ICRC-1 test suite with newer versions of dfx

tomijaga opened this issue · comments

I ran into an error when running the test suite with dfx version above 0.12.0 but it worked when I used the 0.11.2 version

    failed to parse secret key PEM from file /Users/dire.sol/.config/dfx/identity/icrc-ref-test/identity.pem: 
    A key was rejected by Ring: InvalidEncoding', test/runner/main.rs:56:9

I noticed the .pem file created for new identities in newer versions of dfx is different from the ones that were considered for the test suite.
The new version has this pattern:

-----BEGIN EC PRIVATE KEY-----
MCF...
-----END EC PRIVATE KEY-----

while the previous one has this:

-----BEGIN PRIVATE KEY-----
MCF...
-----END PRIVATE KEY-----

Steps to re-create

  • Update dfx to version 0.13.1
  • create a new identity:
    dfx identity new [identity-name]
    dfx identity use [identity-name]
  • Deploy the icrc-1 ref module
  • Run the test suite with the newly created identity
    cargo run --bin runner -- -u http://127.0.0.1:4943 -c $$CANISTER -s ~/.config/dfx/identity/$(dfx identity whoami)/identity.pem

Anyone with a fix or workaround, aside from downgrading?