Skip to content
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

Revert "Remove validators registation, rewards voting (#151)" #153

Merged
merged 1 commit into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading