-
Notifications
You must be signed in to change notification settings - Fork 59
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
Add root chain transaction hash to InvalidExit and UnchallengedExit events #1479
Conversation
…471-byzantine-reporting-enhancements
…471-byzantine-reporting-enhancements
apps/omg_watcher/test/omg_watcher/exit_processor/persistence_test.exs
Outdated
Show resolved
Hide resolved
…471-byzantine-reporting-enhancements
Also added dialyzer specs in |
} | ||
|
||
def new(contract_status, %{eth_height: eth_height, call_data: %{output_tx: txbytes}, exit_id: exit_id} = event) do | ||
@spec new(map(), map()) :: t() | ||
def new(contract_status, event) do |
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.
wait... this input is not a struct. it's a map. Who is calling this?
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.
my comment (to use a dot
access modifier was strictly for internal type structs ExitInfo
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.
clear reverted back thanks
is_binary(currency) and is_binary(owner) and is_integer(exit_id) and is_binary(exiting_txbytes) and | ||
is_boolean(is_active) do | ||
@spec make_db_update({Utxo.Position.t(), t()}) :: Utxo.Position.db_t() | ||
def make_db_update({position, event}) do |
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.
def make_db_update({position, event}) do | |
def make_db_update({position, exit_info}) do |
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.
Both make sense to me but exit_info
is clearer. Changed in other methods for consistency except using exit_event
for new/2
#1480
Overview
This adds a
rootchain_txhash
property to theinvalid_exit
andunchallenged_exit
events, referring to the Ethereum transaction hash of the exit in question.As seen by running the cabbage tests locally:
Changes
exit_processor/exit_info.ex
to persist the root chain transaction hash in the database.omg_watcher/event.ex
to add root chain transaction hash to the event struct.Testing
<<0::256
. Open question whether we'd like a more advanced logic there in this PR.Note to @DmitryDao to update documentation here and here once this is merged.