Skip to content

Commit

Permalink
feat: Add temporary node template (#69)
Browse files Browse the repository at this point in the history
* Reset the project

* feat: Introduce [email protected]

* feat: Introduce [email protected]

* feat: Introduce [email protected]

* feat: Introduce [email protected]

* feat: Introduce [email protected]

* feat: Introduce [email protected]

* feat: Introduce [email protected]

* feat: Add temporary node template

* build: Add wasm32 toolchain

* chore: Fix clippy errors

* fix: Fix handling duplicate values in UniqueMultimap

* build: Add missing toolchain component

* chore: Fix clippy error with unreachable pattern
  • Loading branch information
conr2d authored Sep 5, 2024
1 parent 80f73b4 commit 9d6bdb8
Show file tree
Hide file tree
Showing 119 changed files with 4,085 additions and 8,015 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
root = true

[*]
indent_style=tab
indent_size=tab
Expand All @@ -9,6 +10,9 @@ trim_trailing_whitespace=true
max_line_length=100
insert_final_newline=true

[*.toml]
max_line_length=off

[*.md]
max_line_length=80
indent_style=space
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vendor/* linguist-vendored
57 changes: 36 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,47 @@
name: CI

on:
push:
branches: [ "main" ]
branches: [main]
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always

jobs:
check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: arduino/setup-protoc@v3
- run: rustup show
- uses: Swatinem/rust-cache@v2
- name: Check
run: cargo check --all-targets
- name: Format
run: cargo fmt --all --check
- name: Lint
run: cargo clippy --no-deps -- -Dwarnings
build:

runs-on: ubuntu-latest

runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: arduino/setup-protoc@v3
- run: rustup show
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build -v
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
with:
targets: wasm32-unknown-unknown
components: rust-src, rustfmt
- name: Install build dependencies
run: sudo apt-get install protobuf-compiler
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Lint
run: cargo fmt -- --check
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: arduino/setup-protoc@v3
- run: rustup show
- uses: Swatinem/rust-cache@v2
- name: Test
run: cargo test --all
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated by Cargo
# will have compiled files and executables
/target/
**/target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Expand Down
8 changes: 4 additions & 4 deletions rustfmt.toml → .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Basic
edition = "2021"
hard_tabs = true
max_width = 100
use_small_heuristics = "Max"
Expand All @@ -7,9 +8,6 @@ imports_granularity = "Crate"
reorder_imports = true
# Consistency
newline_style = "Unix"
# Format comments
comment_width = 100
wrap_comments = true
# Misc
chain_width = 80
spaces_around_ranges = false
Expand All @@ -21,4 +19,6 @@ match_block_trailing_comma = true
trailing_comma = "Vertical"
trailing_semicolon = false
use_field_init_shorthand = true
edition = "2021"
# Format comments
comment_width = 100
wrap_comments = true
145 changes: 12 additions & 133 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,147 +1,26 @@
[workspace]
resolver = "2"

members = [
"core-primitives",
"frame/alias",
"frame/babel",
"frame/multimap",
"node",
"primitives/crypto",
"primitives/io",
"primitives/cosmos",
"primitives/ethereum",
"primitives/runtime",
"runtime",
"runtime/common",
"runtime/solochain",
]

[workspace.package]
authors = ["Haderech Pte. Ltd."]
edition = "2021"
repository = "https://github.com/noirhq/noir.git"
version = "0.4.0-dev"

[workspace.dependencies]
array-bytes = "6.2.2"
async-trait = "0.1.66"
base64ct = { version = "1.6.0", default-features = false }
clap = { version = "4.1.8", features = ["derive"] }
ecdsa = "0.16.8"
ethereum = { version = "0.15.0", default-features = false, features = ["with-codec"] }
futures = { version = "0.3.26", features = ["thread-pool"] }
hmac = { version = "0.12.1", default-features = false }
jsonrpsee = { version = "0.22.5", features = ["server"] }
lazy_static = { version = "1.4.0", default-features = false }
log = "0.4.17"
parity-scale-codec = { version = "3.4.0", default-features = false, features = ["derive"] }
p256 = { version = "0.13.2", default-features = false, features = ["ecdsa", "alloc"] }
regex = "1.7.1"
scale-info = { version = "2.3.1", default-features = false, features = ["derive"] }
secp256k1 = { version = "0.28.1", default-features = false, features = ["alloc"] }
serde = { version = "1.0.152", default-features = false, features = ["derive"] }
serde_json = { version = "1.0.94", default-features = false }
sha2 = { version = "0.10.6", default-features = false }
substrate-bip39 = { version = "0.4.4" }
thiserror = "1.0.61"
tiny-bip39 = "1.0.0"
url = "2.5.0"
zeroize = { version = "1.5.7", default-features = false }

# noir
frame-babel = { path = "frame/babel", default-features = false }
noir-core-primitives = { path = "core-primitives", default-features = false }
noir-runtime = { path = "runtime", default-features = false }
np-crypto = { path = "primitives/crypto", default-features = false }
np-io = { path = "primitives/io", default-features = false }
noir-runtime-common = { path = "runtime/common", default-features = false }
noir-solochain-runtime = { path = "runtime/solochain", default-features = false }
np-cosmos = { path = "primitives/cosmos", default-features = false }
np-ethereum = { path = "primitives/ethereum", default-features = false }
np-runtime = { path = "primitives/runtime", default-features = false }
pallet-alias = { path = "frame/alias", default-features = false }

# substrate
frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
pallet-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
prometheus-endpoint = { package = "substrate-prometheus-endpoint", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0" }

sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0" }
sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0" }
sc-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0" }
sc-consensus-manual-seal = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0" }
sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0" }
sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0" }
sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0" }
sc-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0" }
sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0" }
sc-keystore = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0" }
sc-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0" }
sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0" }
sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0" }
sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0" }
sc-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0" }
sc-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0" }
sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0" }
sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0" }
sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0" }

sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
sp-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
sp-genesis-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
sp-keyring = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
sp-runtime-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
sp-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
sp-state-machine = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
sp-trie = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
sp-version = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }

substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0" }
substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }
substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.9.0", default-features = false }

# frontier
fc-api = { git = "https://github.com/polkadot-evm/frontier", branch = "polkadot-v1.9.0" }
fc-cli = { git = "https://github.com/polkadot-evm/frontier", branch = "polkadot-v1.9.0" }
fc-consensus = { git = "https://github.com/polkadot-evm/frontier", branch = "polkadot-v1.9.0" }
fc-db = { git = "https://github.com/polkadot-evm/frontier", branch = "polkadot-v1.9.0" }
fc-mapping-sync = { git = "https://github.com/polkadot-evm/frontier", branch = "polkadot-v1.9.0" }
fc-rpc = { git = "https://github.com/polkadot-evm/frontier", branch = "polkadot-v1.9.0" }
fc-rpc-core = { git = "https://github.com/polkadot-evm/frontier", branch = "polkadot-v1.9.0" }
fc-storage = { git = "https://github.com/polkadot-evm/frontier", branch = "polkadot-v1.9.0" }
fp-dynamic-fee = { git = "https://github.com/polkadot-evm/frontier", branch = "polkadot-v1.9.0", default-features = false }
fp-ethereum = { git = "https://github.com/polkadot-evm/frontier", branch = "polkadot-v1.9.0", default-features = false }
fp-evm = { git = "https://github.com/polkadot-evm/frontier", branch = "polkadot-v1.9.0", default-features = false }
fp-rpc = { git = "https://github.com/polkadot-evm/frontier", branch = "polkadot-v1.9.0", default-features = false }
fp-self-contained = { git = "https://github.com/polkadot-evm/frontier", branch = "polkadot-v1.9.0", default-features = false }
pallet-base-fee = { git = "https://github.com/polkadot-evm/frontier", branch = "polkadot-v1.9.0", default-features = false }
pallet-dynamic-fee = { git = "https://github.com/polkadot-evm/frontier", branch = "polkadot-v1.9.0", default-features = false }
pallet-ethereum = { git = "https://github.com/polkadot-evm/frontier", branch = "polkadot-v1.9.0", default-features = false }
pallet-evm = { git = "https://github.com/polkadot-evm/frontier", branch = "polkadot-v1.9.0", default-features = false }
pallet-evm-chain-id = { git = "https://github.com/polkadot-evm/frontier", branch = "polkadot-v1.9.0", default-features = false }
pallet-evm-precompile-blake2 = { git = "https://github.com/polkadot-evm/frontier", branch = "polkadot-v1.9.0", default-features = false }
pallet-evm-precompile-bn128 = { git = "https://github.com/polkadot-evm/frontier", branch = "polkadot-v1.9.0", default-features = false }
pallet-evm-precompile-modexp = { git = "https://github.com/polkadot-evm/frontier", branch = "polkadot-v1.9.0", default-features = false }
pallet-evm-precompile-sha3fips = { git = "https://github.com/polkadot-evm/frontier", branch = "polkadot-v1.9.0", default-features = false }
pallet-evm-precompile-simple = { git = "https://github.com/polkadot-evm/frontier", branch = "polkadot-v1.9.0", default-features = false }

# horizon
hc-rpc = { git = "https://github.com/noirhq/horizon", branch = "polkadot-v1.9.0" }
hp-crypto = { git = "https://github.com/noirhq/horizon", branch = "polkadot-v1.9.0", default-features = false }
hp-rpc = { git = "https://github.com/noirhq/horizon", branch = "polkadot-v1.9.0", default-features = false }
hp-cosmos = { git = "https://github.com/noirhq/horizon", branch = "polkadot-v1.9.0", default-features = false }
pallet-cosmos = { git = "https://github.com/noirhq/horizon", branch = "polkadot-v1.9.0", default-features = false }
pallet-multimap = { path = "frame/multimap", default-features = false }

[profile.release]
panic = "unwind"
Expand Down
File renamed without changes.
16 changes: 8 additions & 8 deletions core-primitives/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
name = "noir-core-primitives"
version = { workspace = true }
license = "GPL-3.0-or-later"

authors = { workspace = true }
edition = { workspace = true }
repository = { workspace = true }
version = "0.4.0"
authors = ["Haderech Pte. Ltd."]
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/noirhq/noir.git"
publish = false

[dependencies]
np-runtime = { workspace = true }
sp-core = { workspace = true }
sp-runtime = { workspace = true }
sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false }

[features]
default = ["std"]
Expand Down
Loading

0 comments on commit 9d6bdb8

Please sign in to comment.