Skip to content

Commit

Permalink
Merge updates from master to master-v2 (#1802)
Browse files Browse the repository at this point in the history
* /block.validate endpoint (#1668)

* feat: init block.validate

* completes parameter validation tests

* rename validation method with stronger typing

* feat: verify_transactions and and negative test

* add: positive test for verify_transactions

* chore: remove single pipes

* verify_transactions: add @SPEC and @doc

* pending

* test: Added tests for `verify_merkle_root/1`

* remove reverse operation

* refactor: simplify tests

* refactor: simplify verify_merkle_root/1 tests

* refactor: merkle validation tests + entities as module attributes

* add dialyzer spec and remove argument pattern matching

* move logic to dedicated validator module

* test: added test for `block.validate` endpoint

* refactor: make tests pass

* feat: response for `validate_block` view

* feat: error for mismatched_merkle_root

* simplify tests

* rename error

* remove unused method

* fix: error name

* fix: credo

* merge issue: gitmodules

* merge master issue: gitmodules [2]

* merge master issue: gitmodules [3]

* Merge branch 'ripzery/block.validate' of https://github.com/omisego/elixir-omg into ripzery/block.validate

* (re)delete specs

* return submodule

* refactor: decouple verify_merkle_root from transaction recovery

* add: negative test for invalid transactions

* refactor: improve performance of verify_transactions

* use pin operator instead of comparison

* refactor: remove use of & &1. for clearer syntax

* remove redundant comment

* move block validation logic into Watcher

* move parameter validation logic into BlockConstraints

* reflect file changes in controller

* refactor: make verification functions private and shift tests to stateless_validate/1

* fix potential false positive by computing Merkle root correctly.

* add: swagger specs

* refactor: endpoint to return boolean result

* add: nil error

* update documentation to reflect boolean result

* remove error reason in response

Co-authored-by: euro <[email protected]>
Co-authored-by: Ayrat Badykov <[email protected]>

* feat: configurable DB pool size, queue target and queue interval (#1689)

* feat: configurable DB pool size, queue target and queue interval

* fix: add release task to release config

* style: mix format

* feat: configure runtime env vars through releases.exs

* fix: remove release tasks

* fix: syntax

* docs: add docs for db pool env vars

* feat: auto trigger chart version bump (#1695)

* feat: add increase chart version script and job

* feat: filter release tag on CI config

* fix: make increase chart script work

* test: docker image

* feat: add watcher&watcher-info on increase version

* chore: remove commented configs and back to non-playground

* fix: extra space

* Block Validation: New Checks (#1693)

* feat: transaction counting and block-level duplicate input verification in block validation

* fix: dialyzer error

* fix: credo error

* feat: validate fee transactions in block

* test: fee transaction validation

* revert fee logic meant to be stateful

* remove: fee claimer check

* fix: place dummy fee claimer

* test names

* refactors: simplify duplicate input verification, use guards, etc.

* PR review: description changes

* fix: credo

* simplify duplicate input checking

* update documentation

* fix: dialyzer

* spacing

* suggested edits

* feat: block queue metrics and stalled submission alarm (#1649)

* feat: change block formation log from debug to info

* feat: BlockQueue publishes :block_submitting and :block_submitted events

* feat: BlockQueue.Monitor that raises/clears :block_submission_stalled alarm

* refactor: tracks root chain height directly from the bus

* refactor: revert variable naming

* fix: remove remaining EtherereumHeight.get()

* fix: typespec

* feat: add telemetry and statsd metric for blknum_submitting and blknum_submitted

* feat: add telemetry and statsd metric for blocks_submitting and blocks_stalled

* fix: rename :block_submission to :block_submission_gas

* feat: add statsd metric for :block_submission_success

* fix: remove non services

* docs: clearer explanation of block queue metrics

* docs: more explanation on event publishing

* feat: add :block_submission_attempt statsd metric

* fix: dialyzer

* feat: block submission stall config and supervisor setup

* format: formatting and naming alignment

* test: add BlockQueue.Monitor test

* refactor: shorten config name

* test: fix tests

* fix: broken service startup

* feat: configurable block submit stall from env var

* fix: move config namespace

* refactor: brackets everywhere

* fix: config naming

* fix: wrong namespace

* test: fix app name

* test: fix init

* refactor: use :block_submit_stalled everywhere

* fix: ignore unrelated events

* fix: telemetry deprecation

* fix: remove misleading metric :block_queue_num_blocks_submitting due to the way block submission sampling works

* fix: remove dup geth argument

* fix: remove unused block_submit_stall_check_interval_ms

* refactor: add alarm function naming

* refactor: reduce alarm function pattern matching cases

* refactor: move release task to releases.exs

* fix: remove obsolete tests

* feat: handle in-flight exits deletions (#1701)

* move omg_performance json rpc tests to perf project (#1691)

* chore: add feefeed docker to elixir-omg setup (#1700)

* add feefeed adapter

* change ip

* add feefeed url

* fix test barebone release

* fix port

* remove override variable from barebone config

* chore: use https instead of gits to avoid permission issue

* test: update to cabbage using fee api

* fix: git submodule without --remote flag

So it would not always pull the head branch from remote.

* fix: update cabbage to fix reorg

* fix: circle ci mis-comment

* chore: add healthcheck and depends on for services

and mock off other tests aside from reorg

* chore: sync with cabbage update

* chore: add space before network

* chore: ignore geth folder

* debug: comment out make docker steps

* chore: update priv/perf for debug docker-compose pull

* debug: use feefeed-dev with more logging

* debug: use newer feefeed docker that fixes a bug

* chore: update cabbage commit

* chore: uncomment the commented CI jobs

* chore: update latest cabbage

* style: docker file space

* fix: all docker images command have dockerhub authenticate

* chore: update cabbage for code review

* fix: circle ci login to dockerhub

and update cabbage commit

* fix: fee for perf tests

- set in the test config to use the new fee amount 75
- for LoadTest.Common, pass in the fee_amount and use the value from config

* chore: back to feefeed:latest image

* style: mix format

* refactor: move docker_login out from make_docker_images

Logic-wise it does not make much sense actually to be together.

* chore: update cabbage to latest

* style: fix lint

* chore: update cabbage commit

* chore: use master from cabbage

* chore: bring back submodule udpate --remote

This is just better. change the branch in submodele file instead for testing.

Co-authored-by: jarindr <[email protected]>

* feat: reintroduce automated changelog (#1708)

* feat: reintroduce github_changelog_generator

* feat: more changelog tags

* feat: wholly configuring the changelog sections

* feat: changelog label auto checker

* refactor: better review messages

* debug: apply workflow on all branches to check it's working

* fix: bad env format

* fix: wrong job name

* fix: missing closing quote

* fix: bad syntax

* fix: enable shell tracing

* fix: premature failure

* fix: remove extra full stop

* debug: reenable label check only for master

* fix: missing line break escape

* refactor: use Github's default env vars for its url building

* feat: fail the github action instead of relying on a bot

* fix: remove continue-on-error

* fix: combine github action steps so it's easier to find the original error

* feat: echo error

* fix: proper error

* fix: syntax

* fix: force exit on error [ciskip]

* fix: operator precedence

* fix: ignore block_submitting that are above mined blocks (#1703)

* fix: fix in-flight exit deleted bug and add tests (#1714)

* revert: reverts ife deletion commits (#1725)

* Revert "fix: fix in-flight exit deleted bug and add tests (#1714)"

This reverts commit f302553.

* Revert "feat: handle in-flight exits deletions (#1701)"

This reverts commit b3081f8.

* Allow to run docker-compose without feefeed docker (#1726)

* refactor: abstract steps in circle ci to make file for perf

* chore: seperate docker-compose file for feefeed

to allow public contributor to run without feefeed docker

* fix: make start-services command with feefeed

* refactor: move mix format for api generated code back to CI

* debug: add debug CI workflow

* style: simplify docker-compose file

* debug: add log service command to perf

* do not set env var in makefile

* back to run whole workflow

* refactor: COMPOSE_FULL_SERVICES in makefile

* chore: spaces instead of tab in .gitmodules

* add test for 64_000 txs block hash (#1729)

* rm mix based chch (#1716)

machine

module rename

dont cache

install linux deps

sleep

postgres

child chain url and childchain empty fees

* Inomurko/remove child chain (#1737)

* rem childchain code

* erlexec

* fixtures inclusion

* revert cabbage and api client generation from omg v1 childchain

* we dont need wget anymore

* feat: handle in-flight exits deletions

* move dev env deployment job to helm repo (#1738)

* feat: trigger increase chart version on merge to master

* debug: switch to playground repo

And allow circle ci to run on non-master

* fix: unbound string

* feat: add jitter to the call

* remove jitter, not useful

* chore: cleanup

Uncomment CircleCI jobs, remove deployment jobs/scripts, not using playground repo

* fix: circle ci format

* fix: notifiy service do not wait for non-existing deployment job

* chore: remove childchain master deployment

Responsibility has been moved to omg-childhchain-v1 repo.
Have another PR for that: omgnetwork/omg-childchain-v1#15

* chore: remove childchain release from elixir-omg

Moved to omg-childchain-v1.

* fix: handle metrics for in flight exit deleted processor (#1742)

* Kevsul/standard exit perf test (#1732)

* tests: add load test for standard exits

* tests: add watcher status scenario

* tests: standard exit test syncs with watcher

* tests: revert test fee_amount

* tests: add max num retries when waiting

* tests: remove FundAccountRootchain scenario

* tests: change if to case

* Chore: try to fix flaky reorg tests (#1739)

Two kinds of errors I saw:
1. Tests are timing out during account creation and unlocking on both geth nodes. After I increased timeout for account creation, I haven't seen this error anymore
2. Tests are failing with wrong balances (on the childchain and the rootchain). I added additional checks to the reorg function to make sure nodes have the same latest block after reorg. I think it helped but still, tests are failing sometimes.

* update change log v1.0.4 (#1731)

* update changelog

* manual fix change log

* more manual fix change log

* Update VERSION

Co-authored-by: Unnawut Leepaisalsuwanna <[email protected]>

* Chore: parallelize tests by tags (#1744)

* parallelize tests by tags

* Chore: use exexec from upstream (#1743)

* use exexec from upstream

* fix: recheck PR label on synchronize and reopen (#1748)

* fix: recheck PR label on synchronize and reopen

* test: a pointless commit to check that the enforce-changelog-label job still passes

* debug: try the fixed feefeed

* Revert "debug: try the fixed feefeed"

This reverts commit a35fc90.

* feat: add deposits performance tests bot (#1745)

* feat: transaction.create optimisation (#1683)

* test: Init

* test: create `generate_utxos_map/3`

* test: put test in describe

* test: added `needed_funds/2` tests

* add tests and light refactor for get_sorted_grouped_utxos

* add tests and light refactor [2]

* test: refactor `create_advice/2`

* add spec and clarify funds_sufficient

* refactor: `needed_funds`

* refactor: use shorthanded type

* Add @doc  and readabilty edits

* add: tests for funds_sufficient/1

* refactor: simplify use of 'alice'

* refactor: move test inside describe

* test: add `select_utxo/2` tests

* refactor: remove extra line

* fix: spec

* feat: implement `add_merge_utxos`

* test: add test for `add_merge_utxos/2`

* feat: add prioritize_merge_utxos/2

* test: add test for `prioritize_merge_utxos/2`

* refactor: pipe one more time

* refactor and spec stealth merge

* refactor: test name

* add: tests and doc for `add_utxos_for_stealth_merge`

* feat: integrate add_merge_utxos to create_advice

* test: add test for create_advice

* add: doc content for add_utxos_for_stealth_merge

* refactor and test prioritisation of UTXOs for stealth merge

* refactor: split transaction operation

* Fix dialyzer type

* refactor: dialyzer

* fix: typo

* test: add utxo_selection test

* debug: transaction create

* feat: handle when original inputs are empty

* tests: remove transaction merge tests

* tests: add tests for utxo selection

* tests: handle when too many inputs to satisfy payments and fee

* refactor: remove todo

* feat: move `create_advice` from `utxo_selection.ex` to  `transaction.ex` and rename it to `create_inputs`

* test: add transaction tests

* test: change port `9657` to `9656`

* cleanup: remove unused var

* lint: remove @doc for defp

* test: revert back port `9656` to `9657`

* lint: fix lint

* refactor: remove result from response

* test: add prepare_test_server

* refactor: fix per reviews

* tests: add test case where 2 input use different currencies

* refactor: remove alice, bob from test context

* test: fix mismatch function signature

* fix: dialyzer type

* refactor: Cleanup

* fix: dialyzer

* fix: credo

* remove unusued alias

* refactor: remove comments

* lint: fix

* tests: add tests for transaction.create apis

* test: delete unnecessary function

* refactor: simplified `select_inputs` flow

* refactor: fix follows pr review

* tests: fix wrong function

* lint: add alias

* refactor: remove trailing comma

* refactor: var name

* switch branch for cabbage test

* refactor: move functions out of controller

* test: add outputs to assertion

* test: add tests for `transaction.create/2`

* test: implement tests for include_typed_data/1

* refactor: remove single pipe

* tests: add tests for `select_inputs/2`

* refactor: cleanup typespec

* lint: formatting

* lint: remove unused alias

* lint: reorder the alias

* refactor: move spec and simplified logic

* refactor: simplify pattern matching

* refactor: uniformize param

* revert: bring back merge transaction

* fixes

* refactor: lift out respond

* fix: is_required_merge doesn't work

* refactor: transaction api

* test: fix tests

* tests: fix

* fix: add result key back

* fix: dialyzer part-1

* fix: remove unnecessary dialyzer types

* fix: revert changes on .gitmodules

* refactor: select_inputs/2

* refactor: simplify select_utxo logic

* refactor: re-order functions

* fix: rename function

* fix: conflict

* Fix conflict

* refactor: rename functions

* refactor: remove single pipe

* fix: lint

* fix: tests

* fix: tests 2

* try: update spec repo

* test: change git modules

* test: revert submodule

* test: fix cabbage conflict

* test: add result key back

* fix: private and public function mixing

* test: fix imports and mixing private functions

* fix: break down pipe

* refactor: break down pipe

* fix: remove blank line

* fix: move alias to top

* refactor: renaming and break out pipe

* refactor: get_utxos_count

* refactor: create_transaction

* fix: typo

* refactor: build_inputs

* refactor: formatting

* refactor: lift out input

* refactor: prioritize merge utxos

* remove and ignore priv/apps/childchain_api

Co-authored-by: euro <[email protected]>
Co-authored-by: euro <[email protected]>
Co-authored-by: Mederic <[email protected]>

* chore: bump version to 1.0.4 (#1751)

We are already in 1.0.4 but we forget to port the VERSION file back when updating changelog.

* feat: comply with new Infura API (#1754)

* chore: changelog/version bump for v1.0.5 (#1747)

* chore: changelog/version bump v1.0.5

* update CHANGELOG for 1.0.5-pre.0

* bump to include latest changes for infura

* Publish the perf project (#1753)

* publish the perf project

* Utxo perf test (#1756)

* create and check utxo

* spend utxo

* assert balances after spending

* validate exact utxos

* fix token encoding

* add test to run on ci

* Update priv/perf/apps/load_test/lib/watcher_info/utxo.ex

Co-authored-by: Ino Murko <[email protected]>

* Update priv/perf/apps/load_test/lib/watcher_info/utxo.ex

Co-authored-by: Ino Murko <[email protected]>

* mix format

* fix build

Co-authored-by: Ino Murko <[email protected]>

* Add cli help command for the perf project (#1757)


* add cli help command for the perf project

* feat : transaction.merge endpoint  (#1715)

* test: Init

* test: create `generate_utxos_map/3`

* test: put test in describe

* test: added `needed_funds/2` tests

* add tests and light refactor for get_sorted_grouped_utxos

* add tests and light refactor [2]

* test: refactor `create_advice/2`

* add spec and clarify funds_sufficient

* refactor: `needed_funds`

* refactor: use shorthanded type

* Add @doc  and readabilty edits

* add: tests for funds_sufficient/1

* refactor: simplify use of 'alice'

* refactor: move test inside describe

* test: add `select_utxo/2` tests

* refactor: remove extra line

* fix: spec

* feat: implement `add_merge_utxos`

* test: add test for `add_merge_utxos/2`

* feat: add prioritize_merge_utxos/2

* test: add test for `prioritize_merge_utxos/2`

* refactor: pipe one more time

* refactor and spec stealth merge

* refactor: test name

* add min_length to base validators

* add merge route and controller

* fix compile errors

* add: tests and doc for `add_utxos_for_stealth_merge`

* test address/currency and utxo positions constraint

* feat: integrate add_merge_utxos to create_advice

* test: add test for create_advice

* add: doc content for add_utxos_for_stealth_merge

* refactor and test prioritisation of UTXOs for stealth merge

* test utxo constraint

* add other required utxo data

* fetch utxo logic

* start transaction_test

* finaly get basic transaction api test working

* merge p

* refactor: split transaction operation

* Fix dialyzer type

* refactor: dialyzer

* fix: typo

* test: add utxo_selection test

* debug: transaction create

* feat: handle when original inputs are empty

* tests: remove transaction merge tests

* tests: add tests for utxo selection

* tests: handle when too many inputs to satisfy payments and fee

* refactor: remove todo

* refactor: parameter validation for transaction.merge

* optional desc/asc for UTXO fetch

* WIP: merge functionality

* feat: move `create_advice` from `utxo_selection.ex` to  `transaction.ex` and rename it to `create_inputs`

* test: add transaction tests

* WIP: return multiple merge transactions if address/ccy params

* test: change port `9657` to `9656`

* cleanup: remove unused var

* lint: remove @doc for defp

* test: revert back port `9656` to `9657`

* lint: fix lint

* refactor: remove result from response

* test: add prepare_test_server

* WIP: merge when given utxo positions

* refactor: fix per reviews

* tests: add test case where 2 input use different currencies

* refactor: remove alice, bob from test context

* test: fix mismatch function signature

* fix: dialyzer type

* test for merge with address and currency, refactor create merge so no need for currency and address passing

* more happy path tests

* refactor: Cleanup

* fix: dialyzer

* fix: credo

* remove unusued alias

* remove unaccepted merge constraints

* remove max 4 merge constratint

* match tx.create response shape

* refactor: remove comments

* lint: fix

* tests: add tests for transaction.create apis

* test: delete unnecessary function

* address/currency merge controller tests

* utxo position happy path

* add multiple tx for utxo pos test

* refactor: simplified `select_inputs` flow

* start merge view test

* revert merge view since controler test makes this redundant

* remove default argument in get_sorted_grouped_utxos and reflect change

* refactor: remove "respond"

* update swagger for merge endpoint

* generate auto swagger docs

* move private below public funcs

* change list first for match

* refactor: fix follows pr review

* tests: fix wrong function

* lint: add alias

* refactor: remove trailing comma

* refactor: var name

* fixes: tests, dialyzer, credo

* remove single pipes

* docs: two examples for transaction.merge

* switch branch for cabbage test

* refactor: move functions out of controller

* test: add outputs to assertion

* test: add tests for `transaction.create/2`

* test: implement tests for include_typed_data/1

* refactor: remove single pipe

* tests: add tests for `select_inputs/2`

* refactor: cleanup typespec

* lint: formatting

* lint: remove unused alias

* lint: reorder the alias

* refactor: move spec and simplified logic

* refactor: simplify pattern matching

* refactor: uniformize param

* revert: bring back merge transaction

* fixes

* refactor: lift out respond

* fix: is_required_merge doesn't work

* refactor: transaction api

* resolve initial conflicts

* tighten specification and refactor tests

* add: dialyzer specs

* refactor: merge constraints

* refactor: accept max. 4 utxo positions

* refactor/add tests

* refactor: merge_constraints limit max. positions to 4

* refactor: replace Alice and Bob fixtures with setup

* refactor: return keyword lists from parameter validation

* update documentation

* post-merge: fix failing tests

* post-merge: fix failing tests

* fix: dialyzer

* fix (lint): remove unused aliases

* post-merge: remove unintended spacing

* add: fallback descriptions

* remove `result` key from body schema for /merge

* reinstate result key where removed.

* rename tests

* fix: duplicate test typo

* remove empty line

Co-authored-by: euro <[email protected]>
Co-authored-by: okalouti <[email protected]>
Co-authored-by: euro <[email protected]>

* add perf cli smoke test (#1762)

* add perf cli smoke test

This PR adds ci step that runs `transactions` perf test

* feat: send web telemetry events to Datadog

Using the telemetry_metric and telemetry_metrics_statsd reporter, we can
send telemetry events to Datadog without defining more event handlers.
The supervised process is configured with the same parameters as the
Statix metrics generation.

In omg.status, we collect web events from Phoenix and send them to
Datadog as metrics.

The fallback controller in WatcherRPC is also instrumented to execute
telemetry events on errors, with route and error type recorded as tags.

chore: mix format

chore: fix linter warnings, shorten module paths

* fix: move env var fetch into Configuration module

* fix: ensure current_route doesn't throw an exception

It's possible in SupportedWatcherModes for a conn to end up in the
fallback controller without being routed there. This change makes it so
that if the route can't be determined from the conn, we return nil
instead of erroring.

Fixes a failing test.

* fix: allow nil release and current_version env vars

* Chore: fix feefeed container healthcheck (#1768)

* fix feefeed container healtheck

Check if feefeed fetched fees instead of checking if it's up

* log docker-compose logs

* feat: add new metadata to Datadog traces

Add service, version and error metadata to traces in Datadog APM traces.

What you see in the traces:
* The service name (default 'web' for Phoenix applications) is the name
of the OMG application.
* Traces are tagged with application version number
* For API responses which error, the trace is flagged red as an error,
the error code is marked on the trace and the error message is found
in the tags.

* refactor: move configuration helpers to new module

Moved from Application to Configuration for WatcherRPC.

* refactor: remove unused app field in Application

* fix: failing tracer and response tests

* fix: aggressive test fix (#1772)

* Collect metrics through datadog for the perf project (#1765)

* retry datadog errors (#1774)

* retry datadog errors

* use header function to fail

* add `retrying` to log messages

* fix: run tests that alter globals consecutively

* refactor: atom to string with interpolation

* ignore known errors - Sentry spike protection (#1775)

* ignore known errors - Sentry spike protection

* run reorg tests only on master

* linting specs is not needed

* Fix readme docker docs (#1773)

* Fix readme docker docs

* change commands

* enter directory

* add perf docs

* move command info to the top

Co-authored-by: Ino Murko <[email protected]>

* config filter sentry (#1778)

* add docker-compose for `test_docker_compose_release` (#1777)

* extract geth command, remove childchain only code paths (#1781)

* extract geth command

* childchain code rem

* update deps, lint

* the great decoupling

* config fix

* config fix, check if Watcher Info config value

* delete childchain test

* config anon functions comments

* #1588 phx exception caused by invalid accept header is now ignored

* #1588 added a test

* ignore RequestTooLarge for Sentry (#1779)

this error is coming from PlugParser when a request is too large. we
don't want this reporting this event to on-call

* set remote_ip from cf-connecting-ip header (#1679)

* set remote_ip from X-Forwarded-For header

* add custom plug that sets remote_ip

* set the right most ip as remote_ip

* add test

* set the left most ip

* use `CF-Connecting-IP` header

* fix tests

Co-authored-by: Arthur Chiu <[email protected]>
Co-authored-by: Ino Murko <[email protected]>

* #1588 minor adjustmen

* feat: add X-Watcher-Version header to http requests (#1767)

* #1588 minor fix

* fix: set service name as a tag in metrics

Currently the service name is part of the prefix for metrics, but it
would be far better if it were a tag, so that services could be compared
side by side in Datadog.

* fix: limit matching for ethereumex responses (#1782)


* fix: rem error response handling

* fix: add sentry filter

Co-authored-by: Ino Murko <[email protected]>

* just the one thing to turn into a warn (#1784)

Co-authored-by: Ino Murko <[email protected]>

* Renamed all occurrences of omisego to omgnetwork (#1788)

* #1555 Renamed omisego to omg network

* #1555 Fixed urls

* #1555 downgraded rocksdb to 1.5.1

* chore: changelog/version bump for v1.0.5 (#1747) (#1785)

* chore: changelog/version bump v1.0.5

* update CHANGELOG for 1.0.5-pre.0

* bump to include latest changes for infura

Co-authored-by: Arthur Chiu <[email protected]>
Co-authored-by: boolafish <[email protected]>

* chore: add sem release automation (#1791)

* chore: add sem release

* chore: set release rule for our standard

* chore: test dummy

* fix: sem-release format

* chore: use dry-run on sem release

* fix: back to origin config

* bump elixir (#1789)

* bump elixir

* align rust version to 1.46 (#1793)

* align rust version to 1.46

* trace reorg tests (#1796)

* fix: make sem release ignore PR check (#1797)

* chore: use git tag version instead (#1798)

* chore: use git tag version instead

* fix: for lint

* style: pipe :)

* refactor: put to private function for version()

* update submodule

* update mix file

* fix mix files

* update deps

* fix eip55

* use new ex_plasma

* fix ethereum event aggregator test

* fix dialyzer

Co-authored-by: Omar Kalouti <[email protected]>
Co-authored-by: euro <[email protected]>
Co-authored-by: Unnawut Leepaisalsuwanna <[email protected]>
Co-authored-by: boolafish <[email protected]>
Co-authored-by: pgebal <[email protected]>
Co-authored-by: jarindr <[email protected]>
Co-authored-by: Ino Murko <[email protected]>
Co-authored-by: Kevin Sullivan <[email protected]>
Co-authored-by: euro <[email protected]>
Co-authored-by: Mederic <[email protected]>
Co-authored-by: Arthur Chiu <[email protected]>
Co-authored-by: Nicholas Mueller <[email protected]>
Co-authored-by: Michael Captain <[email protected]>
Co-authored-by: Daniela Ivanova <[email protected]>
Co-authored-by: Souradeep Das <[email protected]>
  • Loading branch information
16 people authored Dec 15, 2020
1 parent b9b87ba commit 4e4647b
Show file tree
Hide file tree
Showing 588 changed files with 1,583 additions and 2,416 deletions.
150 changes: 90 additions & 60 deletions .circleci/config.yml

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions .releaserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
plugins:
- - '@semantic-release/commit-analyzer'
- preset: 'angular'
releaseRules:
- type: 'refactor'
release: 'patch'
- type: 'style'
release: 'patch'
- type: 'feat'
release: 'patch'
- type: 'chore'
release: 'patch'
- breaking: true
release: 'minor'
- '@semantic-release/release-notes-generator'
- '@semantic-release/github'
tagFormat: 'v${version}'
dryRun: true
# observing that job would not be running as it was considered as from PR branch
# looks that unfortunately that is how it is designed:
# https://github.com/semantic-release/semantic-release/issues/1166#issuecomment-500094323
# this workaround is from:
# https://github.com/semantic-release/semantic-release/issues/1074#issuecomment-696922883
ci: false
5 changes: 3 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
erlang 22.3
elixir 1.10.2
elixir 1.11.2
erlang 23.1.4
rust 1.46.0
2 changes: 1 addition & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
OmiseGo Pte Ltd
OMG Network Pte Ltd
28 changes: 20 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,41 @@
# Changelog

## [Unreleased](https://github.com/omgnetwork/elixir-omg/tree/HEAD)
## [v1.0.5](https://github.com/omgnetwork/elixir-omg/tree/v1.0.5) (2020-10-01)

[Full Changelog](https://github.com/omgnetwork/elixir-omg/compare/v1.0.4...HEAD)
[Full Changelog](https://github.com/omgnetwork/elixir-omg/compare/v1.0.4-pre.2...v1.0.5)

### Enhancements

- deposits performance tests bot [\#1745](https://github.com/omgnetwork/elixir-omg/pull/1745) ([ayrat555](https://github.com/ayrat555))
- feat: handle in-flight exits deletions [\#1701](https://github.com/omgnetwork/elixir-omg/pull/1701) ([pgebal](https://github.com/pgebal))
- feat: comply with new Infura API [\#1754](https://github.com/omgnetwork/elixir-omg/pull/1754) ([pgebal](https://github.com/pgebal))

### Bug fixes

- fix: handle metrics for in flight exit deleted processor [\#1742](https://github.com/omgnetwork/elixir-omg/pull/1742) ([pgebal](https://github.com/pgebal))
- revert: reverts ife deletion commits [\#1725](https://github.com/omgnetwork/elixir-omg/pull/1725) ([pgebal](https://github.com/pgebal))
- fix: set :last\_ife\_exit\_deleted\_eth\_height on deplyment if it's not set yet [\#1720](https://github.com/omgnetwork/elixir-omg/pull/1720) ([pgebal](https://github.com/pgebal))
- fix: fix in-flight exit deleted bug and add tests [\#1714](https://github.com/omgnetwork/elixir-omg/pull/1714) ([pgebal](https://github.com/pgebal))
- fix: block submission stall monitor should ignore block\_submitting that are already mined [\#1703](https://github.com/omgnetwork/elixir-omg/pull/1703) ([unnawut](https://github.com/unnawut))
- fix: recheck PR label on synchronize and reopen [\#1748](https://github.com/omgnetwork/elixir-omg/pull/1748) ([unnawut](https://github.com/unnawut))

### Chores

- Chore: parallelize tests by tags [\#1744](https://github.com/omgnetwork/elixir-omg/pull/1744) ([ayrat555](https://github.com/ayrat555))
- Chore: use exexec from upstream [\#1743](https://github.com/omgnetwork/elixir-omg/pull/1743) ([ayrat555](https://github.com/ayrat555))
- move dev env deployment job to helm repo [\#1738](https://github.com/omgnetwork/elixir-omg/pull/1738) ([boolafish](https://github.com/boolafish))
- Inomurko/remove child chain [\#1737](https://github.com/omgnetwork/elixir-omg/pull/1737) ([InoMurko](https://github.com/InoMurko))
- Kevsul/standard exit perf test [\#1732](https://github.com/omgnetwork/elixir-omg/pull/1732) ([kevsul](https://github.com/kevsul))
- update change log v1.0.4 [\#1731](https://github.com/omgnetwork/elixir-omg/pull/1731) ([jarindr](https://github.com/jarindr))
- chore: add test for 64\_000 txs block hash [\#1729](https://github.com/omgnetwork/elixir-omg/pull/1729) ([ayrat555](https://github.com/ayrat555))
- Allow to run docker-compose without feefeed docker [\#1726](https://github.com/omgnetwork/elixir-omg/pull/1726) ([boolafish](https://github.com/boolafish))
- rm mix based chch part 1 [\#1716](https://github.com/omgnetwork/elixir-omg/pull/1716) ([InoMurko](https://github.com/InoMurko))
- feat: reintroduce automated changelog [\#1708](https://github.com/omgnetwork/elixir-omg/pull/1708) ([unnawut](https://github.com/unnawut))
- add feefeed docker to elixir-omg setup [\#1700](https://github.com/omgnetwork/elixir-omg/pull/1700) ([boolafish](https://github.com/boolafish))
- move omg\_performance json rpc tests to perf project [\#1691](https://github.com/omgnetwork/elixir-omg/pull/1691) ([ayrat555](https://github.com/ayrat555))
- chore: bump version to 1.0.4 [\#1751](https://github.com/omgnetwork/elixir-omg/pull/1751) ([boolafish](https://github.com/boolafish))
- Chore: try to fix flaky reorg tests [\#1739](https://github.com/omgnetwork/elixir-omg/pull/1739) ([ayrat555](https://github.com/ayrat555))
- feat: transaction.create optimisation [\#1683](https://github.com/omgnetwork/elixir-omg/pull/1683) ([okalouti](https://github.com/okalouti))

## [v1.0.4](https://github.com/omgnetwork/elixir-omg/tree/v1.0.4) (2020-09-03)

Expand All @@ -39,7 +55,6 @@

- corrrectly serialize PIDs in alarms.get [\#1678](https://github.com/omgnetwork/elixir-omg/pull/1678) ([ayrat555](https://github.com/ayrat555))
- account.get\_exitable\_utxos is unaware of in-flight exited inputs [\#1676](https://github.com/omgnetwork/elixir-omg/pull/1676) ([pnowosie](https://github.com/pnowosie))
- Fix fee adapter to accept decimal value in fee rules [\#1662](https://github.com/omgnetwork/elixir-omg/pull/1662) ([jarindr](https://github.com/jarindr))
- Add missing clause on witness validation check [\#1656](https://github.com/omgnetwork/elixir-omg/pull/1656) ([mederic-p](https://github.com/mederic-p))
- fix: unexpected http method [\#1651](https://github.com/omgnetwork/elixir-omg/pull/1651) ([ripzery](https://github.com/ripzery))

Expand Down Expand Up @@ -91,10 +106,6 @@
- Add reorged docker compose [\#1579](https://github.com/omgnetwork/elixir-omg/pull/1579) ([ayrat555](https://github.com/ayrat555))
- Kevin/load test erc20 token [\#1577](https://github.com/omgnetwork/elixir-omg/pull/1577) ([kevsul](https://github.com/kevsul))

### Documentation updates

- Update request body swagger [\#1609](https://github.com/omgnetwork/elixir-omg/pull/1609) ([jarindr](https://github.com/jarindr))

## [v1.0.2](https://github.com/omgnetwork/elixir-omg/tree/v1.0.2) (2020-06-30)

[Full Changelog](https://github.com/omgnetwork/elixir-omg/compare/v1.0.2-pre.0...v1.0.2)
Expand Down Expand Up @@ -122,11 +133,12 @@

### Documentation updates

- Update request body swagger [\#1609](https://github.com/omgnetwork/elixir-omg/pull/1609) ([jarindr](https://github.com/jarindr))
- Update README.md [\#1564](https://github.com/omgnetwork/elixir-omg/pull/1564) ([InoMurko](https://github.com/InoMurko))

## [v1.0.1](https://github.com/omgnetwork/elixir-omg/tree/v1.0.1) (2020-06-18)

[Full Changelog](https://github.com/omgnetwork/elixir-omg/compare/v1.0.1-pre.0...v1.0.1)
[Full Changelog](https://github.com/omgnetwork/elixir-omg/compare/v1.0.0-pre.2...v1.0.1)

### Chores

Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.watcher
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM alpine:3.11

LABEL maintainer="OmiseGO Team <[email protected]>"
LABEL description="Official image for OmiseGO (Watcher) Plasma Network"
LABEL maintainer="OMG Network Team <[email protected]>"
LABEL description="Official image for OMG Network (Watcher) Plasma Network"

ENV LANG=C.UTF-8

Expand Down Expand Up @@ -54,7 +54,7 @@ RUN set -xe \
#rocksdb from builder image to deployer image
RUN mkdir -p /usr/local/rocksdb/lib
RUN mkdir /usr/local/rocksdb/include
COPY --from=omisegoimages/elixir-omg-builder:stable-20200410 /usr/local/rocksdb/ /usr/local/rocksdb/
COPY --from=omisegoimages/elixir-omg-builder:stable-20201207 /usr/local/rocksdb/ /usr/local/rocksdb/

ARG release_version
ADD _build_docker/prod/watcher-${release_version}.tar.gz /app
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.watcher_info
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM alpine:3.11

LABEL maintainer="OmiseGO Team <[email protected]>"
LABEL description="Official image for OmiseGO (WatcherInfo) Plasma Network"
LABEL maintainer="OMG Network Team <[email protected]>"
LABEL description="Official image for OMG Network (WatcherInfo) Plasma Network"

ENV LANG=C.UTF-8

Expand Down Expand Up @@ -54,7 +54,7 @@ RUN set -xe \
#rocksdb from builder image to deployer image
RUN mkdir -p /usr/local/rocksdb/lib
RUN mkdir /usr/local/rocksdb/include
COPY --from=omisegoimages/elixir-omg-builder:stable-20200410 /usr/local/rocksdb/ /usr/local/rocksdb/
COPY --from=omisegoimages/elixir-omg-builder:stable-20201207 /usr/local/rocksdb/ /usr/local/rocksdb/

ARG release_version
ADD _build_docker/prod/watcher_info-${release_version}.tar.gz /app
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

Copyright 2017-2019 OmiseGO
Copyright 2017-2019 OMG Network

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ all: clean build-watcher-prod build-watcher_info-prod
WATCHER_IMAGE_NAME ?= "omisego/watcher:latest"
WATCHER_INFO_IMAGE_NAME ?= "omisego/watcher_info:latest"

IMAGE_BUILDER ?= "omisegoimages/elixir-omg-builder:stable-20200410"
IMAGE_BUILDER ?= "omisegoimages/elixir-omg-builder:stable-20201207"
IMAGE_BUILD_DIR ?= $(PWD)

ENV_DEV ?= env MIX_ENV=dev
Expand Down Expand Up @@ -293,14 +293,14 @@ docker-watcher_info-prod:

docker-watcher-build:
docker build -f Dockerfile.watcher \
--build-arg release_version=$$(cat $(PWD)/VERSION)+$$(git rev-parse --short=7 HEAD) \
--build-arg release_version=$$(git describe --tags) \
--cache-from $(WATCHER_IMAGE_NAME) \
-t $(WATCHER_IMAGE_NAME) \
.

docker-watcher_info-build:
docker build -f Dockerfile.watcher_info \
--build-arg release_version=$$(cat $(PWD)/VERSION)+$$(git rev-parse --short=7 HEAD) \
--build-arg release_version=$$(git describe --tags) \
--cache-from $(WATCHER_INFO_IMAGE_NAME) \
-t $(WATCHER_INFO_IMAGE_NAME) \
.
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<img src="docs/assets/logo.png" width="100" height="100" align="right" />

The `elixir-omg` repository contains OmiseGO's Elixir implementation of Plasma and forms the basis for the OMG Network.
The `elixir-omg` repository contains OMG Network's Elixir implementation of Plasma and forms the basis for the OMG Network.

[![Build Status](https://circleci.com/gh/omgnetwork/elixir-omg.svg?style=svg)](https://circleci.com/gh/omgnetwork/elixir-omg) [![Coverage Status](https://coveralls.io/repos/github/omisego/elixir-omg/badge.svg?branch=master)](https://coveralls.io/github/omisego/elixir-omg?branch=master)

Expand Down Expand Up @@ -116,10 +116,10 @@ mix test

Longer-running integration tests (requires compiling contracts):
```bash
mix test --trace --only integration
mix test --only integration
```

For other kinds of checks, refer to the CI/CD pipeline (https://circleci.com/gh/omisego/workflows/elixir-omg) or build steps (https://github.com/omisego/elixir-omg/blob/master/.circleci/config.yml).
For other kinds of checks, refer to the CI/CD pipeline (https://app.circleci.com/pipelines/github/omgnetwork/elixir-omg) or build steps (https://github.com/omgnetwork/elixir-omg/blob/master/.circleci/config.yml).

To run a development `iex` REPL with all code loaded:
```bash
Expand Down Expand Up @@ -207,15 +207,15 @@ cd priv/cabbage
make install
make generate_api_code
mix deps.get
REORG=true mix test --only reorg --trace
REORG=true mix test --only reorg
```

# Working with API Spec's

This repo contains `gh-pages` branch intended to host [Swagger-based](https://docs.omg.network/elixir-omg/) API specification.
Branch `gh-pages` is totally diseparated from other development branches and contains just Slate generated page's files.

See [gh-pages README](https://github.com/omisego/elixir-omg/tree/gh-pages) for more details.
See [gh-pages README](https://github.com/omgnetwork/elixir-omg/tree/gh-pages) for more details.

# More details about the design and architecture

Expand Down
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

2 changes: 1 addition & 1 deletion apps/omg/lib/omg.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2020 OmiseGO Pte Ltd
# Copyright 2019-2020 OMG Network Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion apps/omg/lib/omg/application.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2020 OmiseGO Pte Ltd
# Copyright 2019-2020 OMG Network Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion apps/omg/lib/omg/block.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2020 OmiseGO Pte Ltd
# Copyright 2019-2020 OMG Network Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion apps/omg/lib/omg/configuration.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2020 OmiseGO Pte Ltd
# Copyright 2019-2020 OMG Network Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
13 changes: 7 additions & 6 deletions apps/omg/lib/omg/crypto.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2020 OmiseGO Pte Ltd
# Copyright 2019-2020 OMG Network Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -20,6 +20,7 @@ defmodule OMG.Crypto do
For unsafe code, limited to `:test` and `:dev` environments and related to private key handling refer to:
`OMG.DevCrypto` in `test/support`
"""
alias ExPlasma.Crypto
alias OMG.Signature

@type sig_t() :: <<_::520>>
Expand All @@ -41,22 +42,22 @@ defmodule OMG.Crypto do
171, 76, 106, 229, 69, 102, 203, 7, 21, 134, 230, 92, 23, 209, 187, 12>>
"""
@spec hash(binary) :: hash_t()
def hash(message), do: ExthCrypto.Hash.hash(message, ExthCrypto.Hash.kec())
def hash(message), do: Crypto.keccak_hash(message)

@doc """
Recovers the address of the signer from a binary-encoded signature.
"""
@spec recover_address(hash_t(), sig_t()) :: {:ok, address_t()} | {:error, :signature_corrupt | binary}
@spec recover_address(hash_t(), sig_t()) :: {:ok, address_t()} | {:error, atom()}
def recover_address(<<digest::binary-size(32)>>, <<packed_signature::binary-size(65)>>) do
case Signature.recover_public(digest, packed_signature) do
{:ok, pub} ->
generate_address(pub)

{:error, "Recovery id invalid 0-3"} ->
{:error, :recovery_id_not_u8} ->
{:error, :signature_corrupt}

other ->
other
{:error, _} = error ->
error
end
end

Expand Down
33 changes: 17 additions & 16 deletions apps/omg/lib/omg/ethereum_event_listener.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2020 OmiseGO Pte Ltd
# Copyright 2019-2020 OMG Network Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -146,7 +146,7 @@ defmodule OMG.EthereumEventListener do

case RootChainCoordinator.get_sync_info() do
:nosync ->
:ok = RootChainCoordinator.check_in(Core.get_height_to_check_in(state), state.service_name)
:ok = RootChainCoordinator.check_in(state.synced_height, state.service_name)
{:ok, _} = schedule_get_events(state.ethereum_events_check_interval_ms)
{:noreply, {state, callbacks}}

Expand All @@ -158,31 +158,32 @@ defmodule OMG.EthereumEventListener do
end

# see `handle_info/2`, clause for `:sync`
@decorate span(service: :ethereum_event_listener, type: :backend, name: "sync_height/2")
@decorate span(service: :ethereum_event_listener, type: :backend, name: "sync_height/3")
defp sync_height(state, callbacks, sync_guide) do
{:ok, events, db_updates, height_to_check_in, new_state} =
Core.get_events_range_for_download(state, sync_guide)
|> maybe_update_event_cache(callbacks.get_ethereum_events_callback)
|> Core.get_events(sync_guide.sync_height)
{events, new_state} =
state
|> Core.calc_events_range_set_height(sync_guide)
|> get_events(callbacks.get_ethereum_events_callback)

:ok = :telemetry.execute([:process, __MODULE__], %{events: events}, state)
db_update = [{:put, new_state.synced_height_update_key, new_state.synced_height}]
:ok = :telemetry.execute([:process, __MODULE__], %{events: events}, new_state)

{:ok, db_updates_from_callback} = callbacks.process_events_callback.(events)
:ok = publish_events(events)
:ok = OMG.DB.multi_update(db_updates ++ db_updates_from_callback)
:ok = RootChainCoordinator.check_in(height_to_check_in, state.service_name)
:ok = OMG.DB.multi_update(db_update ++ db_updates_from_callback)
:ok = RootChainCoordinator.check_in(new_state.synced_height, new_state.service_name)

new_state
end

@decorate span(service: :ethereum_event_listener, type: :backend, name: "maybe_update_event_cache/2")
defp maybe_update_event_cache({:get_events, {from, to}, %Core{} = state}, get_ethereum_events_callback) do
{:ok, new_events} = get_ethereum_events_callback.(from, to)
Core.add_new_events(state, new_events)
defp get_events({{from, to}, state}, get_events_callback) do
{:ok, new_events} = get_events_callback.(from, to)
{new_events, state}
end

@decorate span(service: :ethereum_event_listener, type: :backend, name: "maybe_update_event_cache/2")
defp maybe_update_event_cache({:dont_fetch_events, %Core{} = state}, _callback), do: state
defp get_events({:dont_fetch_events, state}, _callback) do
{[], state}
end

defp schedule_get_events(ethereum_events_check_interval_ms) do
:timer.send_after(ethereum_events_check_interval_ms, self(), :sync)
Expand Down
Loading

0 comments on commit 4e4647b

Please sign in to comment.