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

Merge fork #45

Merged
merged 48 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
6d0d5f7
feat: use actual resource cost (#1139)
trbutler4 Oct 3, 2023
6207f1c
fix: add mp-sequencer-address in pallet crate (#1162)
ayushtom Oct 3, 2023
1b4457c
chore: release v0.4.0 (#1171)
tdelabro Oct 6, 2023
cd8c1ce
implemented transaction verification
antiyro Oct 6, 2023
ec4192f
Merge pull request #38 from KasarLabs/net/dev
0xEniotna Oct 7, 2023
e47db87
cleaned up
antiyro Oct 7, 2023
497ac8f
Merge pull request #39 from KasarLabs/net/manual_import
antiyro Oct 7, 2023
407e857
test: add e2e test for rpc's estimate_fee (#1153)
kasteph Oct 9, 2023
7364b5c
build(deps): bump reqwest from 0.11.20 to 0.11.22 (#1174)
dependabot[bot] Oct 10, 2023
fd6ec54
build(deps): bump num-traits from 0.2.16 to 0.2.17 (#1173)
dependabot[bot] Oct 10, 2023
36f1cbe
refacto: improve node cli (#1165)
tdelabro Oct 11, 2023
5003054
fix: declareV0 hash computation (#1179)
antiyro Oct 11, 2023
6a1df16
tests: add rpc tests to CI (#1145)
tdelabro Oct 12, 2023
a235719
test: validate_unsigned noce logic for User transactions (#1172)
bidzyyys Oct 12, 2023
29a8b11
fix(starknet-rpc-test): don't share reqwest client across test runtim…
tdelabro Oct 12, 2023
ee2602a
ci: tests key generation commands (#1182)
d-roak Oct 12, 2023
dfb29ff
docs: fix setup and run commands in `getting-started.md` (#1186)
kalaninja Oct 12, 2023
629f36c
doc: fix event commitment documentation typo (#1187)
antiyro Oct 12, 2023
85cb726
test: added sign_message_hash_braavos function (#1131)
tonypony220 Oct 12, 2023
d9ec4a1
fix(transactions): remove nonce field from InvokeV0 tx (#1185)
tdelabro Oct 13, 2023
ce991f3
build(deps): bump tokio from 1.32.0 to 1.33.0 (#1194)
dependabot[bot] Oct 16, 2023
b7d2c4c
build(deps): bump serde from 1.0.188 to 1.0.189 (#1193)
dependabot[bot] Oct 16, 2023
f699a94
build(deps): bump async-trait from 0.1.73 to 0.1.74 (#1191)
dependabot[bot] Oct 16, 2023
006ecb4
build(deps): bump parity-db from 0.4.11 to 0.4.12 (#1192)
dependabot[bot] Oct 16, 2023
14928ef
build(deps): bump flate2 from 1.0.27 to 1.0.28 (#1190)
dependabot[bot] Oct 16, 2023
2afd5fd
ci: rust cache (#1188)
d-roak Oct 16, 2023
490caca
refactor: non-default sealing (#1189)
kalaninja Oct 18, 2023
8f6a29c
:busts_in_silhouette: Add @kalaninja as a contributor (#1198)
AbdelStark Oct 19, 2023
73cc3c0
fix linter (#1199)
AbdelStark Oct 19, 2023
85a4896
fix linter (#1200)
AbdelStark Oct 19, 2023
02ebc51
🚨 prettier fix (#1201)
AbdelStark Oct 19, 2023
645d9f0
feat: add `--cache` option, allows caching more information into the …
nils-mathieu Oct 19, 2023
7210c6d
chore: rework vm ressource fee (#1204)
tdelabro Oct 20, 2023
2a4edbe
fix(cache-opt): fix typo introduced by #1197 (#1208)
nils-mathieu Oct 20, 2023
5c6279c
chore: change logging to decrease noise (#1207)
d-roak Oct 23, 2023
c583247
fix: clippy (#1218)
d-roak Oct 24, 2023
79b2706
build(deps): bump thiserror from 1.0.49 to 1.0.50 (#1212)
dependabot[bot] Oct 24, 2023
6b36988
build(deps): bump scale-info from 2.9.0 to 2.10.0 (#1213)
dependabot[bot] Oct 24, 2023
f8ecc44
dev(StarknetRPC): log error we receive from node before mapping to In…
jobez Oct 25, 2023
281a12f
CI: Add starknetjs compatibilty tests (#1195)
petscheit Oct 26, 2023
bb588f3
Build CommitmentStateDiff based on new block storage changes (#1217)
tdelabro Oct 27, 2023
a62ae4c
chore: fix typos (#1227)
xiaolou86 Oct 27, 2023
2c548e4
test: copy-paste transaction-pool tests from substrate (#1220)
Juul-Mc-Goa Oct 27, 2023
3528680
chore: release v0.5.0 (#1228)
tdelabro Oct 27, 2023
57fc9a2
feat(estimate_fee): Alter transaction checks for starknet-rs/foundry …
justinfrevert Oct 27, 2023
7b15f44
:construction: benchmarking
0xEniotna Oct 27, 2023
912e19a
Merge remote-tracking branch 'madara/main' into merge-fork
0xEniotna Oct 27, 2023
000d88d
rm benchmark tmp changes
0xEniotna Oct 27, 2023
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
14 changes: 14 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,20 @@
"avatar_url": "https://avatars.githubusercontent.com/u/9974198?v=4",
"profile": "https://github.com/tchataigner",
"contributions": ["code"]
},
{
"login": "kalaninja",
"name": "Alexander Kalankhodzhaev",
"avatar_url": "https://avatars.githubusercontent.com/u/18083464?v=4",
"profile": "https://github.com/kalaninja",
"contributions": ["code"]
},
{
"login": "antiyro",
"name": "antiyro",
"avatar_url": "https://avatars.githubusercontent.com/u/74653697?v=4",
"profile": "https://github.com/antiyro",
"contributions": ["code"]
}
],
"contributorsPerLine": 7,
Expand Down
14 changes: 3 additions & 11 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,10 @@ jobs:
runs-on: ubuntu-latest-32-cores
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key:
${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-${{
github.run_id }}
fail-on-cache-miss: true
shared-key: "cache"
save-if: false
- name: Setup build deps
run: |
sudo apt-get update
Expand Down
20 changes: 3 additions & 17 deletions .github/workflows/linters-cargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,10 @@ jobs:
runs-on: ubuntu-latest-32-cores
steps:
- uses: actions/checkout@v3
- name: Retrieve cached build
uses: actions/cache@v3
- uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key:
${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-${{
github.run_id }}
fail-on-cache-miss: true
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-${{
github.run_id }}
${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
${{ runner.os }}-cargo
shared-key: "cache"
save-if: false
- name: Setup build deps
run: |
sudo apt-get update
Expand Down
21 changes: 14 additions & 7 deletions .github/workflows/madara-commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,29 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
path: target/release/madara
key:
${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-${{
github.run_id }}
fail-on-cache-miss: true
- name: Run setup
run: |
target/release/madara setup
target/release/madara setup --chain local --from-remote
- name: Create build-spec (plain)
run: |
target/release/madara build-spec --chain local > chain-plain.json
- name: Create build-spec (raw)
run: |
target/release/madara build-spec --chain chain-plain.json --raw > chain-raw.json
- name: Generate Sr25519 key for Aura (Leader Election)
id: key-gen
run: |
target/release/madara key generate --scheme Sr25519
echo "SEED_PHRASE=$(target/release/madara key generate --scheme Sr25519 | sed -n 's/Secret phrase:\s*//p')" >> "$GITHUB_OUTPUT"
- name: Derive Ed25519 key for Grandpa (Finality)
run: |
target/release/madara key inspect --scheme Ed25519 "${{ steps.key-gen.outputs.SEED_PHRASE }}"
- name: Add keys to the node keystore
run: |
target/release/madara key insert --scheme Sr25519 --suri "${{ steps.key-gen.outputs.SEED_PHRASE }}" --key-type aura
target/release/madara key insert --scheme Ed25519 --suri "${{ steps.key-gen.outputs.SEED_PHRASE }}" --key-type gran
24 changes: 14 additions & 10 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,30 @@ jobs:
uses: ./.github/workflows/linters.yml
needs: [changelog, configs-verifier]

rust_build:
name: Build Rust project
uses: ./.github/workflows/rust-build.yml
rust_build_test:
name: Build & Integration Tests
uses: ./.github/workflows/rust-build-test.yml
needs: [changelog, configs-verifier]

madara_commands:
name: Test Madara commands
uses: ./.github/workflows/madara-commands.yml
needs: rust_build
needs: [linters, rust_build_test]

linters_cargo:
name: Run Cargo linters
uses: ./.github/workflows/linters-cargo.yml
needs: rust_build
needs: madara_commands

# TODO: Unlock when rust tests are working on main
# coverage:
# name: Run coverage
# uses: ./.github/workflows/coverage.yml
# needs: [madara_commands, linters_cargo]
rpc-tests:
name: Run rpc tests
uses: ./.github/workflows/starknet-rpc-tests.yml
needs: madara_commands

starknet-js-tests:
name: Run starknet-js compatibility tests
uses: ./.github/workflows/starknet-js-tests.yml
needs: madara_commands

# https://github.com/keep-starknet-strange/madara/issues/1097
# benchmark:
Expand Down
25 changes: 20 additions & 5 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,31 @@ jobs:
name: Run linters
uses: ./.github/workflows/linters.yml

rust_build:
name: Build Rust project
uses: ./.github/workflows/rust-build.yml
rust_build_test:
name: Build & Integration Tests
uses: ./.github/workflows/rust-build-test.yml

madara_commands:
name: Test Madara commands
uses: ./.github/workflows/madara-commands.yml
needs: [linters, rust_build_test]

linters_cargo:
name: Run Cargo linters
uses: ./.github/workflows/linters-cargo.yml
needs: rust_build
needs: madara_commands

rpc-tests:
name: Run rpc tests
uses: ./.github/workflows/starknet-rpc-tests.yml
needs: madara_commands

starknet-js-tests:
name: Run starknet-js compatibility tests
uses: ./.github/workflows/starknet-js-tests.yml
needs: madara_commands

# https://github.com/keep-starknet-strange/madara/issues/1097
# benchmark:
# name: Run benchmarks
# uses: ./.github/workflows/benchmarks.yml
Expand All @@ -32,7 +48,6 @@ jobs:
# # post on the pull-request page
# pull-requests: write

# TODO change it to benchmark when enabled
rustdoc:
name: Deploy docs to GitHub Pages
uses: ./.github/workflows/rustdoc.yml
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,27 @@
---
name: Task - Build Rust
name: Task - Build & Integration Tests

on:
workflow_dispatch:
workflow_call:

jobs:
rust_build:
rust_build_test:
runs-on: ubuntu-latest-32-cores
steps:
- uses: actions/checkout@v3

- name: Cache Cargo registry and git trees
uses: actions/cache@v3
- uses: Swatinem/rust-cache@v2
with:
shared-key: "cache"
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
path: target/release/madara
key:
${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-${{
github.run_id }}
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-${{
github.run_id }}
${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
${{ runner.os }}-cargo
${{ runner.os }}-cargo-

- name: Setup rust toolchain
if: steps.cache.outputs.cache-hit != 'true'
Expand All @@ -41,3 +35,6 @@ jobs:
- name: Build the project
run: |
cargo build --release --workspace

- name: Run integration tests
run: cargo test --release
33 changes: 33 additions & 0 deletions .github/workflows/starknet-js-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Starknet-js Compatibility Tests

on:
workflow_dispatch:
workflow_call:

jobs:
test:
runs-on: ubuntu-latest
env:
BINARY_PATH: ../target/release/madara
steps:
- uses: actions/checkout@v3
- 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 dev chain
run: |
./target/release/madara setup --chain=dev --from-remote
- name: Run starknet-js test
run: |-
./target/release/madara --dev --execution native &
NATIVE_RUN_PID=$!
while ! echo exit | nc localhost 9944; do sleep 1; done
git clone https://github.com/keep-starknet-strange/sequencer-js-compatibility-tests.git
cd sequencer-js-compatibility-tests
npm install
npm test
kill $NATIVE_RUN_PID
48 changes: 48 additions & 0 deletions .github/workflows/starknet-rpc-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
name: Task - Rpc Tests

on:
workflow_dispatch:
workflow_call:

jobs:
rpc-tests:
runs-on: ubuntu-latest
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-remote
- name: Run rpc native test
run: |-
./target/release/madara --dev --sealing=manual --execution=Native &
NATIVE_RUN_PID=$!
while ! echo exit | nc localhost 9944; do sleep 1; done
cd starknet-rpc-test
cargo test
kill $NATIVE_RUN_PID
- name: Run rpc wasm test
run: |-
./target/release/madara --dev --sealing=manual --execution=Wasm &
WASM_RUN_PID=$!
while ! echo exit | nc localhost 9944; do sleep 1; done
cd starknet-rpc-test
cargo test
kill $WASM_RUN_PID
24 changes: 24 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Task - Integration Tests

on:
workflow_dispatch:
workflow_call:

jobs:
integration-tests:
runs-on: ubuntu-latest
env:
BINARY_PATH: ../target/release/madara
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
with:
shared-key: "cache"
save-if: false
- name: Setup build deps
run: |
sudo apt-get update
sudo apt-get install -y clang llvm libudev-dev protobuf-compiler
- name: Run crates test
run: cargo test --release
7 changes: 1 addition & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{
"eslint.workingDirectories": ["tests"],
"workbench.colorCustomizations": {
"activityBar.background": "#561529",
"titleBar.activeBackground": "#781E3A",
"titleBar.activeForeground": "#FEFBFC"
}
"eslint.workingDirectories": ["tests"]
}
Loading
Loading