Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
27 changes: 16 additions & 11 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ jobs:
with:
path: |
./contracts/out
./contracts/bindings
./contracts/cache
./crates/contract-bindings
## TODO maybe add the rust version and solc version to the key
key: v2-contracts-abi-${{ hashFiles('./contracts/**/*.sol') }}

- name: Generate ABI and bindings
- name: Generate ABI and contract-bindings
run: cd contracts && make gen

- name: Install Rust nightly
Expand All @@ -66,6 +66,7 @@ jobs:
components: rustfmt,clippy

- name: Print Rust toolchain default versions
working-directory: crates
run: |
echo "rustup show:"
rustup show
Expand All @@ -77,47 +78,51 @@ jobs:
ldd --version

- name: Check fmt (nightly)
working-directory: crates
run: cargo +nightly-2024-07-05 fmt --check --all

- name: Check clippy
working-directory: crates
run: cargo clippy --release --tests --no-deps -- -D clippy::all

- name: Build all (including tests, benches, examples)
working-directory: crates
run: |
cd fendermint && make $PWD/builtin-actors/output/bundle.car
cd client && make $PWD/builtin-actors/output/bundle.car
cargo build --locked --release --all-targets

- name: Build Docker image for e2e tests
working-directory: crates
run: |
## Create the temporary Dockerfile.
cat <<EOF > /tmp/Dockerfile
# syntax=docker/dockerfile:1
FROM alpine as builder
COPY /fendermint/app/config /app/fendermint/app/config
COPY /client/app/config /app/fendermint/app/config
COPY /target/release/fendermint /app/output/bin/fendermint
COPY /target/release/ipc-cli /app/output/bin/ipc-cli
EOF

## Append the runner build phase to the Dockerfile.
cat fendermint/docker/runner.Dockerfile >> /tmp/Dockerfile
cat client/docker/runner.Dockerfile >> /tmp/Dockerfile

## Print the Dockerfile for debugging.
echo "Dockerfile:"
cat /tmp/Dockerfile

## Create the temporary .dockerignore file.
cat <<EOF > /tmp/Dockerfile.dockerignore
target
!target/release/fendermint
!target/release/
!target/release/ipc-cli
contracts/cache
contracts/node-modules
EOF

## Print the .dockerignore file for debugging.
echo "Dockerfile.dockerignore:"
cat /tmp/Dockerfile.dockerignore

## Build the Docker image.
DOCKER_BUILDKIT=1 docker build \
--load \
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/commonmark-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "Contracts: Smoke test deployment"

# This workflow is triggered from the main CI workflow.
on:
workflow_call:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Check out the project
uses: actions/checkout@v4

- name: Lint all commonmark/markdown files
uses: DavidAnson/markdownlint-cli2-action@v19
continue-on-error: true
with:
fix: true
globs: '(scripts|crates)/**/README.md;contracts/**/*.md;specs/**/*.md;docs*/**/*.md'
separator: ';'

- name: Check compliance
run: |
git diff --exit-code
2 changes: 1 addition & 1 deletion .github/workflows/contracts-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
with:
path: |
./contracts/out
./contracts/bindings
./contracts/cache
./crates/contract-bindings
key: v2-contracts-abi-${{ hashFiles('./contracts/**/*.sol') }}

- name: Run tests
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docker-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
env:
CARGO_INCREMENTAL: '0'
SCCACHE_CACHE_SIZE: 10G
# TODO use RUSTC_WRAPPER=sccache and double check if the ones below are still required
CC: "sccache clang"
CXX: "sccache clang++"
PROFILE: "ci"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-pr.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Lint PR"
name: "Lint PR title"

on:
pull_request:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ jobs:
with:
path: |
./contracts/out
./contracts/bindings
./contracts/cache
./crates/contract-bindings
key: v2-contracts-abi-${{ hashFiles('./contracts/**/*.sol') }}

- uses: Swatinem/rust-cache@v2
with:
shared-key: build

- name: Run e2e tests
working-directory: crates
run: cd fendermint && PROFILE=release make e2e-only

3 changes: 1 addition & 2 deletions .github/workflows/tests-unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ jobs:
with:
path: |
./contracts/out
./contracts/bindings
./contracts/cache
./crates/contract-bindings
key: v2-contracts-abi-${{ hashFiles('./contracts/**/*.sol') }}

- uses: Swatinem/rust-cache@v2
Expand All @@ -39,4 +39,3 @@ jobs:

- name: Run unit tests
run: make test-rust

52 changes: 26 additions & 26 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ All notable changes to this project will be documented in this file.

## [axon-r05] - 2024-09-24

_Full changelog below._
*Full changelog below.*

### ⭐ HIGHLIGHT | Token-bound validator collateral 🪙🔐

Expand All @@ -102,19 +102,19 @@ By decoupling consensus security from the parent token, subnet operators gain gr

### 🚀 Features

- _(contracts)_ Token-bound validator collateral (#1130)
- *(contracts)* Token-bound validator collateral (#1130)

### 🐛 Bug Fixes

- _(topdown)_ Pull effects up until committed finality. (#887)
- *(topdown)* Pull effects up until committed finality. (#887)

### ⚙️ Miscellaneous Tasks

- Remove Python requirement for contracts development (#1144)

## [axon-r04] - 2024-09-18

_Full changelog below._
*Full changelog below.*

### ⭐ HIGHLIGHT | Validator Gating 🌁🌉

Expand All @@ -124,11 +124,11 @@ This feature is designed to support both federated and collateral-based networks

### 🚀 Features

- _(contracts)_ Validator gating (#1127)
- *(contracts)* Validator gating (#1127)

### 📚 Documentation

- _(docs)_ Validator gating docs (#1127)
- *(docs)* Validator gating docs (#1127)

### ⚙️ Miscellaneous Tasks

Expand All @@ -137,27 +137,27 @@ This feature is designed to support both federated and collateral-based networks

## [axon-r03] - 2024-09-06

_Full changelog below._
*Full changelog below.*

### ⭐ HIGHLIGHT | Consistent Genesis 🧬🚀

The Consistent Genesis feature introduces an additional step of sealing the genesis, ensuring the inclusion of the genesis state, including both custom and built-in actors. This step prevents inconsistencies during node initialization. Previously, the genesis process required certain actors to be deployed at runtime when the node started, which could result in a panic and prevent the node from starting. With the Consistent Genesis update, actor code is directly incorporated into the genesis as part of the state tree, ensuring stability and consistency across all node starts.

### 🚀 Features

- _(node)_ Consistent Genesis (#1016)
- _(contracts)_ Improvements to contract deployment scripts (#1108)
- *(node)* Consistent Genesis (#1016)
- *(contracts)* Improvements to contract deployment scripts (#1108)

### 🐛 Bug Fixes

- _(core)_ Set the default Fendermint log level to INFO (#1123)
- _(ci)_ CI speed-up improvements (#1124)
- *(core)* Set the default Fendermint log level to INFO (#1123)
- *(ci)* CI speed-up improvements (#1124)

### 📚 Documentation

- _(docs)_ Moved documentation to monorepo (#1014)
- _(specs)_ Subnet Genesis v2 spec (#1113)
- _(node)_ Updated running docs with Consistent Genesis (#1128)
- *(docs)* Moved documentation to monorepo (#1014)
- *(specs)* Subnet Genesis v2 spec (#1113)
- *(node)* Updated running docs with Consistent Genesis (#1128)

### ⚙️ Miscellaneous Tasks

Expand All @@ -167,7 +167,7 @@ The Consistent Genesis feature introduces an additional step of sealing the gene

## [axon-r02] - 2024-07-23

_Full changelog below._
*Full changelog below.*

### ⭐ HIGHLIGHTED | Observability Framework 👁️📊

Expand Down Expand Up @@ -202,23 +202,23 @@ Refer to full observability documentation [here](./docs/fendermint/observability

### 🚀 Features

- _(node)_ New observability architecture + events (#1053)
- _(node)_ New observability bottom up tracing/metrics (#1061)
- _(ethapi)_ Add eth cors settings (#1021)
- _(node)_ File-based observability configuration (#1078)
- _(node)_ Observability docs and changelog section (#1083)
- *(node)* New observability architecture + events (#1053)
- *(node)* New observability bottom up tracing/metrics (#1061)
- *(ethapi)* Add eth cors settings (#1021)
- *(node)* File-based observability configuration (#1078)
- *(node)* Observability docs and changelog section (#1083)

### 🐛 Bug Fixes

- _(ethapi)_ Make `eth_getTransactionReceipt` null for unexecuted/unknown transactions (#1006)
- *(ethapi)* Make `eth_getTransactionReceipt` null for unexecuted/unknown transactions (#1006)

### 🚜 Refactor

- _(node)_ Observability refinements. (#1085)
- *(node)* Observability refinements. (#1085)

### 📚 Documentation

- _(specs)_ Ethereum JSON-RPC API (#913)
- *(specs)* Ethereum JSON-RPC API (#913)

### ⚙️ Miscellaneous Tasks

Expand All @@ -232,11 +232,11 @@ Hello World! It's early days for IPC. We are starting to enact a proper versioni

We introduce the notion of "product generations" to represent the lifetime of IPC under each of these major architectural iterations. Product generations are named alphabetically A-Z (we certainly don't expect more than 26 generations...) We've kept the naming universe deliberately broad: entities/concepts found in biological, mathematical, or computing networks.

The first product generation is called **_Axon_**!
The first product generation is called ***Axon***!

![image](https://github.com/user-attachments/assets/7f9ac874-acdd-49d2-a409-995c55f6bfd4)

Find more background on these choices / implications here: https://github.com/consensus-shipyard/ipc/issues/1012.
Find more background on these choices / implications here: <https://github.com/consensus-shipyard/ipc/issues/1012>.

### Axon r01

Expand All @@ -259,6 +259,6 @@ Axon r01 supports these major features (not a comprehensive list):
- Compatibility with the BlockScount explorer and Ethereum wallets out of the box.
- ... and a lot more.

### Join the conversation!
### Join the conversation

Come ask your questions or give us feedback in the `#ipc` channel on [Filecoin Slack](https://filecoin.io/slack).
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@

default:
cd contracts && make gen
cargo build --release
./target/release/ipc-cli --version
./target/release/fendermint --version
cd crates && (cargo build --release && ./target/release/ipc-cli --version && ./target/release/fendermint --version)

SUBTREES_RUST := fendermint ipc ipld/resolver
# Uses 'docker' as the default container runtime.
# Can be overwritten to 'podman' for a compatible API and potentially enhanced support
CONTAINER_FRONTEND_BIN ?= docker

SUBTREES_RUST := $(patsubst %, crates/%, $(ls -1 crates))
SUBTREES_CONTRACTS := contracts
SUBTREES_ALL := $(SUBTREES_RUST) $(SUBTREES_CONTRACTS)

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

## Reporting a vulnerability

Please report any security-sensitive issues via ipc@protocol.ai
Please report any security-sensitive issues via <ipc@protocol.ai>
2 changes: 1 addition & 1 deletion contracts/.gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
out/* linguist-generated=true
binding/* linguist-generated=true
contract-bindings/* linguist-generated=true
5 changes: 2 additions & 3 deletions contracts/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ crytic-export/
.env
broadcast/
out/
binding/src

node_modules

Expand All @@ -22,7 +21,7 @@ deployments.json
scripts/*.out
scripts/deploy-registry.ts
scripts/deploy-gateway.ts
binding/target
contract-bindings/target
subnet.registry.json
subnet.actor.json

Expand All @@ -38,4 +37,4 @@ report.json
*.un~

## Licenses are picked up from the root when packing the npm package.
LICENSE-*
LICENSE-*
4 changes: 2 additions & 2 deletions contracts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ compile-abi: node_modules | forge
./ops/compile-abi.sh $(OUTPUT)

rust-binding:
OUTPUT=$(OUTPUT) cargo build --locked --release --manifest-path ./binding/Cargo.toml -p ipc_actors_abis
OUTPUT=$(OUTPUT) cargo build --locked --release --manifest-path ../crates/contract-bindings/Cargo.toml -p ipc_actors_abis

# ==============================================================================
# Running security checks within the local computer
Expand Down Expand Up @@ -113,4 +113,4 @@ forge:
exit 1; \
fi

# ==============================================================================
# ==============================================================================
Loading
Loading