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

devnet deploy 11-15-2024 (evm balance hotfix) #987

Merged
merged 37 commits into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
abd5522
lint ForbidKeysRemoveCall
eagr Nov 6, 2024
14102b6
Fix childkey take and miner emission distribution
gztensor Nov 8, 2024
97f9a6e
Format
gztensor Nov 8, 2024
1d6c938
allow Keys::<T>::remove() in replace_neuron()
eagr Nov 12, 2024
0b49118
Address nit: rounding
gztensor Nov 12, 2024
81c8905
Format
gztensor Nov 13, 2024
63e9715
use TokenStream in place of str
eagr Nov 13, 2024
850d4ef
Remove unnecessary generics
ales-otf Nov 13, 2024
d23c372
Merge pull request #927 from eagr/forbid-keys-remove
sam0x17 Nov 13, 2024
22f0397
Fix benchmarks compilation
ales-otf Nov 13, 2024
90927da
Update spec version
ales-otf Nov 13, 2024
7a1a38a
Fix dev flag
ales-otf Nov 12, 2024
ac6726a
Update spec version
ales-otf Nov 15, 2024
82936fa
hotfix to fix EVM balance transfer precision
sam0x17 Nov 15, 2024
6bdbaf8
improve safety and performance of EVM <=> TAO balance transfers
sam0x17 Nov 15, 2024
57efc63
bump CI
sam0x17 Nov 15, 2024
dfed247
fix
sam0x17 Nov 15, 2024
ec2b5f6
fix again
sam0x17 Nov 15, 2024
decb56a
fix
sam0x17 Nov 15, 2024
049aa86
import Balance
sam0x17 Nov 15, 2024
5254de9
actually just use BalanceConverter
sam0x17 Nov 15, 2024
0a46a73
fix SubstrateEvmBalanceConverter
sam0x17 Nov 15, 2024
43f782a
fixes
sam0x17 Nov 15, 2024
e522268
fix
sam0x17 Nov 15, 2024
14c2ce7
clippy
sam0x17 Nov 15, 2024
b903817
Merge pull request #956 from opentensor/fix/dev-flag
sam0x17 Nov 15, 2024
2b80315
Merge pull request #950 from opentensor/fix/childkey-emission-distibu…
sam0x17 Nov 15, 2024
5bcb978
Merge pull request #979 from opentensor/feat/clean-up-node-crate
sam0x17 Nov 15, 2024
de2049d
whoops
sam0x17 Nov 15, 2024
67b798e
final fix + tests
sam0x17 Nov 15, 2024
9282b6e
force cargo audit version
sam0x17 Nov 15, 2024
417c35f
display cargo-audit version
sam0x17 Nov 15, 2024
ea5d284
don't need rust cache for cargo audit step, it can't use it
sam0x17 Nov 15, 2024
cbc589d
don't need to install rust stable
sam0x17 Nov 15, 2024
4f1ef7c
some CI fixes
sam0x17 Nov 15, 2024
ed8288d
a bunch of CI fixes
sam0x17 Nov 15, 2024
03527fa
Merge pull request #984 from opentensor/fix-evm
sam0x17 Nov 15, 2024
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
17 changes: 4 additions & 13 deletions .github/workflows/cargo-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,11 @@ jobs:
sudo apt-get update &&
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler

- name: Install Rust Stable
uses: actions-rs/[email protected]
with:
toolchain: stable
components: rustfmt, clippy
profile: minimal

- name: Utilize Shared Rust Cache
uses: Swatinem/[email protected]
with:
key: ubuntu-latest-${{ env.RUST_BIN_DIR }}

- name: Install cargo-audit
run: cargo install --version 0.20.1 cargo-audit
run: cargo install --version 0.20.1 --force cargo-audit

- name: Display cargo-audit --version
run: cargo audit --version

- name: cargo audit
run: cargo audit --ignore RUSTSEC-2024-0336 # rustls issue; wait for upstream to resolve this
3 changes: 0 additions & 3 deletions .github/workflows/check-devnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ jobs:
sudo apt-get install -y curl clang curl libssl-dev llvm \
libudev-dev protobuf-compiler

- name: Set up Rust Toolchain
run: curl https://sh.rustup.rs -sSf | sh -s -- -y

- name: Install substrate-spec-version
run: cargo install substrate-spec-version

Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/check-finney.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ jobs:
sudo apt-get install -y curl clang curl libssl-dev llvm \
libudev-dev protobuf-compiler

- name: Set up Rust Toolchain
run: curl https://sh.rustup.rs -sSf | sh -s -- -y

- name: Install substrate-spec-version
run: cargo install substrate-spec-version

Expand Down
53 changes: 4 additions & 49 deletions .github/workflows/check-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ jobs:
env:
RELEASE_NAME: development
# RUSTFLAGS: -A warnings
RUSTV: ${{ matrix.rust-branch }}
RUST_BACKTRACE: full
RUST_BIN_DIR: target/${{ matrix.rust-target }}
SKIP_WASM_BUILD: 1
TARGET: ${{ matrix.rust-target }}
steps:
Expand All @@ -55,10 +53,10 @@ jobs:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential

- name: Install Rust ${{ matrix.rust-branch }}
- name: Install Rust Nightly
uses: actions-rs/[email protected]
with:
toolchain: ${{ matrix.rust-branch }}
toolchain: nightly
components: rustfmt
profile: minimal

Expand All @@ -84,11 +82,10 @@ jobs:
env:
RELEASE_NAME: development
# RUSTFLAGS: -A warnings
RUSTV: ${{ matrix.rust-branch }}
RUST_BACKTRACE: full
RUST_BIN_DIR: target/${{ matrix.rust-target }}
SKIP_WASM_BUILD: 1
TARGET: ${{ matrix.rust-target }}
RUST_BIN_DIR: target/${{ matrix.rust-target }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v4
Expand All @@ -98,13 +95,6 @@ jobs:
sudo apt-get update &&
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler

- name: Install Rust ${{ matrix.rust-branch }}
uses: actions-rs/[email protected]
with:
toolchain: ${{ matrix.rust-branch }}
components: rustfmt, clippy
profile: minimal

- name: Utilize Shared Rust Cache
uses: Swatinem/[email protected]
with:
Expand All @@ -128,12 +118,11 @@ jobs:
# - macos-latest
env:
RELEASE_NAME: development
RUSTV: ${{ matrix.rust-branch }}
RUSTFLAGS: -D warnings
RUST_BACKTRACE: full
RUST_BIN_DIR: target/${{ matrix.rust-target }}
SKIP_WASM_BUILD: 1
TARGET: ${{ matrix.rust-target }}
RUST_BIN_DIR: target/${{ matrix.rust-target }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v4
Expand Down Expand Up @@ -166,8 +155,6 @@ jobs:
runs-on: SubtensorCI
strategy:
matrix:
rust-branch:
- stable
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
Expand All @@ -180,7 +167,6 @@ jobs:
env:
RELEASE_NAME: development
# RUSTFLAGS: -A warnings
RUSTV: ${{ matrix.rust-branch }}
RUST_BACKTRACE: full
RUST_BIN_DIR: target/${{ matrix.rust-target }}
SKIP_WASM_BUILD: 1
Expand All @@ -194,13 +180,6 @@ jobs:
sudo apt-get update &&
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler

- name: Install Rust ${{ matrix.rust-branch }}
uses: actions-rs/[email protected]
with:
toolchain: ${{ matrix.rust-branch }}
components: rustfmt, clippy
profile: minimal

- name: Utilize Shared Rust Cache
uses: Swatinem/[email protected]
with:
Expand All @@ -215,8 +194,6 @@ jobs:
runs-on: SubtensorCI
strategy:
matrix:
rust-branch:
- stable
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
Expand All @@ -229,7 +206,6 @@ jobs:
env:
RELEASE_NAME: development
# RUSTFLAGS: -A warnings
RUSTV: ${{ matrix.rust-branch }}
RUST_BACKTRACE: full
RUST_BIN_DIR: target/${{ matrix.rust-target }}
SKIP_WASM_BUILD: 1
Expand All @@ -243,13 +219,6 @@ jobs:
sudo apt-get update &&
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler

- name: Install Rust ${{ matrix.rust-branch }}
uses: actions-rs/[email protected]
with:
toolchain: ${{ matrix.rust-branch }}
components: rustfmt, clippy
profile: minimal

- name: Utilize Rust shared cached
uses: Swatinem/[email protected]
with:
Expand Down Expand Up @@ -278,7 +247,6 @@ jobs:
env:
RELEASE_NAME: development
# RUSTFLAGS: -A warnings
RUSTV: ${{ matrix.rust-branch }}
RUST_BACKTRACE: full
RUST_BIN_DIR: target/${{ matrix.rust-target }}
SKIP_WASM_BUILD: 1
Expand All @@ -292,13 +260,6 @@ jobs:
sudo apt-get update &&
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler

- name: Install Rust ${{ matrix.rust-branch }}
uses: actions-rs/[email protected]
with:
toolchain: ${{ matrix.rust-branch }}
components: rustfmt, clippy
profile: minimal

- name: Utilize Rust shared cached
uses: Swatinem/[email protected]
with:
Expand All @@ -322,12 +283,6 @@ jobs:
runs-on: SubtensorCI

steps:
- name: Install stable Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

- name: Install Zepter
run: cargo install --locked -q zepter && zepter --version

Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/check-testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ jobs:
sudo apt-get install -y curl clang curl libssl-dev llvm \
libudev-dev protobuf-compiler

- name: Set up Rust Toolchain
run: curl https://sh.rustup.rs -sSf | sh -s -- -y

- name: Install substrate-spec-version
run: cargo install substrate-spec-version

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/try-runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: SubtensorCI
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run Try Runtime Checks
uses: "paritytech/[email protected]"
Expand All @@ -29,7 +29,7 @@ jobs:
runs-on: SubtensorCI
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run Try Runtime Checks
uses: "paritytech/[email protected]"
Expand Down
1 change: 1 addition & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ fn main() {
};

track_lint(ForbidAsPrimitiveConversion::lint(&parsed_file));
track_lint(ForbidKeysRemoveCall::lint(&parsed_file));
track_lint(RequireFreezeStruct::lint(&parsed_file));
track_lint(RequireExplicitPalletIndex::lint(&parsed_file));
});
Expand Down
12 changes: 6 additions & 6 deletions node/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//!
//! Should only be used for benchmarking as it may break in other contexts.

use crate::service::Client;
use crate::client::FullClient;

use node_subtensor_runtime as runtime;
use node_subtensor_runtime::check_nonce;
Expand All @@ -21,12 +21,12 @@ use std::{sync::Arc, time::Duration};
//
// Note: Should only be used for benchmarking.
pub struct RemarkBuilder {
client: Arc<Client>,
client: Arc<FullClient>,
}

impl RemarkBuilder {
// Creates a new [`Self`] from the given client.
pub fn new(client: Arc<Client>) -> Self {
pub fn new(client: Arc<FullClient>) -> Self {
Self { client }
}
}
Expand Down Expand Up @@ -58,14 +58,14 @@ impl frame_benchmarking_cli::ExtrinsicBuilder for RemarkBuilder {
//
// Note: Should only be used for benchmarking.
pub struct TransferKeepAliveBuilder {
client: Arc<Client>,
client: Arc<FullClient>,
dest: AccountId,
value: Balance,
}

impl TransferKeepAliveBuilder {
// Creates a new [`Self`] from the given client.
pub fn new(client: Arc<Client>, dest: AccountId, value: Balance) -> Self {
pub fn new(client: Arc<FullClient>, dest: AccountId, value: Balance) -> Self {
Self {
client,
dest,
Expand Down Expand Up @@ -105,7 +105,7 @@ impl frame_benchmarking_cli::ExtrinsicBuilder for TransferKeepAliveBuilder {
//
// Note: Should only be used for benchmarking.
pub fn create_benchmark_extrinsic(
client: &Client,
client: &FullClient,
sender: sp_core::sr25519::Pair,
call: runtime::RuntimeCall,
nonce: u32,
Expand Down
16 changes: 10 additions & 6 deletions node/src/chain_spec/localnet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use super::*;

pub fn localnet_config() -> Result<ChainSpec, String> {
pub fn localnet_config(single_authority: bool) -> Result<ChainSpec, String> {
let wasm_binary = WASM_BINARY.ok_or_else(|| "Development wasm not available".to_string())?;

// Give front-ends necessary data to present to users
Expand Down Expand Up @@ -32,11 +32,15 @@ pub fn localnet_config() -> Result<ChainSpec, String> {
.with_genesis_config_patch(localnet_genesis(
// Initial PoA authorities (Validators)
// aura | grandpa
vec![
// Keys for debug
authority_keys_from_seed("Alice"),
authority_keys_from_seed("Bob"),
],
if single_authority {
// single authority allows you to run the network using a single node
vec![authority_keys_from_seed("Alice")]
} else {
vec![
authority_keys_from_seed("Alice"),
authority_keys_from_seed("Bob"),
]
},
// Pre-funded accounts
true,
))
Expand Down
Loading
Loading