-
Notifications
You must be signed in to change notification settings - Fork 5
Conversation
…y-actors into main
…y-actors into main
…y-actors into main
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Let's maybe call it ValidatorInfo
instead of ValidatorDetails
if you don't mind.
src/SubnetActor.sol
Outdated
@@ -305,7 +311,7 @@ contract SubnetActor is ISubnetActor, ReentrancyGuard, Voting { | |||
|
|||
/// @notice get all the validators in the subnet. | |||
/// TODO: we can introduce pagination | |||
function getValidators() external view returns (address[] memory) { | |||
function getValidators() public view returns (address[] memory) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why changing external
to public
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's called in the getValidatorsInfo
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed back to external
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should increase the config number also when the stake of a validator that is already part of the subnet changes. And the sequence number only increases, even when a validator leaves.
@@ -50,6 +50,9 @@ contract SubnetActor is ISubnetActor, ReentrancyGuard, Voting { | |||
/// @notice Minimal number of validators required for the subnet to be able to validate new blocks. | |||
uint64 public immutable minValidators; | |||
|
|||
/// @notice Sequence number that uniquely identifies a validator set. | |||
uint64 public configurationNumber; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be cleaner to include the configuration number in a struct aggregating all validator information, but I guess for now this is good enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created that struct, we can migrate to use that struct later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now!
* support f1 address * Fix reentrancy vulnerabilities (#115) Fix reentrancies * Change intro (#118) * Minor gas optimisations (#112) minor gas optimisations * Use logical if statements (#113) use logical if statements * Make gateway address immutable (#110) Make gateway addr immutable * Enable basic linting (#116) * Enable basic linting * add config for mythrill * Run tests on Github Actions (#119) * Run tests * add info * triage findings * rename private vars * fix if statements * Fix reentrancy (#114) * fix reentrancy * Update src/Gateway.sol * add a comment * fix format --------- Co-authored-by: adlrocha <6717133+adlrocha@users.noreply.github.com> * Check gateway address (#109) * check gateway address * check subnet address * check actor address * Optimise loop (#123) * Optimise loop * Fix several if stmts * Rename params to fix slither issues * Add codespell (#122) * Remove unused constants and fix Makefile (#121) * remove unused fvm-related constants * fix makefile * Fix bottom-up nonce and new test (#124) fix bottomup nonce and new tets * Use the same Solidity version (#111) use the same Solidity version * Update contract dependencies (#117) * Update contract dependencies * upgrade solidity to 0.8.19 --------- Signed-off-by: Alfonso de la Rocha <adlrocha@tutamail.com> Co-authored-by: Alfonso de la Rocha <adlrocha@tutamail.com> * linter for address * Improved subnet registry (#127) * improved subnet registry * Update SubnetRegistry.sol * Migrate bottom up checkpoints query to subnet actor (#130) migrate bottom up checkpoints query to subnet actor --------- Co-authored-by: Denis Kolegov <dnkolegov@gmail.com> Co-authored-by: cryptoAtwill <108330426+cryptoAtwill@users.noreply.github.com> --------- Signed-off-by: Alfonso de la Rocha <adlrocha@tutamail.com> Co-authored-by: Denis Kolegov <dnkolegov@gmail.com> Co-authored-by: adlrocha <6717133+adlrocha@users.noreply.github.com> Co-authored-by: Alfonso de la Rocha <adlrocha@tutamail.com>
Signed-off-by: Alfonso de la Rocha <adlrocha@tutamail.com>
List the details of validators and support configuration number.