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

Qt: Network Watch tool #9849

Closed
wants to merge 2 commits into from
Closed

Qt: Network Watch tool #9849

wants to merge 2 commits into from

Conversation

@luke-jr
Copy link
Member

luke-jr commented Feb 24, 2017

Simple realtime log of p2p network activity (blocks and transactions only)

  • Doesn't begin logging until opened; limited to 0x400 entries (outputs)
  • Automatically scrolls if left at the bottom of the log; maintains position if left elsewhere
  • Memory-efficient circular buffer; CTransaction references become weak after they're 0x200 entries back in the log
  • Search function that selects all matching log entries, including ongoing
@fanquake fanquake added the GUI label Feb 24, 2017
@luke-jr luke-jr force-pushed the luke-jr:gui_netwatch branch Feb 24, 2017
src/qt/netwatch.cpp Outdated Show resolved Hide resolved
@paveljanik
Copy link
Contributor

paveljanik commented Feb 24, 2017

This is how it looks like here on testnet:

screen shot 2017-02-24 at 08 22 39

@jonasschnelli
Copy link
Member

jonasschnelli commented Feb 24, 2017

Thanks. Will review.
I just played a bit with it and had massive locking issues on mainnet during catch-up of 2-3 weeks.

@luke-jr luke-jr force-pushed the luke-jr:gui_netwatch branch 2 times, most recently to 9019229 Feb 24, 2017
@jonasschnelli
Copy link
Member

jonasschnelli commented Mar 17, 2017

Running this PR (built over gitian: https://bitcoin.jonasschnelli.ch/build/54) makes Bitcoin-Qt and also the rest of my apps almost unusable. Had to force kill the process.

@luke-jr luke-jr force-pushed the luke-jr:gui_netwatch branch 2 times, most recently to bbbef18 Aug 25, 2017
@luke-jr luke-jr force-pushed the luke-jr:gui_netwatch branch from bbbef18 to 22dff53 Mar 6, 2018
@laanwj
Copy link
Member

laanwj commented Mar 6, 2018

Concept ACK, I like having this, though we have to be sure that there is no performance impact when the monitor is not running, and as little as possible when it is.

@luke-jr
Copy link
Member Author

luke-jr commented Mar 7, 2018

The code is (already) disabled until the first time it is opened.

@luke-jr luke-jr force-pushed the luke-jr:gui_netwatch branch from 22dff53 Oct 30, 2018
@luke-jr luke-jr force-pushed the luke-jr:gui_netwatch branch Oct 30, 2018
@luke-jr
Copy link
Member Author

luke-jr commented Oct 30, 2018

Oops, had rebased onto 0.17 instead of master. Rebased for real this time.

src/qt/netwatch.cpp Outdated Show resolved Hide resolved
@DrahtBot DrahtBot removed the Needs rebase label Oct 30, 2018
@luke-jr luke-jr force-pushed the luke-jr:gui_netwatch branch to e8ca94c Oct 30, 2018
@DrahtBot DrahtBot mentioned this pull request Oct 30, 2018
Copy link
Member

promag left a comment

Concept ACK.

Code style is a bit outdated.

src/qt/bitcoingui.cpp Outdated Show resolved Hide resolved
src/qt/bitcoingui.cpp Outdated Show resolved Hide resolved
src/qt/netwatch.h Show resolved Hide resolved
src/qt/netwatch.h Show resolved Hide resolved
src/qt/netwatch.h Show resolved Hide resolved
src/qt/netwatch.cpp Outdated Show resolved Hide resolved
src/qt/netwatch.cpp Outdated Show resolved Hide resolved
src/qt/netwatch.cpp Show resolved Hide resolved
src/qt/netwatch.cpp Outdated Show resolved Hide resolved
src/qt/netwatch.cpp Show resolved Hide resolved
*((meta_t*)data) |= (3 << 30);
}

class NetWatchValidationInterface final : public CValidationInterface {

This comment has been minimized.

Copy link
@promag

promag Oct 31, 2018

Member

Should use/extend interfaces::Node instead?

@DrahtBot
Copy link
Contributor

DrahtBot commented Oct 31, 2018

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #16612 (qt: Remove menu icons by laanwj)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

src/qt/netwatch.h Outdated Show resolved Hide resolved
src/qt/netwatch.cpp Outdated Show resolved Hide resolved
src/qt/netwatch.h Outdated Show resolved Hide resolved
NetWatchLogModel& model;

public:
NetWatchValidationInterface(NetWatchLogModel& model_in) : model(model_in) {}

This comment has been minimized.

Copy link
@practicalswift

practicalswift Oct 31, 2018

Member

Should be explicit? :-)

src/qt/netwatch.cpp Outdated Show resolved Hide resolved
NWLMH_VALUE,
};

NetWatchLogModel(QWidget *parent);

This comment has been minimized.

Copy link
@practicalswift

practicalswift Oct 31, 2018

Member

Should be made explicit?

src/qt/netwatch.h Outdated Show resolved Hide resolved
--m_logskip;
} else {
// Haven't filled up yet, so just push_back
assert(!m_logpos);

This comment has been minimized.

Copy link
@ken2812221

ken2812221 Nov 3, 2018

Contributor

I see this assertion on Windows in testing, haven't take a look at the code.

image

This comment has been minimized.

Copy link
@luke-jr

luke-jr Feb 12, 2019

Author Member

Any idea how?>

src/qt/bitcoingui.cpp Outdated Show resolved Hide resolved
@luke-jr luke-jr force-pushed the luke-jr:gui_netwatch branch from 654f66d to 04e2b37 Feb 12, 2019
Simple realtime log of p2p network activity (blocks and transactions only)

- Doesn't begin logging until opened; limited to 0x400 entries (outputs)
- Automatically scrolls if left at the bottom of the log; maintains position if left elsewhere
- Memory-efficient circular buffer; CTransaction references become weak after they're 0x200 entries back in the log
- Search function that selects all matching log entries, including ongoing
@luke-jr luke-jr force-pushed the luke-jr:gui_netwatch branch from 04e2b37 to ba6074b Feb 12, 2019
@DrahtBot DrahtBot removed the Needs rebase label Feb 12, 2019
ptx_old->~CTransactionRef();
CTransactionWeakref * const ptx_new = get<CTransactionWeakref>();
new (ptx_new) CTransactionWeakref(tx);
*((meta_t*)m_data) |= (3 << 30);

This comment has been minimized.

Copy link
@practicalswift

practicalswift Feb 13, 2019

Member

Shift overflow?

@DrahtBot
Copy link
Contributor

DrahtBot commented Aug 16, 2019

Needs rebase
@laanwj
Copy link
Member

laanwj commented Sep 30, 2019

As this PR has been inactive for a long time, I'm closing this (but marking "up for grabs").

@laanwj laanwj added Up for grabs and removed Needs rebase labels Sep 30, 2019
@laanwj laanwj closed this Sep 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

10 participants
You can’t perform that action at this time.