Developer weekly update June 21, 2023
Hello devs and welcome to this week’s issue of developer weekly!
This week, we’re going to talk about some new important pieces of documentation, a new Quill release, and an awesome new example project developed by Luc Bläser from the DFINITY languages team for the Motoko workshop at KTH summer school.
Let’s get started!
Important new documentation pages
HTTP outcalls tutorials
This week, the developer documentation received some new, comprehensive tutorials on using HTTP outcalls. These tutorials include:
- HTTPS outcalls: technology overview: this page covers the overview of how the technology behind HTTP outcalls operates. In summary, when a canister makes an outgoing HTTP request using the management canister API, the request is temporarily stored in the replicated state of the subnet. Then, each replica pushes an instance of the received HTTP response from the external web server through ICP’s consensus layer. Through this, each replica on a subnet can agree on the HTTP response that’s been provided by the canister.
- How to use HTTP outcalls: Intro: this page provides a high-level overview of the API used to send HTTP outcalls.
- How to use HTTP outcalls: GET: this page includes a brand new tutorial written by Diego Prats that showcases how to make a
GET
HTTP request using a sample canister that makes a request to the Coinbase API. This tutorial provides instructions for both Motoko and Rust development workflows. - How to use HTTP outcalls: POST: this page is another brand new tutorial written by Diego Prats that explains how to make a
POST
HTTP request using a sample canister that sends a request with JSON information to a free API that is used to verify that the headers and body of the request were sent properly.
Resource limits and constraints documentation
Another new page of documentation added this week details ICP’s resource constraints and limits for things such as canister queue limit, instruction limit query calls, Wasm stable memory, and subnet capacity. Check out the full chart below:
Resource | Constraint |
---|---|
Canister queue limit | 500 messages |
Maximum ingress and cross-net inter-canister call payload | 2MB |
Maximum same-subnet inter-canister call payload (may be deprecated at some point) | 10MB |
Maximum response size | 2MB |
Instruction limit per update call/heartbeat/timer | 20B per method invocation |
Instruction limit query calls | 5B |
Instruction limit for canister install and upgrade | 200B |
Subnet capacity | 450GB |
Wasm heap size | 4GB |
Wasm stable memory | 64GB |
Wasm custom sections | 2GB per subnet; 1MB per canister; 16 sections at most (per canister) |
Wasm code section | 10MB |
Query calls execution threads | 2 per replica node |
Update calls execution threads | 4 per subnet |
You can read the full list here.
New Quill release - 0.4.2
This week, Quill version 0.4.2 was released, adding some great new features such as Ledger support! With the new Ledger support feature, the same key can be shared between the NNS UI and Quill, which previously wasn't possible. To use this new feature, the --ledger
flag can be used.
In addition to Ledger support, other new features and additions in this release include:
- Added
--subaccount
toquill public-ids
. - Added Ledger support via
--ledger
. - Added
--confirmation-text
toquill sns pay
. - Fixed
quill ckbtc update-balance
allowing the anonymous principal. - Added
disburse
,disburse-maturity
,split-neuron
, andfollow-neuron
toquill sns
. - Added option to print DFN address for Genesis investors.
- Updated to new ICRC-1 account ID format.
You can get the new release of Quill here.
Motoko workshop at KTH summer school
This past week, DFINITY’s Luc Bläser gave a presentation and workshop as part of the KTH summer school program. The workshop included a brand new Motoko example dapp that walked students through how to create a decentralized auction using a Motoko canister. The auction platform provides functionality for:
- Opening and viewing auctions.
- Bidding within a defined deadline before the auction ends.
- Authenticating using Internet Identity.
As part of the workshop, this example provides a foundation that is intended to be built upon. Devs are challenged to add additional functionality to the dapp, such as:
- Storing and retrieving the auction data in the actor, preferably using stable variables.
- Implementation of public functions for the actor.
- Associating the auction’s id for later retrieval.
- Implementing a periodic timer that can be used to terminate auctions.
You can check out the example repo here and get started workshopping with it yourself, or check out the workshop’s presentation slides here.
We'll see everyone back here next week for another update!
-DFINITY