Skip to content

Commit

Permalink
Merge branch 'master' into mnl/SDK-1073/custom-canister-types
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcin Nowak-Liebiediew authored Nov 21, 2023
2 parents 0c5c0b8 + 7b6167c commit ff4870c
Show file tree
Hide file tree
Showing 47 changed files with 1,362 additions and 921 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/bitcoin-canister-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Check Bitcoin Canister Release Update

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # Runs at UTC midnight every day

jobs:
check-update:
runs-on: ubuntu-latest

steps:
- name: Checkout dfx repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Fetch Bitcoin Canister latest release tag
env:
GH_TOKEN: "${{ secrets.NIV_UPDATER_TOKEN }}"
run: |
LATEST_TAG=$(gh release view --repo dfinity/bitcoin-canister --json tagName -q .tagName)
echo "Latest tag is $LATEST_TAG"
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV
- name: Check if the latest release tag has been updated
run: |
URL_ENCODED_CURRENT_TAG=$(jq -r '.["ic-btc-canister"].version' nix/sources.json)
CURRENT_TAG=$(python -c "import sys, urllib.parse as ul; print(ul.unquote_plus(sys.argv[1]))" "$URL_ENCODED_CURRENT_TAG")
echo "Current tag is $CURRENT_TAG"
if [[ "$CURRENT_TAG" == "$LATEST_TAG" ]]; then
echo "No update is required."
exit 1
else
echo "An update is required."
fi
- name: install Nix
uses: cachix/install-nix-action@v21
with:
nix_path: nixpkgs=channel:nixos-unstable

- name: install niv (dependency manager for Nix projects)
run: nix-env -i niv -f '<nixpkgs>'

- name: install packages from nix/sources.json
run: niv update

- name: update sources
run: |
URL_ENCODED_LATEST_TAG=$(echo -n "$LATEST_TAG" | python -c 'import sys, urllib.parse; print(urllib.parse.quote(sys.stdin.read().strip(), safe=""))')
niv update ic-btc-canister -a version=$URL_ENCODED_LATEST_TAG
./scripts/write-dfx-asset-sources.sh
- name: Update dfx to use the latest Bitcoin Canister version
env:
GH_TOKEN: "${{ secrets.NIV_UPDATER_TOKEN }}"
run: |
git config user.name github-actions
git config user.email [email protected]
git checkout -b bot/update-bitcoin-canister/$LATEST_TAG
git add .
git commit -m "Update Bitcoin Canister to $LATEST_TAG"
git push --set-upstream origin bot/update-bitcoin-canister/$LATEST_TAG
PR_TITLE="chore: Update Bitcoin Canister Version to $LATEST_TAG"
PR_BODY="This PR updates the Bitcoin Canister version to the latest tag: $LATEST_TAG"
gh pr create --title "$PR_TITLE" --body "$PR_BODY" --base master --head $(git branch --show-current)
11 changes: 5 additions & 6 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ jobs:
strategy:
fail-fast: false
matrix:
backend: ["ic-ref", "replica"]
# macos-latest is currently macos-11, ubuntu-latest is currently ubuntu-20.04
# ubuntu-18.04 not supported due to:
# /home/runner/.cache/dfinity/versions/0.8.3-34-g36e39809/ic-starter:
Expand All @@ -97,17 +96,17 @@ jobs:
path: /usr/local/bin
- name: Setup dfx binary
run: chmod +x /usr/local/bin/dfx
- name: Disable query verification in ic-ref
if: ${{ matrix.backend == 'ic-ref' }}
run: |
echo DFX_DISABLE_QUERY_VERIFICATION=1 >> $GITHUB_ENV
- name: start and deploy
run: |
pwd
time dfx cache install
time dfx new smoke
cd smoke
if [ "${{ matrix.backend}}" = "ic-ref" ]; then
time dfx start --emulator --background
else
time dfx start --background
fi
time dfx start --background
time dfx deploy
time dfx canister call smoke_backend greet '("fire")'
time curl --fail http://localhost:"$(dfx info webserver-port)"/sample-asset.txt?canisterId=$(dfx canister id smoke_frontend)
Expand Down
49 changes: 46 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@

# UNRELEASED

### fix: `dfx canister delete <canister id>` removes the related entry from the canister id store

Previously, deleting a canister in the project by id rather than by name
would leave the canister id in the canister id store. This would cause
`dfx deploy` to fail.

### fix: dfx extension install can no longer create a corrupt cache directory

Running `dfx cache delete && dfx extension install nns` would previously
create a cache directory containing only an `extensions` subdirectory.
dfx only looks for the existence of a cache version subdirectory to
determine whether it has been installed. The end result was that later
commands would fail when the cache did not contain expected files.

### fix: output_env_file is now considered relative to project root

The .env file location, whether specified as `output_env_file` in dfx.json
or `--output-env-file <file>` on the commandline, is now considered relative
to the project root, rather than relative to the current working directory.

### feat: Read dfx canister install argument from a file

Enables passing large arguments that cannot be passed directly in the command line using the `--argument-file` flag. For example `dfx canister install --argument-file ./my/argument/file.txt my_canister_name`.


### feat: change `list_permitted` and `list_authorized` to an update call.

This requires the `list_authorized` and `list_permitted` methods to be called as an update and disables the ability to
Expand All @@ -24,25 +49,43 @@ Added the following subcommands:

### Motoko

Updated Motoko to [0.10.1](https://github.com/dfinity/motoko/releases/tag/0.10.1)
Updated Motoko to [0.10.2](https://github.com/dfinity/motoko/releases/tag/0.10.2)

### Frontend canister

- Module hash: 517d5117bb43236e1673627aacec3955a68072dcd95f0b0218e6155f75a4bb54
Defining a custom `etag` header no longer breaks certification.

Fixed a certification issue where under certain conditions the fallback file (`/index.html`) was served with an incomplete certificate tree, not proving sufficiently that the fallback file may be used as a replacement.

- Module hash: 1621e9ead6463304ceb3a81b10577c61c9d24f6e70b2e275a10b3a9be982dfb4
- https://github.com/dfinity/sdk/pull/3451
- https://github.com/dfinity/sdk/pull/3429
- https://github.com/dfinity/sdk/pull/3428
- https://github.com/dfinity/sdk/pull/3421

### Replica

Updated replica to elected commit 1e3f540180f15de4aae10a40257907dc47af8480.
Updated replica to elected commit d73659a2baf78302b88e29e5c2bc891cde1e3e0b.
This incorporates the following executed proposals:

- [126000](https://dashboard.internetcomputer.org/proposal/126000)
- [125592](https://dashboard.internetcomputer.org/proposal/125592)
- [125591](https://dashboard.internetcomputer.org/proposal/125591)
- [125504](https://dashboard.internetcomputer.org/proposal/125504)
- [125503](https://dashboard.internetcomputer.org/proposal/125503)
- [125343](https://dashboard.internetcomputer.org/proposal/125343)
- [125342](https://dashboard.internetcomputer.org/proposal/125342)
- [125321](https://dashboard.internetcomputer.org/proposal/125321)
- [125320](https://dashboard.internetcomputer.org/proposal/125320)
- [125002](https://dashboard.internetcomputer.org/proposal/125002)
- [125001](https://dashboard.internetcomputer.org/proposal/125001)
- [124858](https://dashboard.internetcomputer.org/proposal/124858)
- [124857](https://dashboard.internetcomputer.org/proposal/124857)

### Bitcoin canister

Updated Bitcoin canister to [release/2023-10-13](https://github.com/dfinity/bitcoin-canister/releases/tag/release%2F2023-10-13)

# 0.15.1

### feat: Added support for reserved_cycles and reserved_cycles_limit
Expand Down
Loading

0 comments on commit ff4870c

Please sign in to comment.