Skip to content
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
18 changes: 15 additions & 3 deletions extensions/business/oracle_management/oracle_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,12 @@ def __eth_to_internal(self, eth_node_address):

def __get_signed_data(self, node_addr : str, epochs : list, epochs_vals : list, sign=True, node_addr_eth=None):
"""
Sign the given data using the blockchain engine.
Returns the signature.
Use the data param as it will be modified in place.
Sign the requested node availability range using the blockchain engine.

The EVM signature covers the compact claim payload:
``node_eth_address, from_epoch, to_epoch, packed_availabilities``. The
response also keeps the expanded ``epochs`` and ``epochs_vals`` lists so
API consumers can inspect the oracle data that was packed.

Parameters
----------
Expand All @@ -209,9 +212,15 @@ def __get_signed_data(self, node_addr : str, epochs : list, epochs_vals : list,
)
eth_signature = res["signature"]
inputs = res["eth_signed_data"]
from_epoch = res["from_epoch"]
to_epoch = res["to_epoch"]
packed_availabilities = res["packed_availabilities"]
Comment thread
aledefra marked this conversation as resolved.
else:
eth_signature = []
inputs = []
from_epoch = epochs[0] if len(epochs) > 0 else None
to_epoch = epochs[-1] if len(epochs) > 0 else None
packed_availabilities = "0x"
Comment thread
aledefra marked this conversation as resolved.

eth_signatures = [eth_signature]
eth_addresses = [self.bc.eth_address]
Expand All @@ -226,6 +235,9 @@ def __get_signed_data(self, node_addr : str, epochs : list, epochs_vals : list,
'node_alias': node_alias,
'epochs': epochs,
'epochs_vals': epochs_vals,
'from_epoch': from_epoch,
'to_epoch': to_epoch,
'packed_availabilities': packed_availabilities,

'eth_signed_data' : {
"input" : inputs,
Expand Down
2 changes: 1 addition & 1 deletion ver.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__VER__ = '2.10.218'
__VER__ = '2.10.219'