Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lint: add link validation plugin #3847

Merged
merged 10 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions blog/features/vetkey-primer.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Considering that blockchains are very public places where transparency has been
Note that we care most about the secret ***key derivation*** here, as that is the most sensitive part which we want to protect from one central (potentially untrusted, unauthorized, or compromised) party, and hence the **KD** in VETKD. To deal with the centralization point, we need to move into the distributed setting. Assuming there is no one trusted party, we distribute trust amongst multiple parties, and require that some *threshold* of them collaborate on shares of the master secret key to derive decryption keys.

How do parties **get shares** of the master secret key? This is done by leveraging a distributed key generation (DKG) protocol, where a threshold of honest parties (or nodes) work together to obtain a set of master key shares. Assuming no collusion between nodes, at no point does any one node hold the full private key.
Click around to learn more about [threshold cryptography]( https://en.wikipedia.org/wiki/Threshold_cryptosystem), [DKG](https://en.wikipedia.org/wiki/Distributed_key_generation) and chapter 22 in the [Boneh-Shoup book](http://toc.cryptobook.us/).
Click around to learn more about [threshold cryptography]( https://en.wikipedia.org/wiki/Threshold_cryptosystem), [DKG](https://en.wikipedia.org/wiki/Distributed_key_generation) and chapter 22 in the [Boneh-Shoup book](https://toc.cryptobook.us/).

It’s clear from above that we don't want a centralised key derivation process and this is why we need the **T** for the KD process, but what about **V** and **E**? Perhaps this is best highlighted by a scenario.

Expand Down Expand Up @@ -100,7 +100,7 @@ At a first glance, we could guess that we will need a distributed key generation
Crucially, An observation buried in [BF01] gives us the answer. Moni Naor noted that an IBE scheme can be directly converted into a signature scheme. Considering the key derivation of Boneh-Franklin IBE specifically, the resulting signature scheme happens to be BLS.

### BLS signatures
Digital signatures are used everywhere in cryptography and in the blockchain world to attest to the authenticity of a message, transaction, or other pieces of information. As they are so prevalent, it’s really worth spending time getting to know them. You can get a high level view on wikipedia ([Digital Signatures](https://en.wikipedia.org/wiki/Digital_signature) and [BLS](https://en.wikipedia.org/wiki/BLS_digital_signature)), and dive into the [Boneh-Shoup book](http://toc.cryptobook.us/) when you want more formal details.
Digital signatures are used everywhere in cryptography and in the blockchain world to attest to the authenticity of a message, transaction, or other pieces of information. As they are so prevalent, it’s really worth spending time getting to know them. You can get a high level view on wikipedia ([Digital Signatures](https://en.wikipedia.org/wiki/Digital_signature) and [BLS](https://en.wikipedia.org/wiki/BLS_digital_signature)), and dive into the [Boneh-Shoup book](https://toc.cryptobook.us/) when you want more formal details.

BLS signatures are a particular type of digital signature introduced in by Dan Boneh, Ben Lynn, and Hovav Shacham in 2001.

Expand Down Expand Up @@ -132,7 +132,7 @@ This page contains a high level view and description of VETKD and its building b
It also shows one possible way of building VETKD, there are others, some with fancy features, that are described more in the paper. There are many use cases and motivations for building VETKD, these are discussed in [the video](https://youtu.be/baM6jHnmMq8) and can be written up if you like. There are also extensions that could be built depending on what is needed in the community. Finally, note that this page is hosted onchain.

## References
* [BS23](http://toc.cryptobook.us/) - The Boneh-Shoup Book.
* [BS23](https://toc.cryptobook.us/) - The Boneh-Shoup Book.
* [BF01](https://crypto.stanford.edu/~dabo/papers/bfibe.pdf) - The IBE paper.
* [BLS01](https://www.iacr.org/archive/asiacrypt2001/22480516.pdf) - The BLS paper.
* [DH76](https://ee.stanford.edu/~hellman/publications/24.pdf) - Diffie and Hellman's New Directions paper.
Expand Down
2 changes: 1 addition & 1 deletion blog/news-and-updates/2023-12-06-update.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Hello developers and welcome back to developer weekly! This week, we have some v

On Friday, December 1st, the NNS proposals to enable ckETH on ICP went live. We're excited to announce that all proposals were passed by the NNS, and ckETH is now live on the mainnet!

ckETH has been added to the ICP dashboard, which you can view [here](http://dashboard.internetcomputer.org/ethereum). You can learn how to interact with ckETH by reviewing the ckETH minter documentation [here](https://github.com/dfinity/ic/blob/master/rs/ethereum/cketh/minter/README.adoc).
ckETH has been added to the ICP dashboard, which you can view [here](https://dashboard.internetcomputer.org/ethereum). You can learn how to interact with ckETH by reviewing the ckETH minter documentation [here](https://github.com/dfinity/ic/blob/master/rs/ethereum/cketh/minter/README.adoc).

ckETH support is also live in the ICRC-1 wallet, which includes ckETH has a pre-defined token. The index canister has been integrated, allowing you to mint directly to your principal. The ICRC-1 wallet canister can be found [here](https://e4hv6-7yaaa-aaaao-a2ida-cai.icp0.io/)

Expand Down
2 changes: 1 addition & 1 deletion blog/news-and-updates/team-spotlight-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Hey devs and welcome to this edition of ICP team spotlight! In this issue, we sa

**The SDK team is pretty involved with the dev community on the forum and Discord server, which I'm sure has lead to features derived as a result of community feedback. What are some of the improvements made as a direct result of developer feedback?**

*Lots! We built the [developer feedback board](http://dx.internetcomputer.org) a while back, and every two weeks, our internal focus group meets to go over the latest items and check-in on the progress we’ve made addressing others. One thing that's come as a result of the feedback received is the `dfx` version manager. Developers expressed that they want a way to switch `dfx` versions easily. We spent some time working out how best to accomplish that, and the `dfx` version manager was born. Another example is the Cycles Ledger - we heard feedback that the Cycles Wallet was a pain to use and developers wanted a better solution. We are continuously looking for ways to improve our tooling, so keep the feedback coming!*
*Lots! We built the [developer feedback board](https://dx.internetcomputer.org) a while back, and every two weeks, our internal focus group meets to go over the latest items and check-in on the progress we’ve made addressing others. One thing that's come as a result of the feedback received is the `dfx` version manager. Developers expressed that they want a way to switch `dfx` versions easily. We spent some time working out how best to accomplish that, and the `dfx` version manager was born. Another example is the Cycles Ledger - we heard feedback that the Cycles Wallet was a pain to use and developers wanted a better solution. We are continuously looking for ways to improve our tooling, so keep the feedback coming!*

**Where should developers look for the latest SDK updates?**

Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/defi/dex/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Some examples of DEXs running on ICP include:

## Interacting with a DEX

To use a decentralized exchange (DEX) on ICP, you can interact with the web application for the exchange, use [tooling such as an SDK or API](#tooling) for more technical interactions, or create your own decentralized exchange application. DEXs are used to interact with the token mechanics of [ICP](docs/current/developer-docs/defi/tokens/token-standards#icp-tokens), the native token of the Internet Computer, and [ICRC-1](/docs/current/developer-docs/defi/tokens/token-standards#icrc-1) compliant tokens.
To use a decentralized exchange (DEX) on ICP, you can interact with the web application for the exchange, use [tooling such as an SDK or API](#tooling) for more technical interactions, or create your own decentralized exchange application. DEXs are used to interact with the token mechanics of [ICP](/docs/current/developer-docs/defi/tokens/token-standards#icp-tokens), the native token of the Internet Computer, and [ICRC-1](/docs/current/developer-docs/defi/tokens/token-standards#icrc-1) compliant tokens.

### Tooling

Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/defi/wallets/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ On ICP, both developers and end users will use different types of wallets for di
| Type of wallet | Activities | Examples |
|----------------|------------|----------|
|[Asset wallet](overview.mdx) | Hold, transfer, and receive assets such as fungible tokens including ICP and other ICRC1/ICRC2 tokens (ex. ckBTC, ckETH) and non-fungible tokens. View token holdings. Stake ICP and create a neuron to participate in the NNS. User based authentication. | Plug, Stoic, Oisy. [View the full list](#third-party-custody). |
| [Canister-controlled wallet](/docs/current/developer-docs/smart-contracts/overview/introduction) | Using [Chain Fusion](/docs/current/developer-docs/multi-chain/overview), canisters on ICP can hold, sign, and transact with assets on various chains including ICP, Bitcoin, Ethereum, EVMs, and more. | [Cycles wallet](/docs/current/developer-docs/defi/cycles/cycles-wallet) (will be depreciated from dfx). Holds cycles needed to deploy, upgrade, and perform other operations on canisters. The cycles wallet is still supported, but has been replaced by the [cycles ledger](docs/current/developer-docs/defi/cycles/cycles-ledger). It is recommended to use the cycles ledger instead. |
| [Canister-controlled wallet](/docs/current/developer-docs/smart-contracts/overview/introduction) | Using [Chain Fusion](/docs/current/developer-docs/multi-chain/overview), canisters on ICP can hold, sign, and transact with assets on various chains including ICP, Bitcoin, Ethereum, EVMs, and more. | [Cycles wallet](/docs/current/developer-docs/defi/cycles/cycles-wallet) (will be depreciated from dfx). Holds cycles needed to deploy, upgrade, and perform other operations on canisters. The cycles wallet is still supported, but has been replaced by the [cycles ledger](/docs/current/developer-docs/defi/cycles/cycles-ledger). It is recommended to use the cycles ledger instead. |

### Other authentication methods

Expand Down
2 changes: 1 addition & 1 deletion docs/developer-docs/gas-cost.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ Getting cycles back from a canister
- To withdraw cycles from a canister, the [canister must be deleted](/docs/current/tutorials/developer-journey/level-1/1.6-managing-canisters#getting-cycles-back-from-a-canister).

Topping up canisters
- [Top up your canisters](docs/current/developer-docs/smart-contracts/topping-up/topping-up-canister).
- [Top up your canisters](/docs/current/developer-docs/smart-contracts/topping-up/topping-up-canister).
- [Cycles management services](/docs/current/developer-docs/smart-contracts/topping-up/cycles_management_services).
- [Cycle.express](https://cycle.express/).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Canister smart contracts on ICP have special properties that allow developers to

To learn more about full canister smart contract functionality, refer to the [smart contracts documentation](/docs/current/developer-docs/smart-contracts/overview/introduction).

Specifically, through protocol-level integration of ICP with the [Bitcoin network](docs/current/developer-docs/multi-chain/bitcoin/overview), ICP smart contracts can interact with the Bitcoin network directly. Canister smart contracts can run [queries against the full Bitcoin UTXO](/docs/current/developer-docs/multi-chain/bitcoin/using-btc/read-state) set, including finding the balance of any Bitcoin address. They can [hold](/docs/current/developer-docs/multi-chain/bitcoin/using-btc/generate-addresses), [sign](/docs/current/developer-docs/multi-chain/bitcoin/using-btc/sign-transactions), and [submit transactions](/docs/current/developer-docs/multi-chain/bitcoin/using-btc/submit-transactions) to the Bitcoin network.
Specifically, through protocol-level integration of ICP with the [Bitcoin network](/docs/current/developer-docs/multi-chain/bitcoin/overview), ICP smart contracts can interact with the Bitcoin network directly. Canister smart contracts can run [queries against the full Bitcoin UTXO](/docs/current/developer-docs/multi-chain/bitcoin/using-btc/read-state) set, including finding the balance of any Bitcoin address. They can [hold](/docs/current/developer-docs/multi-chain/bitcoin/using-btc/generate-addresses), [sign](/docs/current/developer-docs/multi-chain/bitcoin/using-btc/sign-transactions), and [submit transactions](/docs/current/developer-docs/multi-chain/bitcoin/using-btc/submit-transactions) to the Bitcoin network.

The [Threshold Schnorr integration](/docs/current/developer-docs/smart-contracts/signatures/t-schnorr) allows developers to interact with Runes and Ordinals directly in canisters. A [Schnorr canister example](https://github.com/dfinity/examples/tree/master/motoko/t-schnorr) is available in Motoko and Rust.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ To address issues around message ordering that can lead to bugs, one usually emp

The locks would usually be released in the callback. That bears the risk that the lock may never be released in case the callback traps, as we discussed in [securely handle traps in callbacks](#securely-handle-traps-in-callbacks). The code examples below shows how one can securely implement a lock per caller.
- In Rust, one can use the drop pattern where each caller lock (`CallerGuard` struct) implementats the `Drop` trait to release the lock. From Rust CDK version `0.5.1`, any local variables still go out of scope if the callback traps, so the lock on the caller is released even in that case. Technically, the CDK calls into the `ic0.call_on_cleanup` API to release these resources. Recall that `ic0.call_on_cleanup` is executed if the `reply` or the `reject` callback executed and trapped.
- In Motoko, one can use the [`try`/`finally`](docs/current/motoko/main/reference/language-manual/#try) control flow construct. This construct guarantees that the lock is released in the `finally` block regardless of any errors or traps in the `try` or `catch` blocks.
- In Motoko, one can use the [`try`/`finally`](/docs/current/motoko/main/reference/language-manual/#try) control flow construct. This construct guarantees that the lock is released in the `finally` block regardless of any errors or traps in the `try` or `catch` blocks.

<AdornedTabs groupId="language">
<TabItem value="rust" label="Rust" default>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ This guide outlines essential development best practices for building on the Int

Ensure all canisters have sufficient cycles to sustain operations for several years initially. Given the cost-effectiveness of storage and computation on ICP compared to other platforms, this upfront investment is usually modest.

Refer to [topping up cycles page](docs/current/developer-docs/smart-contracts/topping-up/topping-up-canister) to learn how to top-up cycles effectively.
Refer to [topping up cycles page](/docs/current/developer-docs/smart-contracts/topping-up/topping-up-canister) to learn how to top-up cycles effectively.

Refer to the [cycles estimate](/docs/current/developer-docs/gas-cost) page to estimate cycle usage.

### Recommendation: Manage cycle depletion.

ICP features a mechanism to prevent canisters from running out of cycles. Canisters have a configurable `freezing_threshold`, dynamically evaluated in cycles. Set `freezing_threshold` conservatively, ensuring at least 90 to 180 days' worth of cycles for proactive management.

Refer to [this resource](docs/current/developer-docs/smart-contracts/topping-up/topping-up-canister#managing-cycle-depletion-with-freezing-threshold) to learn how to configure the `freezing_threshold` of a canister.
Refer to [this resource](/docs/current/developer-docs/smart-contracts/topping-up/topping-up-canister#managing-cycle-depletion-with-freezing-threshold) to learn how to configure the `freezing_threshold` of a canister.

To make sure you won’t get surprised by a high cycle burn rate or hitting an instruction limit, you can use the recently added [performance counter API](https://internetcomputer.org/blog/features/async-performance-counter) to profile your canisters even before going live.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ However, build tools aren’t perfect, and may fail to ensure reproducible build

ICP does not allow you to access the Wasm module of an arbitrary canister. This is a design decision, as developers might want to keep some code private. However, ICP does allow anyone to access the SHA-256 of the Wasm module.

To obtain this hash, you must first note the principal of the canister whose code you want to check. For example, to check the code of the Internet Identity canister, the principal is `rdmx6-jaaaa-aaaaa-aaadq-cai`. Then, the easiest way to access this data is using [`dfx`](docs/current/developer-docs/getting-started/install) from a command line using the following command:
To obtain this hash, you must first note the principal of the canister whose code you want to check. For example, to check the code of the Internet Identity canister, the principal is `rdmx6-jaaaa-aaaaa-aaadq-cai`. Then, the easiest way to access this data is using [`dfx`](/docs/current/developer-docs/getting-started/install) from a command line using the following command:

```bash
dfx canister --network ic info rdmx6-jaaaa-aaaaa-aaadq-cai
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ On subnets with higher loads, your application may experience elevated latencies

### Recommendation: Consider moving the canister to another subnet.

If your canister is running on a subnet that has a consistently high load and thus elevated latency, consider adding a [compute allocation](docs/current/developer-docs/gas-cost#execution-and-compute-allocation) setting. A compute allocation of 1% will guarantee your canister is scheduled for execution once every 100 rounds.
If your canister is running on a subnet that has a consistently high load and thus elevated latency, consider adding a [compute allocation](/docs/current/developer-docs/gas-cost#execution-and-compute-allocation) setting. A compute allocation of 1% will guarantee your canister is scheduled for execution once every 100 rounds.

## Troubleshooting best practices

Expand Down
6 changes: 3 additions & 3 deletions docs/developer-docs/web-apps/custom-domains/dns-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ The resulting configuration should look similar to the following screenshot:

![DNS Configuration for `example.ic-domain.live` on Namecheap](namecheap-subdomain.png)

Now, you are all set to register your custom domain with the boundary nodes, and you can continue with step 2 of the [general custom domains instructions](using-custom-domains#custom-domains-on-the-boundary-nodes).
Now, you are all set to register your custom domain with the boundary nodes, and you can continue with step 2 of the [general custom domains instructions](/docs/developer-docs/web-apps/custom-domains/using-custom-domains#custom-domains-on-the-boundary-nodes).

## GoDaddy

Expand Down Expand Up @@ -171,7 +171,7 @@ The resulting configuration should look similar to the following screenshot:

![DNS Configuration for `example.ic-domain.live` on GoDaddy](godaddy-subdomain.png)

Now, you are all set to register your custom domain with the boundary nodes, and you can continue with step 2 of the [general custom domains instructions](using-custom-domains#custom-domains-on-the-boundary-nodes).
Now, you are all set to register your custom domain with the boundary nodes, and you can continue with step 2 of the [general custom domains instructions](/docs/developer-docs/web-apps/custom-domains/using-custom-domains#custom-domains-on-the-boundary-nodes).

## Amazon Route 53

Expand Down Expand Up @@ -201,4 +201,4 @@ The resulting configuration should look similar to the following screenshot:

![DNS Configuration for `example.ic-domain.live` on Amazon Route 53](route53-subdomain.png)

Now, you are all set to register your custom domain with the boundary nodes, and you can continue with step 2 of the [general custom domains instructions](using-custom-domains#custom-domains-on-the-boundary-nodes).
Now, you are all set to register your custom domain with the boundary nodes, and you can continue with step 2 of the [general custom domains instructions](/docs/developer-docs/web-apps/custom-domains/using-custom-domains#custom-domains-on-the-boundary-nodes).
Loading
Loading