-
Notifications
You must be signed in to change notification settings - Fork 175
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
Add #[precompile::view]
attribute to getTotalColdkeyStake
and getTotalHotkeyStake
#1346
Open
Shr1ftyy
wants to merge
4
commits into
opentensor:devnet-ready
Choose a base branch
from
Shr1ftyy:devnet-ready
base: devnet-ready
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3
−1
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* fix migration test * cargo fmt * fix root * cargo fmt * add moving price to metagraph * use correct min burn init (opentensor#1265) * use correct min brun init * fmt * no into * no into 2 * bump spec * cargo update to fix cargo audit vulnerabilities * bump spec version * moving price init from emission * cargo fmt * bump spec version * commit Cargo.lock * cargo clippy * cargo fmt * DefaultMinimumPoolLiquidity and tempos in rao migration * update readme of support of M series macs * bump runtime version * add tao_emission to stakeinfo runtime * Refactor staking and neuron precompile with precompile-utils * remove call from coinbase. already in block_step * add negation for pow-reg-allowed * only root can set min pow diff * oops * dont let ck-in-swap-sched move any stake/register * add tests for validation filter * add transfer stake to call nontransfer proxy filter * also add proxy filters for new calls * update staking priority * bump spec * use get_priority_staking for all stake operations * bump spec * clippy * Remove ownership check from transition stake validation * Fix number conversion issues in staking precompile * max the price for EMA calc at 1.0 * uncommitted lockfile change * bump spec version * fix merge conflicts * add CI action that requires clean merges between all named branches * Refactor neuron precompil - introduce PrecompileHandle and Precompile trait extensions * fix * fixes * try again * fix again * fix * fix * stop needless wasting of CI hours with on push triggers we don't need * Refactor metagraph precompile * fix try runtime endpoints * fix * provide an identity for github action to prevent failure * bump CI * only run non-devnet try runtime if we are targeting devnet/testnet/main * tweak * Add serve_axon extrinsic validation * Bump spec version * Check IP validity in serve_axon validation first * make set diff only root * add test for set diff no owner * add migration for min diff * bump spec * only allow top-stake SN owner hk to stay immune * add tests * only allow replace non-top-stake owner hk * bump spec * add tests using SubnetOwnerHotkey * add impl for replace neuron * add swap test * add neuron prune impl * add swap hotkey impl * clippy * clippy * mistake in test * add some tests * add stake ext test * add move_stake tests * cargo lock * bump spec * clpy * use bool return type * clpy * add higher liquidity on mvoe stake tests * Refactor subnet precompile * Reformat * Update spec version * Fix commit_hash type in Neuron::commit_weights precompile * Prevent precision errors in share pool * Fix unstaking 99.999% and add tests * Fix event and logging in unstake_from_subnet * only update tx rate limit *after* ensure * add test and sn-owner-chk impl * Fix build * use is ok and * Bump spec version * Update primitives/share-pool/src/lib.rs Co-authored-by: Cameron Fairchild <[email protected]> * Update pallets/subtensor/src/tests/staking.rs Co-authored-by: Cameron Fairchild <[email protected]> * Remove unused variable * Add test_get_shares_per_update * try it again * use latest rust-cache version * improve spec version check cache performance * try busting cache * it worked 🔥 * use better rust cache throughout CI + clean up CI * install rust nightly for cargo fmt * whoops * fix * try re-enabling finney try truntime * Update pallets/subtensor/src/tests/staking.rs Co-authored-by: Cameron Fairchild <[email protected]> * fix * add get value using current_shares arg * make delegate info useful again * return different format for get delegated * remove CODEOWNERS file so we can do green merges * bump CI * Set initial tempo to 360 * set equal in mock * add test for weights rate limit v tempo * make fields pub for testing * sub out root divs to get alpha divs * bump spec version to 241 * const fixes * cargo clippy * Add dest hotkey check and test * Remove the commented test * Bump spec version * use rust 1.85.0 * upgrade to Rust 2024 Edition 🎉 * whitelist clippy useless conversion warning * cargo fmt * passes clippy * Remove in/out peers args from docker compose * fix test * Update chainspecs * Remove Stake map - in progress (tests broken) * become delegate on every add_stake op * bump spec * Fix tests * Fix clippy * add root set sn moving alpha * fmt * fix test * fixes GH opentensor#1330 * bump spec * add a rate limit-set on decrease take (avoids close increase) * add test * add call to associate hk * update comment from PR1335 * bump spec version --------- Co-authored-by: unconst <[email protected]> Co-authored-by: Unconst <[email protected]> Co-authored-by: Cameron Fairchild <[email protected]> Co-authored-by: Greg Zaitsev <[email protected]> Co-authored-by: Prakash <[email protected]> Co-authored-by: open-junius <[email protected]> Co-authored-by: ibraheem-opentensor <[email protected]> Co-authored-by: Aliaksandr Tsurko <[email protected]> Co-authored-by: John Reed <[email protected]> Co-authored-by: camfairchild <[email protected]> Co-authored-by: gztensor <[email protected]> Co-authored-by: camfairchild <[email protected]>
- added view attribute to getTotalColdkeyStake and getTotalHotkeyStake functions
camfairchild
approved these changes
Feb 27, 2025
can you please merge latest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
These functions in the staking precompile (which I added, and also got recently merged in 😭) cannot be called from within static contexts (i.e.
view
andpure
) functions, even though they do not actually modify state. This PR addresses this issue.Related Issue(s)
getTotalColdkeyStake
andgetTotalHotkeyStake
can't be called from within static contexts #1345Type of Change
Breaking Change
If this PR introduces a breaking change, please provide a detailed description of the impact and the migration path for existing applications.
Checklist
cargo fmt
andcargo clippy
to ensure my code is formatted and linted correctly