-
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
Making Child-chain work with fee feed #1500
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pnowosie
force-pushed
the
papa/feefeed-demo
branch
from
May 5, 2020 10:35
27022fd
to
771afdb
Compare
pnowosie
force-pushed
the
papa/feefeed-demo
branch
4 times, most recently
from
May 5, 2020 15:02
fb93bd9
to
497d5cd
Compare
pnowosie
force-pushed
the
papa/feefeed-demo
branch
from
May 6, 2020 10:44
fb4b679
to
66542ed
Compare
pnowosie
changed the title
Making Child-chain work with fee feed (UNFINISHED)
Making Child-chain work with fee feed
May 11, 2020
pnowosie
force-pushed
the
papa/feefeed-demo
branch
from
May 11, 2020 08:47
a95b208
to
408f6ee
Compare
Looks good, but don't forget to coordinate with devops team to update the fee file in helm chart. |
mederic-p
approved these changes
May 12, 2020
PR is done "there" ;) Thanks for the remainder! |
pnowosie
force-pushed
the
papa/feefeed-demo
branch
from
May 12, 2020 10:25
408f6ee
to
343151a
Compare
T-Dnzt
approved these changes
May 12, 2020
kalouo
pushed a commit
that referenced
this pull request
May 18, 2020
* config changes * hack: making ch-ch work with feefeed * test: fix tests * chore: restore barebone variables (no feed is running), small linter fixes * test: try to fix ch-ch integration tests * chore: restore deleted `updated_at` field
kalouo
pushed a commit
that referenced
this pull request
May 28, 2020
* add: db-level code for deposit.all endpoint * test: db-level code for deposit.all endpoint * add: api-level code for deposit.all endpoint * test: api-level code for deposit.all endpoint * add: deposit.all endpoint, controller, validator and views * test: deposit.all controller * refactor: length assertion * refactor: get_events spec * migration: initial supporting code * migration: add eth_height to ethevents * refactor and add: supporting code for migration * add: start Ethereumex for migrations * fix: lint * refactor: re-scope modules from "ethevent" to "deposit" above DB. * feat: persist eth_height in deposit event * feat: persist eth_height in standard exit event * tests: reflect addition of eth_height to persisted deposits * refactor: Enum -> Stream * fix: dialyzer spec error * add: db-level code for deposit.all endpoint * test: db-level code for deposit.all endpoint * add: api-level code for deposit.all endpoint * Add timestamp and scheduled finalisation time to InvalidExit and UnchallengedExit events (#1495) * feat: add root_chain_txhash to persistence layer * [ADD]: rc txhash to se_event test helper * add: root_chain_txhash to remaining methods * fix: persistence test * refactor: simply rc txhash creation * add: root_chain_txhash to InvalidExit event * add: root_chain_txhash to UnchallengedExit event * refactor and add dialyzer specs * refactor: add method for txhash creation * remove: pattern match for make_db_update * requested changes * add: random bytes helper * fix: default recently added keys to nil for previously existing values * refactor and move_tests * requested changes [1] * fix: InvalidExit and UnchallengedExit accept nil `root_chain_txhash` * feat: logic for adding sft * add: scheduled_finalization_time to exit events * tests: calculate_sft/4 and add sft to recent keys * fix: dialyzer and remove logging * fix: test setup * refactor: sft contract calls at GenServer level * add: sft to test exit structs * alias nested modules * update: Swagger API specs * add: min_exit_period_seconds to state * add: default min exit period * refactor calculate_sft and remove unused alias * refactor: add child_block_interval to GenServer state * feat: add timestamp to persisted exit struct * fix spec, revert formatting and remove single pipe * fix: lint fail - duplicate keys in struct * requested changes: defguardp, rename arguments and remove arg pattern match * refactor: rename keys and use module struct for exit_info * refactor: remove default min_exit_period & child_block_interval and update tests * Making Child-chain work with fee feed (#1500) * config changes * hack: making ch-ch work with feefeed * test: fix tests * chore: restore barebone variables (no feed is running), small linter fixes * test: try to fix ch-ch integration tests * chore: restore deleted `updated_at` field * test: api-level code for deposit.all endpoint * add: deposit.all endpoint, controller, validator and views * test: deposit.all controller * refactor: length assertion * refactor: get_events spec * migration: initial supporting code * migration: add eth_height to ethevents * refactor and add: supporting code for migration * add: start Ethereumex for migrations * fix: lint * refactor: re-scope modules from "ethevent" to "deposit" above DB. * feat: persist eth_height in deposit event * feat: persist eth_height in standard exit event * tests: reflect addition of eth_height to persisted deposits * refactor: Enum -> Stream * fix: dialyzer spec error * drop root_chain_txhash_event from returned object * refactor: use Repo.stream * add: Repo.transaction * refactor: use of streams (pre-update) * add: DB.Repo.transaction * formatting * fix: add eth_height to exit_consumer_test * test: add eth_height to returned object * add: eth_height to dialyzer spec * add: eth_height to IFEs published to bus * feat: swagger specs for /deposit.all * tests: set async to true * refactor: fetching eth_height as release task instead of migration * tests: for add_eth_height_to_eth_events task * feat: sort eth_events by descending eth_height * fix: test name * fix: lint & license * fix: entrypoint command * refactor: map.take instead of map.drop for clarity * PR review suggested edits * update: @moduledoc * refactor: hex to int conversion * PR review: order private/public functions * PR review: refactor get_deposit to use case statement * PR review: remove single pipe * PR review: update dialyzer spec for get_events * refactor: remove default arguments for get_events * add: test for "lesser" validator * refactor: ethevent variable declaration in insert_exit * update deposit.all parameter validator to require "address" (& update tests) * update get_deposits to require address (& update tests) * update swagger spec to reflect non-optional address parameter * refactor: scope down get_events to get_deposits * some final fixes Co-authored-by: Pawel Nowosielski <pnowosie@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was preparing demo to show Child-chain & Fee Service integration. I discovered that ch-ch can parse slightly different fee rules format that FeeService publishes.
I made just the needed changes to make ch-ch understand rules from feed.
I made tests green.
Also fee rules from FeeService does not fully complies to what was agreed before, ✍️
so I've created an issueFee feed response has been adapted in this PR📋 Add associated issues, tickets, docs URL here.
Overview
I just made the needed changes to make ch-ch understand feed format, and made the tests green.
Changes
JSONFeeParser
&JSONSingleSpecParser
adapted to FeeService returned json structure.Testing
Fixing the current tests