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

Feat/devnet companion/check metadata hash extension #649

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
b43bed6
draft: hotkey swap for senate
Jul 9, 2024
9a179bb
feature-gate hash
camfairchild Jul 12, 2024
5039e5b
use 1.10.0-rc2
camfairchild Jul 12, 2024
322752b
add feature
camfairchild Jul 12, 2024
9d1f6c9
feat: remove schedule coldkey swap
Jul 12, 2024
90512c2
chore: fix tests
Jul 12, 2024
dd87bca
Merge branch 'fix/hotkeyswap_senate' into feat/remove_schedule_coldke…
Jul 12, 2024
606b771
fixes for network resumption
Jul 12, 2024
8ebcf2d
chore: bump spec
Jul 12, 2024
7b84d3c
fix: add back arbitration check
Jul 12, 2024
2455082
fix: hotkey
Jul 12, 2024
f49bb55
fix: coldkey arb swap hotkey
Jul 12, 2024
884a179
Merge pull request #631 from opentensor/feat/remove_schedule_coldkey_…
distributedstatemachine Jul 12, 2024
76f20ce
swap delegate stake also
camfairchild Jul 13, 2024
4ccb879
add test for this
camfairchild Jul 13, 2024
73533b9
swap over stakinghotkeys map
camfairchild Jul 13, 2024
c370aad
check map first
camfairchild Jul 13, 2024
9b8c0e4
add staking hotkeys test
camfairchild Jul 13, 2024
baec581
no take
camfairchild Jul 13, 2024
a84ac6b
keep old stake
camfairchild Jul 13, 2024
221d320
add check to test
camfairchild Jul 13, 2024
f9164fc
fix some tests
camfairchild Jul 13, 2024
2a14df7
fix delegate test
camfairchild Jul 13, 2024
b970f50
update staking hotekys maps
camfairchild Jul 13, 2024
ad57e2b
init
camfairchild Jul 13, 2024
1cc7d3c
comment out
camfairchild Jul 13, 2024
6dcd0a1
add admin swap
camfairchild Jul 13, 2024
f474112
fix swap
camfairchild Jul 13, 2024
b708c1d
..
camfairchild Jul 13, 2024
5b30256
hotkey staking maps fix
Jul 13, 2024
fc245f8
remove staking hotkeys
Jul 13, 2024
494796e
remove commented code
Jul 13, 2024
f041ed9
cargo fmt
sam0x17 Jul 13, 2024
54ec750
cargo fix --workspace
sam0x17 Jul 13, 2024
ca51109
bump spec_version to 165
sam0x17 Jul 13, 2024
4dafd88
swap hotkey benchmark removed
Jul 15, 2024
d95a7df
add migration and tests for total coldkey hotfix
Jul 15, 2024
5e6fc7e
adds new test for missing hotkey value
Jul 15, 2024
3c61aa8
bump migration values
Jul 15, 2024
ff23b6f
fmt
Jul 15, 2024
78a71f9
lock file update
camfairchild Jul 15, 2024
fc0ccbd
add production just target
camfairchild Jul 15, 2024
b09b3e6
fmt
camfairchild Jul 15, 2024
0c2ad41
Merge pull request #636 from opentensor/total_coldkey_migration
unconst Jul 15, 2024
7364832
clippy
camfairchild Jul 16, 2024
64aca95
benchmarking fix
camfairchild Jul 16, 2024
b3fa487
feat: try runtime passing
Jul 16, 2024
8766c98
chore: remove commented code
Jul 16, 2024
92fc1f0
chore: make logs human readable
Jul 16, 2024
c255d92
chore: remove comments
Jul 16, 2024
0478596
Update pallets/subtensor/src/lib.rs
distributedstatemachine Jul 16, 2024
5adbbd9
Merge pull request #644 from opentensor/hotfix/storage_version_incons…
distributedstatemachine Jul 16, 2024
9ec6c4e
fmt
camfairchild Jul 16, 2024
893b1ec
use rc3 with new fix polkadot-sdk/pull/4117
camfairchild Jul 18, 2024
237634c
incl lock
camfairchild Jul 18, 2024
c80df3d
bump CI
sam0x17 Jul 18, 2024
4a4adfd
Merge branch 'main' into feat/check-metadata-hash-extension
camfairchild Jul 18, 2024
0c28f29
Merge branch 'devnet-ready' into feat/devnet-companion/check-metadata…
camfairchild Jul 19, 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
485 changes: 277 additions & 208 deletions Cargo.lock

Large diffs are not rendered by default.

139 changes: 70 additions & 69 deletions Cargo.toml

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,8 @@ lint:
@echo "Running cargo clippy with automatic fixes on potentially dirty code..."
just clippy-fix
@echo "Running cargo clippy..."
just clippy
just clippy

production:
@echo "Running cargo build with metadata-hash generation..."
cargo +{{RUSTV}} build --profile production --features="runtime-benchmarks metadata-hash"
1 change: 1 addition & 0 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ sp-io = { workspace = true }
sp-timestamp = { workspace = true }
sp-inherents = { workspace = true }
sp-keyring = { workspace = true }
frame-metadata-hash-extension = { workspace = true }
frame-system = { workspace = true }
pallet-transaction-payment = { workspace = true }
pallet-commitments = { path = "../pallets/commitments" }
Expand Down
2 changes: 2 additions & 0 deletions node/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ pub fn create_benchmark_extrinsic(
pallet_transaction_payment::ChargeTransactionPayment::<runtime::Runtime>::from(0),
pallet_subtensor::SubtensorSignedExtension::<runtime::Runtime>::new(),
pallet_commitments::CommitmentsSignedExtension::<runtime::Runtime>::new(),
frame_metadata_hash_extension::CheckMetadataHash::<runtime::Runtime>::new(true),
);

let raw_payload = runtime::SignedPayload::from_raw(
Expand All @@ -152,6 +153,7 @@ pub fn create_benchmark_extrinsic(
(),
(),
(),
None,
),
);
let signature = raw_payload.using_encoded(|e| sender.sign(e));
Expand Down
3 changes: 3 additions & 0 deletions runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ pallet-timestamp = { workspace = true }
pallet-transaction-payment = { workspace = true }
pallet-utility = { workspace = true }
frame-executive = { workspace = true }
frame-metadata-hash-extension = { workspace = true }
sp-api = { workspace = true }
sp-block-builder = { workspace = true }
sp-consensus-aura = { workspace = true }
Expand Down Expand Up @@ -111,6 +112,7 @@ std = [
"codec/std",
"scale-info/std",
"frame-executive/std",
"frame-metadata-hash-extension/std",
"frame-support/std",
"frame-system-rpc-runtime-api/std",
"frame-system/std",
Expand Down Expand Up @@ -204,3 +206,4 @@ try-runtime = [
"pallet-commitments/try-runtime",
"pallet-registry/try-runtime"
]
metadata-hash = ["substrate-wasm-builder/metadata-hash"]
11 changes: 10 additions & 1 deletion runtime/build.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
fn main() {
#[cfg(feature = "std")]
#[cfg(all(feature = "std", not(feature = "metadata-hash")))]
{
substrate_wasm_builder::WasmBuilder::new()
.with_current_project()
.export_heap_base()
.import_memory()
.build();
}
#[cfg(all(feature = "std", feature = "metadata-hash"))]
{
substrate_wasm_builder::WasmBuilder::new()
.with_current_project()
.export_heap_base()
.import_memory()
.enable_metadata_hash("TAO", 9)
.build();
}
}
1 change: 1 addition & 0 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1282,6 +1282,7 @@ pub type SignedExtra = (
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
pallet_subtensor::SubtensorSignedExtension<Runtime>,
pallet_commitments::CommitmentsSignedExtension<Runtime>,
frame_metadata_hash_extension::CheckMetadataHash<Runtime>,
);

type Migrations = pallet_grandpa::migrations::MigrateV4ToV5<Runtime>;
Expand Down
2 changes: 1 addition & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
cargo build --profile production --features runtime-benchmarks
cargo build --profile production --features "runtime-benchmarks metadata-hash"

Loading