Skip to content

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented May 11, 2018

No description provided.

@maflcko maflcko force-pushed the Mf1805-benchBlockAssemble branch 2 times, most recently from faa3c5f to faf173d Compare May 11, 2018 20:37
@fanquake fanquake added the Tests label May 12, 2018
@maflcko maflcko force-pushed the Mf1805-benchBlockAssemble branch 3 times, most recently from fa356f5 to fa23b6e Compare May 12, 2018 16:23
@sipa
Copy link
Member

sipa commented May 12, 2018

Concept ACK

@practicalswift
Copy link
Contributor

Very nice!

Concept ACK

@maflcko
Copy link
Member Author

maflcko commented May 13, 2018

Can be tested with e.g. #13011 applied

./src/bench/bench_bitcoin --filter=AssembleBlock

@TheBlueMatt
Copy link
Contributor

TheBlueMatt commented May 13, 2018 via email

@maflcko maflcko force-pushed the Mf1805-benchBlockAssemble branch 2 times, most recently from 71344a7 to adf7c46 Compare May 13, 2018 16:42
@maflcko maflcko force-pushed the Mf1805-benchBlockAssemble branch from adf7c46 to fa0fc1b Compare May 13, 2018 16:46
@promag
Copy link
Contributor

promag commented May 13, 2018

Concept ACK.

Copy link
Contributor

@conscott conscott left a comment

Choose a reason for hiding this comment

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

Tested ACK fa0fc1b

@jamesob
Copy link
Contributor

jamesob commented May 17, 2018

utACK fa0fc1b

Code looks good. We need more benches like this.

@laanwj
Copy link
Member

laanwj commented Jun 24, 2018

utACK fa0fc1b

@laanwj laanwj merged commit fa0fc1b into bitcoin:master Jun 24, 2018
laanwj added a commit that referenced this pull request Jun 24, 2018
fa0fc1b bench: Add block assemble benchmark (MarcoFalke)

Pull request description:

Tree-SHA512: 614da28020b76154f4cb17752df226466d2d7da7a81f31812e10ca5b94987c7f5abab62b2f45a3a958663bd8cbf2191f3f23e497215196ad7a775f0ea8fb6116
laanwj added a commit to laanwj/bitcoin that referenced this pull request Jun 24, 2018
Fix a build error introduced in bitcoin#13219.

```
.../bitcoin/src/bench/block_assemble.cpp:42:13:error: use of undeclared identifier 'CheckProofOfWork'
    while (!CheckProofOfWork(block->GetHash(), block->nBits, Params().GetConsensus())) {
```
laanwj added a commit that referenced this pull request Jun 24, 2018
cec84c2 bench: Add missing pow.h header (Wladimir J. van der Laan)

Pull request description:

  Fix a build error introduced in #13219.

  ```
  .../bitcoin/src/bench/block_assemble.cpp:42:13:error: use of undeclared identifier 'CheckProofOfWork'
      while (!CheckProofOfWork(block->GetHash(), block->nBits, Params().GetConsensus())) {
  ```

Tree-SHA512: 6ef78011fd7bd82859530b2676ba533b15db6c753cb84a1286b7e26ed6f3d2064769e42900b2479fe6c460411f742e2baed716db5eac06d3bc455e08c290a087
stamhe pushed a commit to stamhe/bitcoin that referenced this pull request Jun 27, 2018
Fix a build error introduced in bitcoin#13219.

```
.../bitcoin/src/bench/block_assemble.cpp:42:13:error: use of undeclared identifier 'CheckProofOfWork'
    while (!CheckProofOfWork(block->GetHash(), block->nBits, Params().GetConsensus())) {
```
Longyan-Wu pushed a commit to Longyan-Wu/bitcoin that referenced this pull request Jul 1, 2018
Fix a build error introduced in bitcoin#13219.

```
.../bitcoin/src/bench/block_assemble.cpp:42:13:error: use of undeclared identifier 'CheckProofOfWork'
    while (!CheckProofOfWork(block->GetHash(), block->nBits, Params().GetConsensus())) {
```
@maflcko maflcko deleted the Mf1805-benchBlockAssemble branch July 14, 2018 14:54
maflcko pushed a commit that referenced this pull request Jul 30, 2018
6f53edb Acquire cs_main before ATMP call in block_assemble bench (James O'Beirne)

Pull request description:

  Calling `bench_bitcoin` currently fails due to calling ATMP without acquiring cs_main first in the recently added block_assemble bench (#13219).

  ```
  $ cat <(uname -a) <(gcc --version)

  Linux james 4.4.0-119-generic #143+jamesob SMP Mon Apr 16 21:47:24 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux
  gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609

  $ ./src/bench/bench_bitcoin

  WARNING: This is a debug build - may result in slower benchmarks.
  # Benchmark, evals, iterations, total, min, max, median
  Assertion failed: lock cs_main not held in validation.cpp:566; locks held:
  [1]    19323 abort (core dumped)  ./src/bench/bench_bitcoin
  ```

  ```
  (gdb) bt
  #0  0x00007fbdc9cf5428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
  #1  0x00007fbdc9cf702a in __GI_abort () at abort.c:89
  #2  0x0000555a19580dc5 in AssertLockHeldInternal (pszName=pszName@entry=0x555a19834549 "cs_main",
      pszFile=pszFile@entry=0x555a1988a001 "validation.cpp", nLine=nLine@entry=566, cs=cs@entry=0x555a19ba55c0 <cs_main>) at sync.cpp:157
  #3  0x0000555a194b395f in AcceptToMemoryPoolWorker (chainparams=..., pool=..., state=...,
      ptx=std::shared_ptr (count 1, weak 0) 0x555a1bb819b0, pfMissingInputs=pfMissingInputs@entry=0x0, nAcceptTime=1532964079,
      plTxnReplaced=0x0, bypass_limits=false, nAbsurdFee=@0x7ffcbc1719d8: 0, coins_to_uncache=std::vector of length 0, capacity 0,
      test_accept=false) at validation.cpp:566
  #4  0x0000555a194ba661 in AcceptToMemoryPoolWithTime (chainparams=..., pool=..., state=...,
      tx=std::shared_ptr (count 1, weak 0) 0x555a1bb819b0, pfMissingInputs=pfMissingInputs@entry=0x0, nAcceptTime=<optimized out>,
      plTxnReplaced=0x0, bypass_limits=false, nAbsurdFee=0, test_accept=false) at validation.cpp:998
  #5  0x0000555a194ba7ce in AcceptToMemoryPool (pool=..., state=..., tx=std::shared_ptr (count 1, weak 0) 0x555a1bb819b0,
      pfMissingInputs=pfMissingInputs@entry=0x0, plTxnReplaced=plTxnReplaced@entry=0x0, bypass_limits=bypass_limits@entry=false, nAbsurdFee=0,
      test_accept=false) at validation.cpp:1014
  #6  0x0000555a19363fbe in AssembleBlock (state=...) at bench/block_assemble.cpp:102
  #7  0x0000555a193654d3 in std::_Function_handler<void (benchmark::State&), void (*)(benchmark::State&)>::_M_invoke(std::_Any_data const&, benchmark::State&) (__functor=..., __args#0=...) at /usr/include/c++/5/functional:1871
  #8  0x0000555a193501d7 in std::function<void (benchmark::State&)>::operator()(benchmark::State&) const (this=this@entry=0x555a1ba2cda0,
      __args#0=...) at /usr/include/c++/5/functional:2267
  #9  0x0000555a1934ec4c in benchmark::BenchRunner::RunAll (printer=..., num_evals=5, scaling=<optimized out>, filter=..., is_list_only=false)
      at bench/bench.cpp:121
  #10 0x0000555a1934ade9 in main (argc=<optimized out>, argv=<optimized out>) at bench/bench_bitcoin.cpp:92
  ```

Tree-SHA512: fdd7b28ff123ccea7a4f334d53f735d0c0f94aa9cc52520c2dd34dca45d78c691af64efcd32366fc472fedffbd79591d2be2bb3bfc4a5186e8712b6b452d64e3
HashUnlimited pushed a commit to HashUnlimited/chaincoin that referenced this pull request Sep 11, 2018
Fix a build error introduced in bitcoin#13219.

```
.../bitcoin/src/bench/block_assemble.cpp:42:13:error: use of undeclared identifier 'CheckProofOfWork'
    while (!CheckProofOfWork(block->GetHash(), block->nBits, Params().GetConsensus())) {
```
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Apr 27, 2020
Summary: This is a backport of Core [[bitcoin/bitcoin#13219 | PR13219]] and [[bitcoin/bitcoin#13806 | PR13806]] . Due to many backport being done out of oder or improperly, this contains elements of [[bitcoin/bitcoin#15413 | PR15413]] and [[bitcoin/bitcoin#15788 | PR15788]]

Test Plan:
  make check
  ./src/bench/bench_bitcoin

Check that the new benchmark is run.

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D5848
ftrader pushed a commit to bitcoin-cash-node/bitcoin-cash-node that referenced this pull request Aug 17, 2020
Summary: This is a backport of Core [[bitcoin/bitcoin#13219 | PR13219]] and [[bitcoin/bitcoin#13806 | PR13806]] . Due to many backport being done out of oder or improperly, this contains elements of [[bitcoin/bitcoin#15413 | PR15413]] and [[bitcoin/bitcoin#15788 | PR15788]]

Test Plan:
  make check
  ./src/bench/bench_bitcoin

Check that the new benchmark is run.

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D5848
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants