near-wallet
near-wallet copied to clipboard
Allow to stake for arbitrary pool
Currently in the staking UI https://wallet.near.org/staking/validators there a input box that one can type any pool name... But it doesn't allow to stake to valid pools.
Currently there is no way to stake to pools that are not active validators.
If you user typed a valid pool name (e.g. right now it's ending to poolv1.near, but even better is to validate with our whitelist contract) - it should show up as an option to stake.
I think @mattlockyer already has fixed this, e.g. I just staked to inactive validators here: https://explorer.near.org/transactions/5aqxXJ7GZ8n9QvLr9i19xXidttfyC6Epny9dBD91fUFo
I think there are still some requirements. I assume validator needs to be in the list of proposals at least (i.e. actively trying to become a validator). @ilblackdragon Is there any reason to consider pools outside of proposals as well?
Validators who have NEVER made it to the active set / proposals are still unable to be staked to.
A simple fix when the user enters validator in the UI input form and it resolves to nothing in the set of validators in redux state.
We can fire a custom search of the whitelist for this validator and if it comes back true we can add them to the set in the redux state.
Then they will appear (after a short pause of not appearing) and be shown as "inactive".
Why not just pull the list from the whitelist in the first place for a full list and show the ones that are not actively as inactive?
On Wed, Jan 20, 2021 at 8:40 PM Matt Lockyer [email protected] wrote:
Validators who have NEVER made it to the active set / proposals are still unable to be staked to.
A simple fix when the user enters validator in the UI input form and it resolves to nothing in the set of validators in redux state.
We can fire a custom search of the whitelist for this validator and if it comes back true we can add them to the set in the redux state.
Then they will appear (after a short pause of not appearing) and be shown as "inactive".
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/near/near-wallet/issues/1332#issuecomment-764289850, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABK27VH6IL2XEZRAGJIOJTS26V4ZANCNFSM4VQKBLDA .
-- Best regards, Illia Polosukhin
Only have support to check accountId is whitelisted: https://github.com/near/core-contracts/tree/master/whitelist
You can query it like this
http post http://rpc.mainnet.near.org method=query
params:='{"request_type": "view_state", "finality": "final", "account_id":
"lockup-whitelist.near", "prefix_base64": "d2k"}' jsonrpc=2.0 id=123
On Sat, Jan 23, 2021 at 7:25 AM Matt Lockyer [email protected] wrote:
Only have support to check accountId is whitelisted: https://github.com/near/core-contracts/tree/master/whitelist
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/near/near-wallet/issues/1332#issuecomment-766095698, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABK27WTRHQXZJ44XTB4LJ3S3LS5BANCNFSM4VQKBLDA .
-- Best regards, Illia Polosukhin
BTW viewState
already available in near-api-js
https://github.com/near/near-api-js/blob/dbfc6050f9fc273c65fc8415f007ce90dbc4c1e7/src/account.ts#L395
This feature will become important as soon as we'll have the new validator selection algorithm, as recently introduced by @bowenwang1996 It will escalate to P2 and P1 (even P0) since is a future blocker for smaller validators who need stake
@ilblackdragon @mattlockyer I'm sorry to hijack this thread but is there a similar contract to the lockup-whitelist.near
on the testnet? I found one named whitelist
but it seems like it returns false
for most of testnet validators? 🤔