diff --git a/.github/actions/iota-rebase-sandbox/setup/action.yml b/.github/actions/iota-rebase-sandbox/setup/action.yml new file mode 100644 index 0000000000..ea5531fb5f --- /dev/null +++ b/.github/actions/iota-rebase-sandbox/setup/action.yml @@ -0,0 +1,48 @@ +name: "iota-private-network setup" +description: "Setup IOTA Sandbox" + +runs: + using: composite + steps: + - name: Checkout IOTA repository + uses: actions/checkout@v3 + with: + repository: "iotaledger/iota" + ref: "develop" + path: "iota" + token: ${{ secrets.GITHUB_TOKEN }} + + - name: list files + shell: bash + run: ls -la docker/iota-private-network + + - name: build docker images + shell: bash + run: | + cd docker/iota-private-network + ../iota-node/build.sh -t iota-node --no-cache + ../iota-indexer/build.sh -t iota-indexer --no-cache + ../iota-tools/build.sh -t iota-tools --no-cache + + - name: Bootstrap the network + shell: bash + run: ./bootstrap.sh + working-directory: iota/docker/iota-private-network + + - name: Start the Network + shell: bash + run: ./run.sh faucet + working-directory: iota/docker/iota-private-network + + - name: Wait for iota network to start + shell: bash + run: wget -qO- https://raw.githubusercontent.com/eficode/wait-for/$WAIT_FOR_VERSION/wait-for | sh -s -- -t 60 http://127.0.0.1:9000 -- echo "IOTA full node is up" + env: + WAIT_FOR_VERSION: 4df3f9262d84cab0039c07bf861045fbb3c20ab7 # v2.2.3 + + - name: Wait for faucet to start + shell: bash + run: wget -qO- https://raw.githubusercontent.com/eficode/wait-for/$WAIT_FOR_VERSION/wait-for | sh -s -- -t 60 http://127.0.0.1:5003 -- echo "Faucet is up" + env: + WAIT_FOR_VERSION: 4df3f9262d84cab0039c07bf861045fbb3c20ab7 # v2.2.3 + diff --git a/.github/actions/iota-rebase-sandbox/tear-down/action.yml b/.github/actions/iota-rebase-sandbox/tear-down/action.yml new file mode 100644 index 0000000000..383adf39a5 --- /dev/null +++ b/.github/actions/iota-rebase-sandbox/tear-down/action.yml @@ -0,0 +1,12 @@ +name: "iota-private-network-tear-down" +description: "tear-down a iota private network" +runs: + using: "composite" + steps: + - name: Tear down iota sandbox + shell: bash + run: | + cd iota/docker/iota-private-network + docker compose down + cd ../.. + sudo rm -rf iota diff --git a/.github/actions/iota-sandbox/setup/action.yml b/.github/actions/iota-sandbox/setup/action.yml deleted file mode 100644 index 8b32b8608d..0000000000 --- a/.github/actions/iota-sandbox/setup/action.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: 'iota-sandbox-setup' -description: 'Setup IOTA Sandbox' -runs: - using: "composite" - steps: - - name: Setup iota sandbox - shell: bash - run: | - # Use next lines for using the GitHub release - mkdir iota-sandbox - cd iota-sandbox - mkdir sandbox - cd sandbox - # Use the output of https://api.github.com/repos/iotaledger/iota-sandbox/releases/latest - DOWNLOAD_URL=$(curl "https://api.github.com/repos/iotaledger/iota-sandbox/releases" | jq -r '.[0].assets[] | select(.name | contains("iota_sandbox")) | .browser_download_url') - echo "Downloading sandbox from $DOWNLOAD_URL" - curl -L -o iota_sandbox.tar.gz $DOWNLOAD_URL - tar -xf iota_sandbox.tar.gz - - # Use the next lines to use the main branch - # git clone https://github.com/iotaledger/iota-sandbox - # cd iota-sandbox/sandbox - - # Start Tangle - sudo ./bootstrap.sh - docker compose --profile inx-faucet up -d - - name: Wait for tangle to start - shell: bash - run: wget -qO- https://raw.githubusercontent.com/eficode/wait-for/$WAIT_FOR_VERSION/wait-for | sh -s -- -t 60 http://localhost/health -- echo "Tangle is up" - env: - WAIT_FOR_VERSION: 4df3f9262d84cab0039c07bf861045fbb3c20ab7 # v2.2.3 - - name: Wait for faucet to start - shell: bash - run: wget -qO- https://raw.githubusercontent.com/eficode/wait-for/$WAIT_FOR_VERSION/wait-for | sh -s -- -t 60 http://localhost/faucet/api/info -- echo "Faucet is up" - env: - WAIT_FOR_VERSION: 4df3f9262d84cab0039c07bf861045fbb3c20ab7 # v2.2.3 diff --git a/.github/actions/iota-sandbox/tear-down/action.yml b/.github/actions/iota-sandbox/tear-down/action.yml deleted file mode 100644 index c8e6225d0b..0000000000 --- a/.github/actions/iota-sandbox/tear-down/action.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: 'iota-sandbox-tear-down' -description: 'tear-down a iota sandbox' -runs: - using: "composite" - steps: - - name: Tear down iota sandbox - shell: bash - run: | - cd iota-sandbox/sandbox - docker compose down - cd ../.. - sudo rm -rf iota-sandbox diff --git a/.github/actions/release/changelog-generator/action.yml b/.github/actions/release/changelog-generator/action.yml index 751407c73b..79a1ad4be8 100644 --- a/.github/actions/release/changelog-generator/action.yml +++ b/.github/actions/release/changelog-generator/action.yml @@ -37,12 +37,12 @@ runs: fi echo SINCE_ARG=$SINCE_ARG echo SINCE_ARG=$SINCE_ARG >> $GITHUB_ENV - + - name: Prepare Repository For Changelog Generator shell: bash run: | GITHUB_REPOSITORY_USER=$( echo $GITHUB_REPOSITORY | awk -F'/' '{print $1}') - GITHUB_REPOSITORY_PROJECT=$( echo $GITHUB_REPOSITORY | awk -F'/' '{print $2}') + GITHUB_REPOSITORY_PROJECT=$( echo $GITHUB_REPOSITORY | awk -F'/' '{print $2}') echo GITHUB_REPOSITORY_USER=$GITHUB_REPOSITORY_USER echo GITHUB_REPOSITORY_PROJECT=$GITHUB_REPOSITORY_PROJECT diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index c92432e36f..7219919347 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -5,7 +5,7 @@ on: branches: - main pull_request: - types: [ opened, synchronize, reopened, ready_for_review ] + types: [opened, synchronize, reopened, ready_for_review] branches: - main - 'epic/**' @@ -62,12 +62,12 @@ jobs: build-and-test: runs-on: ${{ matrix.os }} - needs: [ check-for-run-condition, check-for-modification ] + needs: [check-for-run-condition, check-for-modification] if: ${{ needs.check-for-run-condition.outputs.should-run == 'true' && needs.check-for-modification.outputs.core-modified == 'true' }} strategy: fail-fast: false matrix: - os: [ ubuntu-latest, macos-latest, windows-latest ] + os: [ubuntu-latest, macos-latest, windows-latest] include: - os: ubuntu-latest sccache-path: /home/runner/.cache/sccache @@ -131,7 +131,7 @@ jobs: - name: Start iota sandbox if: matrix.os == 'ubuntu-latest' - uses: './.github/actions/iota-sandbox/setup' + uses: './.github/actions/iota-rebase-sandbox/setup' - name: Run tests excluding `custom_time` feature run: cargo test --workspace --release @@ -159,7 +159,7 @@ jobs: - name: Tear down iota sandbox if: matrix.os == 'ubuntu-latest' && always() - uses: './.github/actions/iota-sandbox/tear-down' + uses: './.github/actions/iota-rebase-sandbox/tear-down' - name: Stop sccache uses: './.github/actions/rust/sccache/stop-sccache' @@ -181,7 +181,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-latest ] + os: [ubuntu-latest] include: - os: ubuntu-latest @@ -204,7 +204,7 @@ jobs: path: bindings/wasm - name: Start iota sandbox - uses: './.github/actions/iota-sandbox/setup' + uses: './.github/actions/iota-rebase-sandbox/setup' - name: Run Wasm examples run: npm run test:readme && npm run test:node @@ -212,7 +212,7 @@ jobs: - name: Tear down iota sandbox if: always() - uses: './.github/actions/iota-sandbox/tear-down' + uses: './.github/actions/iota-rebase-sandbox/tear-down' test-wasm-firefox: needs: build-wasm @@ -221,7 +221,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-latest ] + os: [ubuntu-latest] include: - os: ubuntu-latest @@ -232,7 +232,7 @@ jobs: uses: actions/setup-node@v1 with: node-version: 16.x - + - name: Install JS dependencies run: npm ci working-directory: bindings/wasm @@ -244,7 +244,7 @@ jobs: path: bindings/wasm - name: Start iota sandbox - uses: './.github/actions/iota-sandbox/setup' + uses: './.github/actions/iota-rebase-sandbox/setup' - name: Build Docker image uses: docker/build-push-action@v6.2.0 @@ -260,7 +260,7 @@ jobs: - name: Tear down iota sandbox if: always() - uses: './.github/actions/iota-sandbox/tear-down' + uses: './.github/actions/iota-rebase-sandbox/tear-down' test-wasm-chrome: needs: build-wasm @@ -269,7 +269,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-latest ] + os: [ubuntu-latest] include: - os: ubuntu-latest @@ -292,7 +292,7 @@ jobs: path: bindings/wasm - name: Start iota sandbox - uses: './.github/actions/iota-sandbox/setup' + uses: './.github/actions/iota-rebase-sandbox/setup' - name: Build Docker image uses: docker/build-push-action@v6.2.0 @@ -308,4 +308,4 @@ jobs: - name: Tear down iota sandbox if: always() - uses: './.github/actions/iota-sandbox/tear-down' + uses: './.github/actions/iota-rebase-sandbox/tear-down' diff --git a/bindings/wasm/Cargo.toml b/bindings/wasm/Cargo.toml index 8406b386b2..005f79c78e 100644 --- a/bindings/wasm/Cargo.toml +++ b/bindings/wasm/Cargo.toml @@ -17,9 +17,7 @@ crate-type = ["cdylib", "rlib"] [dependencies] async-trait = { version = "0.1", default-features = false } -bls12_381_plus = "0.8.17" console_error_panic_hook = { version = "0.1" } -futures = { version = "0.3" } identity_ecdsa_verifier = { path = "../../identity_ecdsa_verifier", default-features = false, features = ["es256", "es256k"] } identity_eddsa_verifier = { path = "../../identity_eddsa_verifier", default-features = false, features = ["ed25519"] } js-sys = { version = "0.3.61" } @@ -32,19 +30,22 @@ serde_repr = { version = "0.1", default-features = false } tokio = { version = "1.29", default-features = false, features = ["sync"] } wasm-bindgen = { version = "0.2.85", features = ["serde-serialize"] } wasm-bindgen-futures = { version = "0.4", default-features = false } -zkryptium = "0.2.2" [dependencies.identity_iota] path = "../../identity_iota" default-features = false -features = ["client", "revocation-bitmap", "resolver", "domain-linkage", "sd-jwt", "status-list-2021", "jpt-bbs-plus"] - -[dev-dependencies] -rand = "0.8.5" +features = [ + "client", + "revocation-bitmap", + "resolver", + "domain-linkage", + "sd-jwt", + "status-list-2021", + "jpt-bbs-plus", +] [target.'cfg(all(target_arch = "wasm32", not(target_os = "wasi")))'.dependencies] getrandom = { version = "0.2", default-features = false, features = ["js"] } -instant = { version = "0.1", default-features = false, features = ["wasm-bindgen"] } [profile.release] opt-level = 's' diff --git a/identity_credential/Cargo.toml b/identity_credential/Cargo.toml index 7413a9dc4f..e5cda39ff7 100644 --- a/identity_credential/Cargo.toml +++ b/identity_credential/Cargo.toml @@ -12,7 +12,6 @@ rust-version.workspace = true description = "An implementation of the Verifiable Credentials standard." [dependencies] -async-trait = { version = "0.1.64", default-features = false } bls12_381_plus = { workspace = true, optional = true } flate2 = { version = "1.0.28", default-features = false, features = ["rust_backend"], optional = true } futures = { version = "0.3", default-features = false, optional = true } diff --git a/identity_iota/README.md b/identity_iota/README.md index ef2d8cb15e..2a5287c98b 100644 --- a/identity_iota/README.md +++ b/identity_iota/README.md @@ -66,7 +66,7 @@ To try out the [examples](https://github.com/iotaledger/identity.rs/blob/HEAD/ex ## Example: Creating an Identity The following code creates and publishes a new IOTA DID Document to a locally running private network. -See the [instructions](https://github.com/iotaledger/iota-sandbox) on running your own private network for development. +See the [instructions](https://github.com/iotaledger/iota/docker/iota-private-network) on running your own private network for development. _Cargo.toml_ diff --git a/identity_storage/Cargo.toml b/identity_storage/Cargo.toml index fed168beab..8bfc4e8406 100644 --- a/identity_storage/Cargo.toml +++ b/identity_storage/Cargo.toml @@ -12,7 +12,7 @@ rust-version.workspace = true description = "Abstractions over storage for cryptographic keys used in DID Documents" [dependencies] -anyhow = "1.0.82" +anyhow = { version = "1.0.82" } async-trait = { version = "0.1.64", default-features = false } bls12_381_plus = { workspace = true, optional = true } futures = { version = "0.3.27", default-features = false, features = ["async-await"] }