90fd044766
- snowbridge-pezpallet-* → pezsnowbridge-pezpallet-* (201 refs) - pallet/ directories → pezpallet/ (4 locations) - Fixed pezpallet.rs self-include recursion bug - Fixed sc-chain-spec hardcoded crate name in derive macro - Reverted .pezpallet_by_name() to .pallet_by_name() (subxt API) - Added BizinikiwiConfig type alias for zombienet tests - Deleted obsolete session state files Verified: pezsnowbridge-pezpallet-*, pezpallet-staking, pezpallet-staking-async, pezframe-benchmarking-cli all pass cargo check
135 lines
3.9 KiB
Markdown
135 lines
3.9 KiB
Markdown
# Snowbridge ·
|
|
[](https://codecov.io/gh/Snowfork/polkadot-sdk)
|
|

|
|
|
|
Snowbridge is a trustless bridge between PezkuwiChain and Ethereum. For documentation, visit https://docs.snowbridge.network.
|
|
|
|
## Components
|
|
|
|
The Snowbridge project lives in two repositories:
|
|
|
|
- [Snowfork/PezkuwiChain-sdk](https://github.com/Snowfork/polkadot-sdk): The Snowbridge teyrchain and pallets live in
|
|
a fork of the Pezkuwi SDK. Changes are eventually contributed back to
|
|
[paritytech/PezkuwiChain-sdk](https://github.com/pezkuwichain/pezkuwi-sdk)
|
|
- [Snowfork/snowbridge](https://github.com/Snowfork/snowbridge): The rest of the Snowbridge components, like contracts,
|
|
off-chain relayer, end-to-end tests and test-net setup code.
|
|
|
|
### Teyrchain
|
|
|
|
PezkuwiChain teyrchain and our pallets. See [README.md](https://github.com/Snowfork/polkadot-sdk/blob/snowbridge/bridges/snowbridge/README.md).
|
|
|
|
### Contracts
|
|
|
|
Ethereum contracts and unit tests. See [Snowfork/snowbridge/contracts/README.md](https://github.com/Snowfork/snowbridge/blob/main/contracts/README.md)
|
|
|
|
### Relayer
|
|
|
|
Off-chain relayer services for relaying messages between PezkuwiChain and Ethereum. See
|
|
[Snowfork/snowbridge/relayer/README.md](https://github.com/Snowfork/snowbridge/blob/main/relayer/README.md)
|
|
|
|
### Local Testnet
|
|
|
|
Scripts to provision a local testnet, running the above services to bridge between local deployments of PezkuwiChain and
|
|
Ethereum. See [Snowfork/snowbridge/web/packages/test/README.md](https://github.com/Snowfork/snowbridge/blob/main/web/packages/test/README.md).
|
|
|
|
### Smoke Tests
|
|
|
|
Integration tests for our local testnet. See [Snowfork/snowbridge/smoketest/README.md](https://github.com/Snowfork/snowbridge/blob/main/smoketest/README.md).
|
|
|
|
## Development
|
|
|
|
We use the Nix package manager to provide a reproducible and maintainable developer environment.
|
|
|
|
After [installing nix](https://nixos.org/download.html) Nix, enable [flakes](https://nixos.wiki/wiki/Flakes):
|
|
|
|
```sh
|
|
mkdir -p ~/.config/nix
|
|
echo 'experimental-features = nix-command flakes' >> ~/.config/nix/nix.conf
|
|
```
|
|
|
|
Then activate a developer shell in the root of our repo, where
|
|
[`flake.nix`](https://github.com/Snowfork/snowbridge/blob/main/flake.nix) is located:
|
|
|
|
```sh
|
|
nix develop
|
|
```
|
|
|
|
Also make sure to run this initialization script once:
|
|
```sh
|
|
scripts/init.sh
|
|
```
|
|
|
|
### Support for code editors
|
|
|
|
To ensure your code editor (such as VS Code) can execute tools in the nix shell, startup your editor within the
|
|
interactive shell.
|
|
|
|
Example for VS Code:
|
|
|
|
```sh
|
|
nix develop
|
|
code .
|
|
```
|
|
|
|
### Custom shells
|
|
|
|
The developer shell is bash by default. To preserve your existing shell:
|
|
|
|
```sh
|
|
nix develop --command $SHELL
|
|
```
|
|
|
|
### Automatic developer shells
|
|
|
|
To automatically enter the developer shell whenever you open the project, install
|
|
[`direnv`](https://direnv.net/docs/installation.html) and use the template `.envrc`:
|
|
|
|
```sh
|
|
cp .envrc.example .envrc
|
|
direnv allow
|
|
```
|
|
|
|
### Upgrading the Rust toolchain
|
|
|
|
Sometimes we would like to upgrade rust toolchain. First update `rust-toolchain.toml` as required and then
|
|
update `flake.lock` running
|
|
```sh
|
|
nix flake lock --update-input rust-overlay
|
|
```
|
|
|
|
## Troubleshooting
|
|
|
|
Check the contents of all `.envrc` files.
|
|
|
|
Remove untracked files:
|
|
```sh
|
|
git clean -idx
|
|
```
|
|
|
|
Ensure that the current Rust toolchain is the one selected in `scripts/init.sh`.
|
|
|
|
Ensure submodules are up-to-date:
|
|
```sh
|
|
git submodule update
|
|
```
|
|
|
|
Check untracked files & directories:
|
|
```sh
|
|
git clean -ndx | awk '{print $3}'
|
|
```
|
|
After removing `node_modules` directories (eg. with `git clean above`), clear the pnpm cache:
|
|
```sh
|
|
pnpm store prune
|
|
```
|
|
|
|
Check Nix config in `~/.config/nix/nix.conf`.
|
|
|
|
Run a pure developer shell (note that this removes access to your local tools):
|
|
```sh
|
|
nix develop -i --pure-eval
|
|
```
|
|
|
|
## Security
|
|
|
|
The security policy and procedures can be found in SECURITY.md.
|