Skip to content
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

Extend bridge logging functionality #11

Open
akolotov opened this issue Feb 11, 2018 · 0 comments
Open

Extend bridge logging functionality #11

akolotov opened this issue Feb 11, 2018 · 0 comments
Assignees

Comments

@akolotov
Copy link
Contributor

Currently the bridge instance support logging through configuration of the environment variable RUST_LOG. The bridge produces the logs with log level info and allows to get details about JSON-RPC call by setting the level debug.

env RUST_LOG=info ./bridge --config config.toml --database db.toml

example of logs: https://gist.github.com/akolotov/47d951346db3627562acc7e6578dabaa#file-01_info_level-md

or

env RUST_LOG=debug ./bridge --config config.toml --database db.toml

example of logs: https://gist.github.com/akolotov/47d951346db3627562acc7e6578dabaa#file-02_debug_level-md

From examples above it is clear that info level does not provide enough information to investigate possible issues whereas debug level produces lots of lines (not presented in the example above) which are superfluous for investigation of issues related to skipped or missed transactions or hard to use for tracing state of transfers.

Proposal for changes:

It is necessary to extend the logging functionality on 'info' level in order to have information hanlded and generated by the bridge instance more transparent.
Below is the list of information needed for every type of operation:

  1. deposit_relay

    • tx hash of the transaction used to send funds to the HomeBridge contract, transaction originator, value of transaction.
    • tx hash of the transaction sent by the bridge to the ForeingBridge contract, a reference tx hash (allow to link this transaction to transaction from previous item)
    • information whether respond from the bridge contract (Deposit() event) recieved with the reference tx hash
    • information about other bridges responds with the reference tx hash
  2. withdraw_confirm

    • tx hash of the transaction used to request withdraw from the ForeignBridge contract, transaction originator, value of transaction.
    • tx hash of the transaction sent by the bridge to the ForeingBridge contract, a reference tx hash (allow to link this transaction to transaction from previous item)
    • information whether respond from the bridge contract (event implemented under Extend tracebility of deposits transactions #9) recieved with the reference tx hash
    • information about other bridges responds with the reference tx hash
  3. withdraw_relay

    • tx hash of the transaction used to inform about signatures collected on ForeignBridge contract with decision if this bridge instance is responsible for relaying the withdraw
    • tx hash of the transaction sent by the bridge to the HomeBridge contract, a reference tx hash (allow to link this transaction to transaction from previous item)
    • information whether respond from the bridge contract (Withdraw() event) recieved with the reference tx hash. This should be included even if another instance of bridge sent information to the HomeBridge contract.
@akolotov akolotov added the rust label Feb 11, 2018
@yrashk yrashk self-assigned this Feb 12, 2018
@akolotov akolotov added the to do label Feb 14, 2018
@yrashk yrashk added in progress and removed to do labels Feb 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants