Skip to content

Commit

Permalink
Merge pull request #85 from KasarLabs/sync
Browse files Browse the repository at this point in the history
fix: 🎨 Synced with Madara + fixed genesis missing field at launch
  • Loading branch information
antiyro authored Jan 5, 2024
2 parents 51b7988 + 13a9811 commit f3bd754
Show file tree
Hide file tree
Showing 182 changed files with 76,018 additions and 3,360 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/configs-verifier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ jobs:
- uses: actions/checkout@v3
- name: Verify hashes
run: |
for f in $(find configs/genesis-assets/ -type f -not -path configs/index.json); do
for f in $(find configs/genesis-assets -type f -not -path configs/index.json); do
cat configs/index.json | grep $(md5sum $f | awk '{print $1}')
done
53 changes: 53 additions & 0 deletions .github/workflows/da-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
name: Task - DA Tests

on:
workflow_dispatch:
workflow_call:

jobs:
rpc-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
da-layer:
- ethereum
- celestia
- avail
env:
BINARY_PATH: ../target/release/madara
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
with:
shared-key: "cache"
save-if: false
- uses: actions/cache@v3
with:
path: target/release/madara
key:
${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-${{
github.run_id }}
fail-on-cache-miss: true
- name: Setup build deps
run: |
sudo apt-get update
sudo apt-get install -y clang llvm libudev-dev protobuf-compiler
- name: Setup dev chain
run: |
./target/release/madara setup --chain=dev --from-local=configs
- name: Run DA Layer
run: |
bash ./scripts/da_devnet.sh ${{ matrix.da_layer }}
- name: Run DA tests
run: |-
./target/release/madara --dev --da-layer ${{ matrix.da_layer }} --da-conf examples/da-confs/${{ matrix.da_layer }}.json &
MADARA_RUN_PID=$!
while ! echo exit | nc localhost 9944; do sleep 1; done
cd da-test
DA_LAYER=${{ matrix.da_layer }} cargo test
kill $MADARA_RUN_PID
- name: Stop DA Layer
run: |
bash ./scripts/stop_da_devnet.sh ${{ matrix.da_layer }}
3 changes: 1 addition & 2 deletions .github/workflows/linters-cargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@ jobs:
- name: Format and clippy
run: |
cargo fmt -- --check
cargo clippy --no-deps -- -D warnings
cargo clippy --tests --no-deps -- -D warnings
cargo clippy --workspace --tests --no-deps -- -D warnings
6 changes: 4 additions & 2 deletions .github/workflows/madara-commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: target/release/madara
path: |
target/release/madara
configs
key:
${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-${{
github.run_id }}
fail-on-cache-miss: true
- name: Run setup
run: |
target/release/madara setup --chain local --from-remote
target/release/madara setup --chain local --from-local=configs
- name: Create build-spec (plain)
run: |
target/release/madara build-spec --chain local > chain-plain.json
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ jobs:
runs-on: ubuntu-latest
needs: madara_commands
env:
SNCAST_VERSION: "0.8.3"
SNCAST_VERSION: "0.12.0"
SCARB_VERSION: "2.3.1"
steps:
- uses: keep-starknet-strange/starknet-foundry-compatibility-tests@main

Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ jobs:
uses: ./.github/workflows/starknet-js-tests.yml
needs: madara_commands

starknet-foundry-tests:
name: Run Starknet Foundry compatibility tests
runs-on: ubuntu-latest
needs: madara_commands
env:
SNCAST_VERSION: "0.12.0"
SCARB_VERSION: "2.3.1"
steps:
- uses: keep-starknet-strange/starknet-foundry-compatibility-tests@main

# https://github.com/keep-starknet-strange/madara/issues/1097
# benchmark:
# name: Run benchmarks
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/rust-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ jobs:
shared-key: "cache"
- uses: actions/cache@v3
with:
path: target/release/madara
path: |
target/release/madara
configs
key:
${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-${{
github.run_id }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/starknet-js-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: target/release/madara
path: |
target/release/madara
configs
key:
${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-${{
github.run_id }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/starknet-rpc-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ jobs:
save-if: false
- uses: actions/cache@v3
with:
path: target/release/madara
path: |
target/release/madara
configs
key:
${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-${{
github.run_id }}
Expand Down
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# These are backup files generated by rustfmt
**/*.rs.bk

# Rust compiler error files
rustc-ice-*.txt

.DS_Store

# The cache for docker container dependency
Expand Down Expand Up @@ -37,3 +40,9 @@ cairo_venv
run.sh
password.txt
nohup.out
# pyenv
.python-version

# solidity cache
starknet-e2e-test/contracts/cache
starknet-e2e-test/contracts/build
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
[submodule "madara-tsukuyomi"]
path = madara-tsukuyomi
url = https://github.com/keep-starknet-strange/madara-tsukuyomi
[submodule "zaun"]
path = zaun
url = https://github.com/keep-starknet-strange/zaun
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
target
cairo-contracts/build
madara-app
madara-tsukuyomi
madara-dev-explorer
madara-docs
madara-infra
zaun
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,49 @@

## Next release

- feat: add sierra to casm class hash mapping to genesis assets
- chore: remove ArgentMulticall from genesis assets
- feat: remove `seq_addr_updated` from `GenesisData`
- chore: added prometheus metrics for da layer
- chore: bump celestia rpc crate version
- fix(DA): run the proof first then the state update
- fix: `prove_current_block` is called after `update_state`
- ci: add foundry ci task to push workflow
- fix: first tx for non deployed account is valid
- fix: incorrect base url for fetching config
- feat: add predeployed accounts to genesis state
- feat(rpc): Added starknet_simulateTransactions
- fix: Change serialization of bitvec to &[u8] in merkle tree to avoid memory
uninitialized
- chore: change SCARB config version for foundry CI
- feat(da): update da calldata encoding to v0.11.0 spec, da conf examples, da
conf flag, da-tests in CI
- refactor: use `map` in `estimate_fee` to stop computation on error
- fix(node/commands): md5 are also checked when running setup --from-local
- feat(data-availability): extend eth config with poll interval
- fix(snos-output): expose snos codec, remove unused `get_starknet_messages`
runtime method, and unnecessary mp-snos-output dependencies
- feat(program-hash): add new pallet constant for Starknet OS progam hash;
expose runtime getter method; add dedicated crate to manage versions
- feat(runtime): expose fee token address getter method
- feat(settlement): run client thread responsible for pushing state updates and
messaging on Ethereum
- feat(settlement): starknet core contract tests with anvil sandbox
- fix(rpc-test): incorrect node url
- feat(settlement): e2e test with Madara node settling on Ethereum contract
- refactor: use `map` in `estimate_fee` to stop computation on error
- fix: `tempdir` crate has been deprecated; use `tempfile` instead

## v0.6.0

- chore: release v0.6.0
- refacto: substrate/starknet names in rpc library
- feat(rpc): Added starknet_getTransactionStatus and removed
starknet_pendingTransactions
- feat(rpc): add starknet_specVersion rpc + added test for future support
- docs: Added v0.6.0-rc5 documentation above the rpc method functions
- dev(deps): bump starknet rs, use Eq for EmmitedEvents comparaison
- test(rust-rpc-test): use undeclared contracts for declare transactions testing
- build: update blockifier, fix divergent substrat block hash
- chore: remove tests that run in wasm and native, only wasm from now
- chore: split StarknetRpcApi trait in two, like in openRPC specs
Expand Down Expand Up @@ -145,6 +188,8 @@
- fix: rpc tests and background node run
- test: add tests for simulate tx offset
- test: add tests for tx hashing
- fix: bring back messages in transaction receipts
- feat: starknet os program output primitive

## v0.2.0

Expand Down
Loading

0 comments on commit f3bd754

Please sign in to comment.