Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Client: Structured logging #90

Closed
gavofyork opened this issue Mar 9, 2018 · 2 comments
Closed

Client: Structured logging #90

gavofyork opened this issue Mar 9, 2018 · 2 comments
Assignees
Labels
J0-enhancement An additional feature request. U2-some_time_soon Issue is worth doing soon. Z2-medium Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase.

Comments

@gavofyork
Copy link
Member

gavofyork commented Mar 9, 2018

Eventual aim: a highly detailed version of ethstats.net with clients (optionally!) directly contacting a central web server to provide it with real-time information that is collated and served to web pages.

This is a two-part project; one part is fitting the appropriate logging into the client in order to connect and stream JSON information on the client's operational statistics to a server. The second part is writing such a web app; the server part of the app would receive and collate this information in real time from many polkadot clients and then distribute the resulting information to web-browsers for display.

This issue only describes the first part.

Implementation

slog can provide the structured logging API. This should be combined with a lazy_static and a simple macro in order to get a global logging macro, much like trace! from the log crate except that it accepts key/value pairs rather than a formatted string.

This macro should be used throughout the client for all key events (block arrived from network/queued/validated/imported, transaction(s) submitted/arrived/mined, peer connected/disconnected, ...).

The output of the structured log should be directed to a JSON encoder and then sent via a websockets connection to a server (address/port configurable via CLI params ala polkadot --stats-server=ws://stats.polkadot.io). On opening the websockets connection, an initial dump of the nodes state should be made (current chain head number/hash, peers, transactions in the pool).

@gavofyork gavofyork changed the title Structured logging Client: Structured logging Apr 16, 2018
@gavofyork gavofyork added J0-enhancement An additional feature request. M4-core U2-some_time_soon Issue is worth doing soon. Z2-medium Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase. labels May 30, 2018
@gavofyork gavofyork added this to the PoC-2 (Co-finalisation) milestone May 30, 2018
@vs77bb
Copy link

vs77bb commented Jun 6, 2018

@gavofyork @maciejhirsz Vivek from Gitcoin here: would either of you mind adding a bit more detail for potential contributor, perhaps an Acceptance Criteria? I will bounty accordingly!

@gavofyork
Copy link
Member Author

@vs77bb done :)

@gavofyork gavofyork self-assigned this Jun 15, 2018
@gavofyork gavofyork mentioned this issue Jun 15, 2018
7 tasks
lamafab pushed a commit to lamafab/substrate that referenced this issue Jun 16, 2020
* Update to latest Substrate

* Fix tests

* Update src/main.rs

Co-Authored-By: gavofyork <github@gavwood.com>
JoshOrndorff pushed a commit to moonbeam-foundation/substrate that referenced this issue Apr 21, 2021
* Updated the Readme for tutorial-v2

* Removed the install word
liuchengxu added a commit to chainx-org/substrate that referenced this issue Aug 23, 2021
* Revert StakeWeight type

* Change Balance to u64

* Fix total_minted and remove valid_cands_weight
liuchengxu pushed a commit to chainx-org/substrate that referenced this issue Aug 23, 2021
* refactor for multisig

remove doublemap for multisig

* Feature/linked node (paritytech#79)

provide linked node data struct for runtime module storage
this linked node support option data or no option data

* provide linkednode struct in cxsupport
* refactor linked node
* add option for LinkedNode
* refactor linkednode
      remove template mode, use associate type to replace it

* Fix static net address (paritytech#80)

* Feature/linked_node provide multinodexindex (paritytech#82)

provide multinodexindex

* fix bug for linked_node

when add same index node, do nothing for this node

* refactor financialrecords to support withdraw cache

refactor financialrecords to support withdraw cache and remove deposit fee

* btc bridge

* rename num/hash relationship data (NumberForHash/HashsForNumber)
* let HashsForNumber map to a vec to get all forked block
* add blocknumber in BlockHeaderFor

* tokenbalances

refactor tokenbalances to support issue token in genesis

* reject issue chainx token and provide u32, usize as for tokenbalance

* Perfect deposit  (paritytech#83)

* Add deposit cache

* Perfect deposit

* Perfect withdraw (paritytech#84)

* Perfect withdraw

* add network check in btc bridge

* when meet testnet, jump header bit check
* check the bit change block in genesis

* Fix test build

* Feature/refactor match (paritytech#86)

*  matchorder and pendingorders

* Fix op_return account id parse

* tokenbalances: provide reserved type for reservedtoken

* Fix merge error

* update genesis_config

* Update genesis_config

* x-btc

* provide  codec for btreemap

due to orphan for mod, use local struct named `CodecBTreeMap`

* Update latest bitcoin-rust dependeces

* Implement initial vote weight via coin age (paritytech#87)

* Use struct instead of map as much as possible

* Unchecked initial version

* All intentions except these validators are candidates

* Add harsh test

* Put candidates into stats

* Rename unstake to deactive

* Revert StakeWeight

* Remove useless code

* Remove MAX_INTENTIONS

* Refactor with btreemap (paritytech#88)

* Refactor NominationRecordsOf to NominationRecords using BTreeMap

* Remove candidate_count

* Rename deactive to deactivate

* optimization match (paritytech#89)

* remove ensureaccountliquid in tokenbalances and support

for ensureaccountliquied has changed in staking module

* Hotfix/fix stakeweight type (paritytech#90)

* Revert StakeWeight type

* Change Balance to u64

* Fix total_minted and remove valid_cands_weight

* Fix insert registration information failure (paritytech#91)

* Change receive_address type

* Update exterbn

* update secp256k1 dependency (paritytech#94)

* Fix receive_address bug

* Support new substrate in cxrml

* update rust-secp256k1 dependeces

* Runtime build ok

* Build ok

* New runtime interface

* Update all runtime module

* Runtime build ok

* All build ok

* Add node runtime to support chainx runtime

* Update new runtime
helin6 pushed a commit to boolnetwork/substrate that referenced this issue Jul 25, 2023
* Update to substrate alpha 6

* Bump version and add release notes

* Upgrade async-std dev dependency

* Fix readme license links
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
J0-enhancement An additional feature request. U2-some_time_soon Issue is worth doing soon. Z2-medium Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase.
Projects
None yet
Development

No branches or pull requests

3 participants