You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feat: Conditionally add weight to DB only if the operator is active
Fix: Update operator.total_stake after restaking changes
Fix: correctly manage operator unregistration
Test
Follow the usual steps to get aligned up and running. These are:
Each command with a number is meant to be run on a separate terminal instance/tab.
Starts anvil
make anvil_start_with_block_time
On another Starts the aggregator
make aggregator_start
Registers and starts the operator:
make operator_register_and_start
Start Explorer
For better test experience, you should change the following code line:
In explorer/lib/explorer/periodically.ex
Line 20, change from: :timer.send_interval(one_second * seconds_in_an_hour, :restakings) # every 1 hour
to :timer.send_interval(one_second * 30, :restakings) # every 30 seconds
Now, you can run_explorer
make run_explorer
(On Another Tab) Fetch old operator changes in explorer
make explorer_fetch_old_operators_strategies_restakes
You will know this script is done when you are handed control over the iex (interactive elixir console). You will get control with the classic > symbol.
You can close this interactive console by pressing ctrl + c twice.
After this script, you should be able to see the new, updated, Total Active Operators value in the Explorer.
To disable an operator, you must eject it.
For this, you can must run the following command:
After ejecting an Operator, his status should change to disabled, and his stake go down to 0, as well as the total Stake should decrement accordingly.
You can also run more than 1 operator, and eject only 1, to see values change accordingly.
To run more than 1 operator, you can change line 5 of Makefile to the following:
This file contains hidden or 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
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.
Changes
Test
Follow the usual steps to get aligned up and running. These are:
Each command with a number is meant to be run on a separate terminal instance/tab.
For better test experience, you should change the following code line:
In
explorer/lib/explorer/periodically.exLine 20, change from:
:timer.send_interval(one_second * seconds_in_an_hour, :restakings) # every 1 hourto
:timer.send_interval(one_second * 30, :restakings) # every 30 secondsNow, you can run_explorer
You will know this script is done when you are handed control over the
iex(interactive elixir console). You will get control with the classic>symbol.You can close this interactive console by pressing
ctrl + ctwice.After this script, you should be able to see the new, updated,
Total Active Operatorsvalue in the Explorer.To disable an operator, you must
ejectit.For this, you can must run the following command:
cast send \ 0x851356ae760d987E095750cCeb3bC6014560891C \ --rpc-url localhost:8545 \ "ejectOperator(address, bytes)" 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 0x00 \ --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80After ejecting an Operator, his status should change to disabled, and his stake go down to 0, as well as the total Stake should decrement accordingly.
You can also run more than 1 operator, and eject only 1, to see values change accordingly.
To run more than 1 operator, you can change line 5 of
Makefileto the following:And then on another terminal: