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

fix: duplicate logging #3939

Merged
merged 2 commits into from
Sep 5, 2023
Merged

fix: duplicate logging #3939

merged 2 commits into from
Sep 5, 2023

Conversation

kylezs
Copy link
Contributor

@kylezs kylezs commented Sep 4, 2023

Pull Request

Closes: PRO-810

Checklist

Please conduct a thorough self-review before opening the PR.

  • I am confident that the code works.
  • I have updated documentation where appropriate.

Summary

See linked issue. This fixes it. Basically the underlying stream was being created as many times as there were active epochs, but now we just clone a channel of the underlying stream, so the logging (or any other work on the chainsource) isn't done multiple times.

@linear
Copy link

linear bot commented Sep 4, 2023

PRO-810 Dot finalised logging duplicates log message

	
{"timestamp":"2023-09-04T08:38:06.034555Z","level":"INFO","fields":{"message":"Polkadot | finalised block produced: index: 72396 hash: 0xcab9d9d13a8fd1ba715999e16a222ce8acd28535b05c50af24de383969d8d25b"},"target":"chainflip_engine::witness::common::chain_source::logging"}
2023-09-04 10:38:06.034	
{"timestamp":"2023-09-04T08:38:06.034542Z","level":"INFO","fields":{"message":"Polkadot | finalised block produced: index: 72396 hash: 0xcab9d9d13a8fd1ba715999e16a222ce8acd28535b05c50af24de383969d8d25b"},"target":"chainflip_engine::witness::common::chain_source::logging"}
2023-09-04 10:38:06.034	
{"timestamp":"2023-09-04T08:38:06.034529Z","level":"INFO","fields":{"message":"Polkadot | finalised block produced: index: 72396 hash: 0xcab9d9d13a8fd1ba715999e16a222ce8acd28535b05c50af24de383969d8d25b"},"target":"chainflip_engine::witness::common::chain_source::logging"}
2023-09-04 10:38:06.034	
{"timestamp":"2023-09-04T08:38:06.034516Z","level":"INFO","fields":{"message":"Polkadot | finalised block produced: index: 72396 hash: 0xcab9d9d13a8fd1ba715999e16a222ce8acd28535b05c50af24de383969d8d25b"},"target":"chainflip_engine::witness::common::chain_source::logging"}
2023-09-04 10:38:06.034	
{"timestamp":"2023-09-04T08:38:06.034504Z","level":"INFO","fields":{"message":"Polkadot | finalised block produced: index: 72396 hash: 0xcab9d9d13a8fd1ba715999e16a222ce8acd28535b05c50af24de383969d8d25b"},"target":"chainflip_engine::witness::common::chain_source::logging"}
2023-09-04 10:38:06.034	
{"timestamp":"2023-09-04T08:38:06.034492Z","level":"INFO","fields":{"message":"Polkadot | finalised block produced: index: 72396 hash: 0xcab9d9d13a8fd1ba715999e16a222ce8acd28535b05c50af24de383969d8d25b"},"target":"chainflip_engine::witness::common::chain_source::logging"}
2023-09-04 10:38:06.034	
{"timestamp":"2023-09-04T08:38:06.034479Z","level":"INFO","fields":{"message":"Polkadot | finalised block produced: index: 72396 hash: 0xcab9d9d13a8fd1ba715999e16a222ce8acd28535b05c50af24de383969d8d25b"},"target":"chainflip_engine::witness::common::chain_source::logging"}
2023-09-04 10:38:06.034	
{"timestamp":"2023-09-04T08:38:06.034468Z","level":"INFO","fields":{"message":"Polkadot | finalised block produced: index: 72396 hash: 0xcab9d9d13a8fd1ba715999e16a222ce8acd28535b05c50af24de383969d8d25b"},"target":"chainflip_engine::witness::common::chain_source::logging"}
2023-09-04 10:38:06.034	
{"timestamp":"2023-09-04T08:38:06.034455Z","level":"INFO","fields":{"message":"Polkadot | finalised block produced: index: 72396 hash: 0xcab9d9d13a8fd1ba715999e16a222ce8acd28535b05c50af24de383969d8d25b"},"target":"chainflip_engine::witness::common::chain_source::logging"}
2023-09-04 10:38:06.034	
{"timestamp":"2023-09-04T08:38:06.034442Z","level":"INFO","fields":{"message":"Polkadot | finalised block produced: index: 72396 hash: 0xcab9d9d13a8fd1ba715999e16a222ce8acd28535b05c50af24de383969d8d25b"},"target":"chainflip_engine::witness::common::chain_source::logging"}
2023-09-04 10:38:06.034	
{"timestamp":"2023-09-04T08:38:06.034430Z","level":"INFO","fields":{"message":"Polkadot | finalised block produced: index: 72396 hash: 0xcab9d9d13a8fd1ba715999e16a222ce8acd28535b05c50af24de383969d8d25b"},"target":"chainflip_engine::witness::common::chain_source::logging"}
2023-09-04 10:38:06.034	
{"timestamp":"2023-09-04T08:38:06.034418Z","level":"INFO","fields":{"message":"Polkadot | finalised block produced: index: 72396 hash: 0xcab9d9d13a8fd1ba715999e16a222ce8acd28535b05c50af24de383969d8d25b"},"target":"chainflip_engine::witness::common::chain_source::logging"}
2023-09-04 10:38:06.034	
{"timestamp":"2023-09-04T08:38:06.034405Z","level":"INFO","fields":{"message":"Polkadot | finalised block produced: index: 72396 hash: 0xcab9d9d13a8fd1ba715999e16a222ce8acd28535b05c50af24de383969d8d25b"},"target":"chainflip_engine::witness::common::chain_source::logging"}
2023-09-04 10:38:06.034	
{"timestamp":"2023-09-04T08:38:06.034390Z","level":"INFO","fields":{"message":"Polkadot | finalised block produced: index: 72396 hash: 0xcab9d9d13a8fd1ba715999e16a222ce8acd28535b05c50af24de383969d8d25b"},"target":"chainflip_engine::witness::common::chain_source::logging"}
2023-09-04 10:38:06.034	
{"timestamp":"2023-09-04T08:38:06.034376Z","level":"INFO","fields":{"message":"Polkadot | finalised block produced: index: 72396 hash: 0xcab9d9d13a8fd1ba715999e16a222ce8acd28535b05c50af24de383969d8d25b"},"target":"chainflip_engine::witness::common::chain_source::logging"}
2023-09-04 10:38:06.034	
{"timestamp":"2023-09-04T08:38:06.034362Z","level":"INFO","fields":{"message":"Polkadot | finalised block produced: index: 72396 hash: 0xcab9d9d13a8fd1ba715999e16a222ce8acd28535b05c50af24de383969d8d25b"},"target":"chainflip_engine::witness::common::chain_source::logging"}


2023-09-04 10:38:06.034	
{"timestamp":"2023-09-04T08:38:06.034285Z","level":"INFO","fields":{"message":"Polkadot | finalised block produced: index: 72396 hash: 0xcab9d9d13a8fd1ba715999e16a222ce8acd28535b05c50af24de383969d8d25b"},"target":"chainflip_engine::witness::common::chain_source::logging"}

ProxyAdded(ProxyAdded),
Transfer(Transfer),
TransactionFeePaid(TransactionFeePaid),
ProxyAdded { delegator: AccountId32, delegatee: AccountId32 },
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

had to do this so the events could be Clone

@codecov
Copy link

codecov bot commented Sep 4, 2023

Codecov Report

Merging #3939 (4a7f2ee) into main (b195c43) will decrease coverage by 0%.
The diff coverage is 26%.

@@          Coverage Diff          @@
##            main   #3939   +/-   ##
=====================================
- Coverage     73%     73%   -0%     
=====================================
  Files        367     367           
  Lines      56051   56047    -4     
  Branches   56051   56047    -4     
=====================================
- Hits       40649   40635   -14     
- Misses     13343   13349    +6     
- Partials    2059    2063    +4     
Files Changed Coverage Δ
engine/src/witness/btc.rs 61% <0%> (-<1%) ⬇️
engine/src/witness/dot/dot_chain_tracking.rs 0% <0%> (ø)
engine/src/witness/eth.rs 0% <0%> (ø)
engine/src/witness/dot.rs 47% <30%> (-1%) ⬇️

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@kylezs kylezs enabled auto-merge (squash) September 5, 2023 09:38
@kylezs kylezs merged commit 6e12a61 into main Sep 5, 2023
42 checks passed
@kylezs kylezs deleted the fix/dup-logs branch September 5, 2023 10:09
dandanlen pushed a commit that referenced this pull request Sep 6, 2023
* fix: duplicate logging

* chore: remove unnecessary clone
dandanlen pushed a commit that referenced this pull request Sep 6, 2023
* fix: duplicate logging

* chore: remove unnecessary clone
syan095 added a commit that referenced this pull request Sep 8, 2023
…on-integration

* origin/main:
  fix: scale encoding skip phantom data (#3967)
  chore: make platform team code owner of CI settings.toml and localnet (#3957)
  fix: prefer finalize_signed_extrinsic in engine (#3956)
  fix: CanonicalAssetPair encoding issue (#3958)
  chore(bouncer): Update sdk to 0.0.40 (#3945)
  fix: tweak cli generate-keys output (#3943)
  chore: add `preinst` script unit tests 🧪 (#3942)
  Better LP/Broker API RPC Errors (#3931)
  fix: update substrate ref to use Kademlia fix (#3941)
  doc: update funding readme with redemption restrictions (#3914)
  feat: PRO-474 broadcast safe mode (#3902)
  feat: more forgiving dot address parsing (#3938)
  fix: duplicate logging (#3939)
  feat: new lp interface (#3886)

# Conflicts:
#	Cargo.lock
#	state-chain/cf-integration-tests/Cargo.toml
#	state-chain/cf-integration-tests/src/authorities.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants