Skip to content

Commit

Permalink
Revert "Remove validators registation, rewards voting (#151)"
Browse files Browse the repository at this point in the history
This reverts commit e6175d5.
  • Loading branch information
cyc60 committed Aug 24, 2023
1 parent e6175d5 commit 6446c57
Show file tree
Hide file tree
Showing 26 changed files with 1,602 additions and 28 deletions.
85 changes: 85 additions & 0 deletions oracle/keeper/contracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ def get_oracles_contract(web3_client: Web3) -> Contract:
"stateMutability": "view",
"type": "function",
},
{
"inputs": [],
"name": "currentValidatorsNonce",
"outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
"stateMutability": "view",
"type": "function",
},
{
"inputs": [
{"internalType": "address", "name": "account", "type": "address"}
Expand Down Expand Up @@ -104,5 +111,83 @@ def get_oracles_contract(web3_client: Web3) -> Contract:
"stateMutability": "nonpayable",
"type": "function",
},
{
"inputs": [
{
"internalType": "uint256",
"name": "totalRewards",
"type": "uint256",
},
{
"internalType": "uint256",
"name": "activatedValidators",
"type": "uint256",
},
{
"internalType": "bytes[]",
"name": "signatures",
"type": "bytes[]",
},
],
"name": "submitRewards",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function",
},
{
"inputs": [
{
"components": [
{
"internalType": "address",
"name": "operator",
"type": "address",
},
{
"internalType": "bytes32",
"name": "withdrawalCredentials",
"type": "bytes32",
},
{
"internalType": "bytes32",
"name": "depositDataRoot",
"type": "bytes32",
},
{
"internalType": "bytes",
"name": "publicKey",
"type": "bytes",
},
{
"internalType": "bytes",
"name": "signature",
"type": "bytes",
},
],
"internalType": "struct IPoolValidators.DepositData[]",
"name": "depositData",
"type": "tuple[]",
},
{
"internalType": "bytes32[][]",
"name": "merkleProofs",
"type": "bytes32[][]",
},
{
"internalType": "bytes32",
"name": "validatorsDepositRoot",
"type": "bytes32",
},
{
"internalType": "bytes[]",
"name": "signatures",
"type": "bytes[]",
},
],
"name": "registerValidators",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function",
},
],
)
1 change: 1 addition & 0 deletions oracle/keeper/health_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ async def health(request):
get_oracles_votes(
web3_client=web3_client,
rewards_nonce=params.rewards_nonce,
validators_nonce=params.validators_nonce,
oracles=params.oracles,
)

Expand Down
11 changes: 11 additions & 0 deletions oracle/keeper/typings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,19 @@

from eth_typing import ChecksumAddress

from oracle.oracle.distributor.common.types import DistributorVote
from oracle.oracle.rewards.types import RewardVote
from oracle.oracle.validators.types import ValidatorsVote


class Parameters(NamedTuple):
rewards_nonce: int
validators_nonce: int
paused: bool
oracles: List[ChecksumAddress]


class OraclesVotes(NamedTuple):
rewards: List[RewardVote]
distributor: List[DistributorVote]
validators: List[ValidatorsVote]
Loading

0 comments on commit 6446c57

Please sign in to comment.