-
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
[2] Add root chain transaction hash to InvalidExit and UnchallengedExit events #1485
Conversation
…471-byzantine-reporting-enhancements
…471-byzantine-reporting-enhancements
…471-byzantine-reporting-enhancements
…471-byzantine-reporting-enhancements
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.
Great work! I'm picking at the test values - nothing really significant.
apps/omg_watcher/test/omg_watcher/exit_processor/exit_info_test.exs
Outdated
Show resolved
Hide resolved
apps/omg_watcher/test/omg_watcher/exit_processor/exit_info_test.exs
Outdated
Show resolved
Hide resolved
You've said in the comment:
Do cabbage tests still work if |
apps/omg_watcher/test/omg_watcher/exit_processor/exit_info_test.exs
Outdated
Show resolved
Hide resolved
…471-byzantine-reporting-enhancements
The cabbage tests would be persisting |
But does the API still work if they are nil? |
Not sure if I'm addressing your question here but you did draw my attention to one thing. The I just updated the relevant event modules to accept If that is what you meant I believe the API should be good. Not sure if it's worth writing a cabbage test for this but I can simulate locally and confirm. |
Confirming that |
@@ -102,7 +117,9 @@ defmodule OMG.Watcher.ExitProcessor.TestHelper do | |||
competitor_position = Keyword.get(opts, :competitor_position) | |||
|
|||
competitor_position = | |||
if competitor_position, do: Utxo.Position.encode(competitor_position), else: not_included_competitor_pos() | |||
if competitor_position, |
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.
this should have been a case
clause, not an if
The original PR broke the Watcher because existing DB entries did not have newly added keys.
This is the original PR with some additions:
root_chain_txhash
tonil
for previously existing database entries without this key.Test with
mix test test/omg_watcher/exit_processor/exit_info_test.exs
Original PR
#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.