Skip to content

Commit

Permalink
Merge branch 'master' into update-ledger-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jessiemongeon1 authored Dec 12, 2024
2 parents 2004660 + d9f7989 commit 66dd660
Show file tree
Hide file tree
Showing 289 changed files with 467 additions and 905 deletions.
44 changes: 44 additions & 0 deletions blog/news-and-updates/2024-12-11-update.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: Developer weekly update December 11, 2024
description: This week, we have an important Motoko security update, an upgrade to the NNS Chain Fusion signer canister, and a new package from Mops- regex.
tags: [Devs]
image: /img/blog/dev-update-blog-dec-11.jpg
---

# Developer weekly update December 11, 2024

![December 11 2024](../../static/img/blog/dev-update-blog-dec-11.jpg)

Hello developers, and welcome to this week's developer weekly update! This week, we have an important Motoko security update, an upgrade to the NNS Chain Fusion signer canister, and a new package from Mops: regex. Let's get started!

## Motoko security fix in dfx v0.24.3

A security bug in Motoko was recently discovered that, under certain circumstances, may lead to unwanted memory reads or writes. This bug only affected those using the incremental garbage collector or enhanced orthogonal persistence and was hard to trigger depending on heap constellations, garbage collection scheduling, and specific language features used at a large scale.

This bug has been fixed in Motoko v0.14.3, which is included in `dfx` v0.24.3 and newer. It is highly recommended to upgrade to the latest `dfx` version if you are using the incremental garbage collector or enhanced orthogonal persistence.

[Learn more on the dev forum](https://forum.dfinity.org/t/security-fix-in-motoko-dfx-0-24-3/38656/1).

## Upgrade NNS canister: Chain Fusion signer

The latest update to the Chain Fusion signer canister can be used to sign transactions from APIs directly from a web browser or off-chain client.

NNS proposal 134424 introduces Schnorr signatures to be added to the signer canister API, specifically adding the `schnorr_public_key()` and `schnorr_sign()` methods. The Schnorr API can also be used to sign Solana transactions.

[Read more on the dev forum](https://forum.dfinity.org/t/upgrade-nns-canister-chain-fusion-signer/38623/1).

## Mops regex package

A new Mops package has been released: regex. This package allows you to use regex patterns for objects and flags. The team behind this package has published a [tutorial video](https://www.youtube.com/watch?v=O1dOZfK6DQA).

You can install the Motoko regex package with:

```
mops add regex
```

[Learn more on the dev forum](https://forum.dfinity.org/t/motoko-regex-is-live-on-mops/37428/1).

That'll wrap up this week. Tune back in next week for more developer updates!

-DFINITY
2 changes: 1 addition & 1 deletion docs/developer-docs/ai/ai-on-chain.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import '/src/components/CenterImages/center.scss';

<MarkdownChipRow labels={["Advanced", "Tutorial", "Rust" ]} />

## Overview


ICP's unique ability to run compute at scale allows AI and neural networks to run directly onchain within a canister smart contract.

Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/ai/inference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

<MarkdownChipRow labels={["Intermediate", "Concept", "DeAI" ]} />

## Overview


Inference in the context of decentralized AI refers to using a trained model to draw conclusions about new data.
It's possible for canister smart contracts to run inference in a number of ways depending on the decentralization and performance requirements.
Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/ai/machine-learning-sample.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import '/src/components/CenterImages/center.scss';
<MarkdownChipRow labels={["Advanced", "Tutorial", "Rust" ]} />


## Overview


Machine learning is a form of artificial intelligence (AI) that observes statistical algorithms and their data to learn patterns and generalizations. By analyzing these data patterns, machine learning algorithms can execute tasks by predicting the correct result with high accuracy.

Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/ai/samples.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

<MarkdownChipRow labels={["Intermediate", "Concept", "DeAI" ]} />

## Overview


ICP's unique ability to run compute at scale allows AI and neural networks to run directly onchain within a canister smart contract. Canisters can also interact with LLMs stored off-chain through HTTPS outcalls, or stored locally on a user's device.

Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/ai/training-models.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

<MarkdownChipRow labels={["Intermediate", "Motoko", "Concept"]} />

## Overview


Training AI models on ICP provides developers with a decentralized infrastructure and simplifies the setup process. ICP’s built-in computation and storage capabilities remove the need for external hardware. With GPU support on the roadmap, ICP will soon further enhance its AI capabilities and allow developers to train complex models, including large-scale AI systems.

Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/backend/rust/access-control.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

<MarkdownChipRow labels={["Intermediate", "Rust", "Tutorial"]} />

## Overview


To demonstrate access control using a Rust backend canister, you'll explore access control in the context of NFTs. NFTs (non-fungible tokens) are unique tokens with arbitrary
metadata, usually an image of some kind, to form the digital equivalent of trading cards.
Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/backend/rust/candid.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

<MarkdownChipRow labels={["Intermediate", "Rust", "Tutorial"]} />

## Overview


Candid is an **interface description language** with the primary purpose of describing the public interface of a service. A service is usually in the form of a program deployed as a canister. Candid is language-agnostic, meaning that it allows for the inter-operation between services and frontends written in different programming languages, including Rust.

Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/backend/rust/counter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

<MarkdownChipRow labels={["Beginner", "Rust", "Tutorial"]} />

## Overview


In this guide, you are going to write a dapp that provides a few basic functions to increment a counter value. by calling functions on a deployed canister. By calling the function to increment a value multiple times, you can verify that the variable state, that is, the value of the variable between calls, persists.

Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/backend/rust/deploying.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { GlossaryTooltip } from "/src/components/Tooltip/GlossaryTooltip";

<MarkdownChipRow labels={["Beginner", "Rust", "Tutorial"]} />

## Overview


In this guide, you'll learn the steps required to write, compile, deploy, and interact with a Rust backend canister.

Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/backend/rust/generating-candid.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

<MarkdownChipRow labels={["Beginner", "Rust", "Tutorial"]} />

## Overview


In versions of the Rusk CDK `v0.11.0` and higher, the Candid export workflow has been changed.
You can call the `ic_cdk::export_candid!()` macro to enable the Candid export behavior, then use the [candid-extractor](https://github.com/dfinity/cdk-rs/tree/main/src/candid-extractor) to extract the Candid from the canister's Wasm.
Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/backend/rust/intercanister.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

<MarkdownChipRow labels={["Beginner", "Rust", "Tutorial"]} />

## Overview


Inter-canister calls can be used to update information between two or more canisters.

Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/backend/rust/message-inspect.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

<MarkdownChipRow labels={["Intermediate", "Rust", "Tutorial"]} />

## Overview


A canister can inspect an ingress message and either accept or decline the message through the canister's HTTPS interface. If the message is accepted, the canister will execute it.

Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/backend/rust/optimizing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

<MarkdownChipRow labels={["Beginner", "Rust", "Tutorial"]} />

## Overview

Compiling Rust to Wasm often increases the file size significantly. `dfx` versions `0.14.0` and newer include the `wasm-opt` package that can be used to optimize cycle consumption and binary size.

## Prerequisites
Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/backend/rust/project-organization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

<MarkdownChipRow labels={["Beginner", "Rust" ]} />

## Overview


When a new Rust project is created with the command:

Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/backend/rust/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { GlossaryTooltip } from "/src/components/Tooltip/GlossaryTooltip";

<MarkdownChipRow labels={["Beginner", "Rust", "Tutorial"]} />

## Overview


Applications for ICP start as **projects**. You can create new projects for ICP using the IC SDK. This guide focuses on how to create, build, and deploy a Rust program by using the `dfx` parent command and its subcommands.

Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/backend/rust/rust-considerations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

<MarkdownChipRow labels={["Beginner", "Rust" ]} />

## Overview


This guide describes information that developers should consider when writing Rust canisters, specifically regarding canister observability and global state.

Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/backend/rust/rust-limitations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

<MarkdownChipRow labels={["Intermediate", "Rust", "Tutorial"]} />

## Overview


WebAssembly (Wasm) is a binary code format and does not provide network access, a filesystem, or other functionalities other than pure computation. Anything function that needs to communicate outside of the Wasm module must use an IC API. This guide details limitations imposed by Wasm on canisters written in Rust.

Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/backend/rust/searching-records.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { GlossaryTooltip } from "/src/components/Tooltip/GlossaryTooltip";

<MarkdownChipRow labels={["Intermediate", "Rust", "Tutorial"]} />

## Overview

In this guide, you are going to write a dapp that provides a few basic functions to add and retrieve simple profile records that consist of a name, description, and an array of keywords.

This program supports the following functions:
Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/backend/rust/stable-structures.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

<MarkdownChipRow labels={["Intermediate", "Rust", "Tutorial"]} />

## Overview


Stable structures are designed to use stable memory as the backing store, allowing them to grow to gigabytes in size without the need for `pre_upgrade`/`post_upgrade` hooks.

Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/backend/rust/timers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { GlossaryTooltip } from "/src/components/Tooltip/GlossaryTooltip";

<MarkdownChipRow labels={["Beginner", "Rust", "Tutorial"]} />

## Overview

This guide demonstrates how to create a small dapp with a periodic task. The task is triggered automatically by the ICP network with a specified interval.

## Prerequisites
Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/backend/rust/upgrading.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

<MarkdownChipRow labels={["Beginner", "Rust", "Tutorial"]} />

## Overview


Unlike a canister reinstall that preserves the canister identifier but no state, a canister upgrade enables you to preserve the state of a deployed canister and change the code.

Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/cost-estimations-and-examples.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

<MarkdownChipRow labels={["Beginner", "Concept"]} />

## Overview


To get a rough estimate of how much your project may cost, below is a pricing calculator that can be used to estimate the cost of a dapp deployed on ICP. Costs are charged to a canister in cycles, which are fixed against the price of [XDR](/docs/current/references/glossary#xdr), where **1 trillion cycles equals 1 XDR**.
Cycles costs are calculated based on:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import '/src/components/CenterImages/center.scss';

<MarkdownChipRow labels={["Advanced", "Governance", "Tutorial"]} />

## Overview

A know neuron has a name and optionally a short description.
A known neuron can be registered in the NNS governance via a proposal, officially storing its name and description
within the NNS. This information can be used by other neurons to find known neurons and [follow](/docs/current/developer-docs/daos/nns/concepts/neurons/neuron-following) them.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import '/src/components/CenterImages/center.scss';

<MarkdownChipRow labels={["Beginner", "Governance", "Concept"]} />

## Overview

Users may not have the time or knowledge to participate in all voting decisions.
Therefore, instead of directly voting on proposals, neuron holders may choose to delegate their vote to other neurons that they trust with certain decisions.
This concept, where a neuron follows the decisions of some other neurons, is called **following** in the NNS DAO.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This page is for you if you want to learn the technical details about neuron ope

Tutorials for users who want to interact with the NNS using the [NNS dapp](https://nns.ic0.app) frontend are available in the [NNS dapp quickguide](/docs/current/developer-docs/daos/nns/using-the-nns-dapp/nns-app-quickstart).

## Overview

View the most up-to-date [`candid` definition for the NNS governance canister](https://github.com/dfinity/ic/blob/master/rs/nns/governance/canister/governance.did).
This page will explain some of the relevant definitions from this Candid file.
To keep up to date with new NNS release proposals from DFINITY, you can subscribe to [this forum thread](https://forum.dfinity.org/t/nns-updates-aggregation-thread/23551).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

<MarkdownChipRow labels={["Intermediate", "Governance", "Concept"]} />

## Overview

Stakeholders gain voting power and can earn voting rewards by staking their ICP tokens in neurons and participating in governance.

The Internet Computer is a decentralized platform whose evolution is decided by its stakeholders through voting.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import '/src/components/CenterImages/center.scss';

<MarkdownChipRow labels={["Beginner", "Governance", "Concept"]} />

## Overview

The NNS DAO is an open governance system where anyone can become a participant by [staking some ICP in a neuron](https://internetcomputer.org/docs/current/developer-docs/daos/nns/using-the-nns-dapp/nns-app-quickstart#stake-icp-utility-tokens-in-a-neuron). At least 1 ICP is required to create a neuron.

Locking tokens for a period of time is known as the neuron's dissolve delay. If a neuron has more than 6 months dissolve delay, it is eligible to participate in voting. This means that it can both submit and vote on proposals.
Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/daos/nns/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

<MarkdownChipRow labels={["Beginner", "Governance" ]} />

## Overview

<div class="text--center">
<p> </p>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import '/src/components/CenterImages/center.scss';

<MarkdownChipRow labels={["Beginner", "Governance", "Tutorial"]} />

## Overview


There are different ways to interact with the NNS DAO to participate in governance.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { GlossaryTooltip } from "/src/components/Tooltip/GlossaryTooltip";

<MarkdownChipRow labels={["Intermediate", "Governance", "Tutorial"]} />

## Overview

In addition to being the portal for interacting with the NNS DAO, the NNS dapp also provides access to the SNS DAOs, their launches, and allows users to manage canisters that they control.
This is a brief guide to some of these additional functionalities.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import '/src/components/CenterImages/center.scss';

<MarkdownChipRow labels={["Intermediate", "Governance", "Tutorial"]} />

## Overview

Once you are a bit more familiar with the NNS, you might want to use the NNS dapp to perform additional neuron operations.

For more background on neurons, including the concepts of voting rewards and what the different neuron operations do in details,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import '/src/components/CenterImages/center.scss';
<div class="text--center">
<iframe width="660" height="415" src="https://www.youtube.com/embed/6BznC9p3w8w?si=m7nc7xTGq5YUtXa3" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe> </div>

## Overview

Neuron owners may find it hard to manually vote on every proposal submitted to the NNS.
For example, they may not have the time or necessary expertise to evaluate each individual proposal.
The NNS uses a form of liquid democracy to address these challenges called **following**.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import '/src/components/CenterImages/center.scss';
<div class="text--center">
<iframe width="660" height="415" src="https://www.youtube.com/embed/zcXmarBk2L4?si=OIxq9LwY0DLzHvE1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe> </div>

## Overview


The NNS dapp focuses on providing a simple user interface where community members can interact with different on-chain governance systems deployed on the Internet Computer.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import '/src/components/CenterImages/center.scss';

<MarkdownChipRow labels={["Beginner", "Governance", "Tutorial"]} />

## Overview


Neuron visibility settings are available in order to support a [neuron index](https://dashboard.internetcomputer.org/proposal/48491) while respecting neuron holders' privacy. A neuron can be private or public. For public neurons, anyone who knows the neuron's ID can see the full neuron's details, including how they vote on proposals. [Learn more about the differences between private and public neurons](/docs/current/developer-docs/daos/nns/concepts/neurons/neuron-management#neuron-visibility).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import '/src/components/CenterImages/center.scss';
<div class="text--center">
<iframe width="660" height="415" src="https://www.youtube.com/embed/lKbYUmqF7J4?si=jIvx5rEza7BnMchE" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe> </div>

## Overview

You may have neurons controlled by a principal ID that was created using [quill](../../../../../../docs/current/developer-docs/developer-tools/cli-tools/quill-cli-reference/quill-parent). In this case, it may be inconvenient to manage your neurons through the terminal. If you know the seed phrase of this principal ID, you can use a Ledger hardware wallet to manage your neurons through the [NNS dapp](https://nns.ic0.app/).

## How to access neurons controlled by a principal ID created with quill
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import '/src/components/CenterImages/center.scss';

<MarkdownChipRow labels={["Beginner", "Governance", "Tutorial"]} />

## Overview

When you log into the NNS dapp for the first time you will not yet have any ICP tokens in your wallet.
Therefore, you first might want transfer some tokens to the NNS dapp wallet.
This also the first step required for staking a neuron with the NNS dapp.
Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/daos/sns/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

<MarkdownChipRow labels={["Advanced", "Governance" ]} />

## Overview

These pages introduce instructions needed when considering handing over control of a
dapp to a Service Nervous System (SNS) or integrating with an SNS.
If this is the first time you hear about the SNS, it is recommended to take a look at the high level [SNS](/sns)
Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/daos/sns/launching/integrating.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

<MarkdownChipRow labels={["Advanced", "Governance", "Concept"]} />

## Overview


When planning an SNS launch, one topic to consider is whether and how the SNS functionality should be integrated in the dapp.
For example, one may want to embed a frontend for the SNS swap or for the SNS governance in the dapp's UI.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

<MarkdownChipRow labels={["Advanced", "Governance", "Tutorial"]} />

## Overview


At a high level, the stages for launching an SNS in production are explained [here](../launching/launch-summary-1proposal.mdx).

Expand Down
Loading

0 comments on commit 66dd660

Please sign in to comment.