Skip to content

Conversation

jonatack
Copy link
Member

This commit proposes documentation that would have been helpful to me when setting up RapidCheck to work correctly with Bitcoin Core. I tested these instructions repeatedly with Linux (Debian 4.19 / GCC 8.3) and macOS (10.14.6 / AppleClang 10).

The markdown version can be seen at https://github.com/jonatack/bitcoin/blob/rapidcheck-documentation/doc/rapidcheck.md.

@fanquake fanquake added the Docs label Aug 18, 2019
@jonatack jonatack force-pushed the rapidcheck-documentation branch from 1f11597 to 093dfb1 Compare August 19, 2019 00:03
Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

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

Concept ACK. Thanks for writing more documentation. Some of it seems a bit verbose. i.e I don't think we need a dump of the rapidcheck build output in here (that's also likely to change, and wont look the same for everyone anyways). I left a few comments inline.

@Christewart I see you've seen this PR already, but would be good to get your review / thoughts as well.

@jonatack jonatack force-pushed the rapidcheck-documentation branch from 093dfb1 to 8616c81 Compare August 19, 2019 07:19
@jonatack
Copy link
Member Author

Thank you for reviewing @fanquake. Updated with your feedback and rebased.

@laanwj
Copy link
Member

laanwj commented Aug 19, 2019

Looks good to me, thanks for adding documentation!

Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

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

ACK 8616c81 - Thanks for updating.


## Running

If RapidCheck is installed, Bitcoin Core will automatically run the
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to run these by default? This forces everyone to install rapidcheck. I think that is reasonable when we have a pre-configured way to easily install rapidcheck. AFAIK this isn't this case, unless I missed a PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

Currently, RapidCheck is auto-configured only if librapidcheck.a is detected, which IIUC doesn't force anyone to install it. I think this is outside the scope of the doc which addresses the current situation. FWIW I'm working on updating the RapidCheck Makefile to maybe/hopefully autobuild cleanly and can update this doc in that PR if needed.

Copy link
Member Author

Choose a reason for hiding this comment

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

(Rapidcheck auto-configure as seen in configure.ac:L134-138 and 1280-1292)

Thanks for reviewing!

laanwj added a commit that referenced this pull request Aug 19, 2019
…ation

8616c81 doc: initial RapidCheck property-based testing documentation (Jon Atack)

Pull request description:

  This commit proposes documentation that would have been helpful to me when setting up RapidCheck to work correctly with Bitcoin Core. I tested these instructions repeatedly with Linux (Debian 4.19 / GCC 8.3) and macOS (10.14.6 / AppleClang 10).

  The markdown version can be seen at https://github.com/jonatack/bitcoin/blob/rapidcheck-documentation/doc/rapidcheck.md.

ACKs for top commit:
  fanquake:
    ACK 8616c81 - Thanks for updating.

Tree-SHA512: 9c2a65f0eb99f59e9adfea82855f217727a8a9d30618c1c0bdd2a73ae9c1ee61bc7efd59fc8703a666d182ad4220e22d6034ac3109311e6573dad00dfa4b06ea
@laanwj laanwj merged commit 8616c81 into bitcoin:master Aug 19, 2019
@jonatack jonatack deleted the rapidcheck-documentation branch August 19, 2019 16:43
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Feb 27, 2020
Summary:
This is an initial integration of the rapidcheck property based tests.
The original test has been slightly modified to adapt to our codebase.
The feature has been added to CMake and the documentation updated
accordingly.
Note that as opposed to autotools, which enables the test automatically
if `rapidcheck` is installed, it is disabled by default with cmake and
requires a flag to be set by the user.

Backport of core [[bitcoin/bitcoin#12775 | PR12775]], [[bitcoin/bitcoin#16622 | PR16622]] and [[bitcoin/bitcoin#16645 | PR16645]].

Test Plan:
Read the doc and install rapidcheck.

  ../configure
Ensure that rapidcheck is used by looking at the summary.
  make check

Ensure there is no regression:
  cmake -GNinja ..
  ninja check

  cmake -GNinja .. -DENABLE_PROPERTY_BASED_TESTS=ON
Check in the output that `rapidcheck` is enabled by searching for a
couple lines similar to:
```
  -- Found Rapidcheck: /usr/local/include
  -- Found Rapidcheck: /usr/local/lib/librapidcheck.a
```
  ninja check

Assuming you are running a 64-bit Linux machine:
  cd depends
  RAPIDCHECK=1 make build-linux64
Check the `rapidcheck` package is built.
  cd .. && mkdir buildLinux64 && cd buildLinux64
  cmake -GNinja .. \
    -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/Linux64.cmake \
    -DENABLE_PROPERTY_BASED_TESTS=ON
Check the `rapidcheck` lib found is the one from the `depends`.
  ninja check

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Subscribers: jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D5323
deadalnix pushed a commit to Bitcoin-ABC/secp256k1 that referenced this pull request Feb 28, 2020
Summary:
This is an initial integration of the rapidcheck property based tests.
The original test has been slightly modified to adapt to our codebase.
The feature has been added to CMake and the documentation updated
accordingly.
Note that as opposed to autotools, which enables the test automatically
if `rapidcheck` is installed, it is disabled by default with cmake and
requires a flag to be set by the user.

Backport of core [[bitcoin/bitcoin#12775 | PR12775]], [[bitcoin/bitcoin#16622 | PR16622]] and [[bitcoin/bitcoin#16645 | PR16645]].

Test Plan:
Read the doc and install rapidcheck.

  ../configure
Ensure that rapidcheck is used by looking at the summary.
  make check

Ensure there is no regression:
  cmake -GNinja ..
  ninja check

  cmake -GNinja .. -DENABLE_PROPERTY_BASED_TESTS=ON
Check in the output that `rapidcheck` is enabled by searching for a
couple lines similar to:
```
  -- Found Rapidcheck: /usr/local/include
  -- Found Rapidcheck: /usr/local/lib/librapidcheck.a
```
  ninja check

Assuming you are running a 64-bit Linux machine:
  cd depends
  RAPIDCHECK=1 make build-linux64
Check the `rapidcheck` package is built.
  cd .. && mkdir buildLinux64 && cd buildLinux64
  cmake -GNinja .. \
    -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/Linux64.cmake \
    -DENABLE_PROPERTY_BASED_TESTS=ON
Check the `rapidcheck` lib found is the one from the `depends`.
  ninja check

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Subscribers: jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D5323
ftrader pushed a commit to bitcoin-cash-node/bitcoin-cash-node that referenced this pull request May 19, 2020
Summary:
This is an initial integration of the rapidcheck property based tests.
The original test has been slightly modified to adapt to our codebase.
The feature has been added to CMake and the documentation updated
accordingly.
Note that as opposed to autotools, which enables the test automatically
if `rapidcheck` is installed, it is disabled by default with cmake and
requires a flag to be set by the user.

Backport of core [[bitcoin/bitcoin#12775 | PR12775]], [[bitcoin/bitcoin#16622 | PR16622]] and [[bitcoin/bitcoin#16645 | PR16645]].

Test Plan:
Read the doc and install rapidcheck.

  ../configure
Ensure that rapidcheck is used by looking at the summary.
  make check

Ensure there is no regression:
  cmake -GNinja ..
  ninja check

  cmake -GNinja .. -DENABLE_PROPERTY_BASED_TESTS=ON
Check in the output that `rapidcheck` is enabled by searching for a
couple lines similar to:
```
  -- Found Rapidcheck: /usr/local/include
  -- Found Rapidcheck: /usr/local/lib/librapidcheck.a
```
  ninja check

Assuming you are running a 64-bit Linux machine:
  cd depends
  RAPIDCHECK=1 make build-linux64
Check the `rapidcheck` package is built.
  cd .. && mkdir buildLinux64 && cd buildLinux64
  cmake -GNinja .. \
    -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/Linux64.cmake \
    -DENABLE_PROPERTY_BASED_TESTS=ON
Check the `rapidcheck` lib found is the one from the `depends`.
  ninja check

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Subscribers: jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D5323
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 27, 2021
…ocumentation

8616c81 doc: initial RapidCheck property-based testing documentation (Jon Atack)

Pull request description:

  This commit proposes documentation that would have been helpful to me when setting up RapidCheck to work correctly with Bitcoin Core. I tested these instructions repeatedly with Linux (Debian 4.19 / GCC 8.3) and macOS (10.14.6 / AppleClang 10).

  The markdown version can be seen at https://github.com/jonatack/bitcoin/blob/rapidcheck-documentation/doc/rapidcheck.md.

ACKs for top commit:
  fanquake:
    ACK 8616c81 - Thanks for updating.

Tree-SHA512: 9c2a65f0eb99f59e9adfea82855f217727a8a9d30618c1c0bdd2a73ae9c1ee61bc7efd59fc8703a666d182ad4220e22d6034ac3109311e6573dad00dfa4b06ea
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 28, 2021
…ocumentation

8616c81 doc: initial RapidCheck property-based testing documentation (Jon Atack)

Pull request description:

  This commit proposes documentation that would have been helpful to me when setting up RapidCheck to work correctly with Bitcoin Core. I tested these instructions repeatedly with Linux (Debian 4.19 / GCC 8.3) and macOS (10.14.6 / AppleClang 10).

  The markdown version can be seen at https://github.com/jonatack/bitcoin/blob/rapidcheck-documentation/doc/rapidcheck.md.

ACKs for top commit:
  fanquake:
    ACK 8616c81 - Thanks for updating.

Tree-SHA512: 9c2a65f0eb99f59e9adfea82855f217727a8a9d30618c1c0bdd2a73ae9c1ee61bc7efd59fc8703a666d182ad4220e22d6034ac3109311e6573dad00dfa4b06ea
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 29, 2021
…ocumentation

8616c81 doc: initial RapidCheck property-based testing documentation (Jon Atack)

Pull request description:

  This commit proposes documentation that would have been helpful to me when setting up RapidCheck to work correctly with Bitcoin Core. I tested these instructions repeatedly with Linux (Debian 4.19 / GCC 8.3) and macOS (10.14.6 / AppleClang 10).

  The markdown version can be seen at https://github.com/jonatack/bitcoin/blob/rapidcheck-documentation/doc/rapidcheck.md.

ACKs for top commit:
  fanquake:
    ACK 8616c81 - Thanks for updating.

Tree-SHA512: 9c2a65f0eb99f59e9adfea82855f217727a8a9d30618c1c0bdd2a73ae9c1ee61bc7efd59fc8703a666d182ad4220e22d6034ac3109311e6573dad00dfa4b06ea
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 1, 2021
…ocumentation

8616c81 doc: initial RapidCheck property-based testing documentation (Jon Atack)

Pull request description:

  This commit proposes documentation that would have been helpful to me when setting up RapidCheck to work correctly with Bitcoin Core. I tested these instructions repeatedly with Linux (Debian 4.19 / GCC 8.3) and macOS (10.14.6 / AppleClang 10).

  The markdown version can be seen at https://github.com/jonatack/bitcoin/blob/rapidcheck-documentation/doc/rapidcheck.md.

ACKs for top commit:
  fanquake:
    ACK 8616c81 - Thanks for updating.

Tree-SHA512: 9c2a65f0eb99f59e9adfea82855f217727a8a9d30618c1c0bdd2a73ae9c1ee61bc7efd59fc8703a666d182ad4220e22d6034ac3109311e6573dad00dfa4b06ea
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 1, 2021
…ocumentation

8616c81 doc: initial RapidCheck property-based testing documentation (Jon Atack)

Pull request description:

  This commit proposes documentation that would have been helpful to me when setting up RapidCheck to work correctly with Bitcoin Core. I tested these instructions repeatedly with Linux (Debian 4.19 / GCC 8.3) and macOS (10.14.6 / AppleClang 10).

  The markdown version can be seen at https://github.com/jonatack/bitcoin/blob/rapidcheck-documentation/doc/rapidcheck.md.

ACKs for top commit:
  fanquake:
    ACK 8616c81 - Thanks for updating.

Tree-SHA512: 9c2a65f0eb99f59e9adfea82855f217727a8a9d30618c1c0bdd2a73ae9c1ee61bc7efd59fc8703a666d182ad4220e22d6034ac3109311e6573dad00dfa4b06ea
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 12, 2021
…ocumentation

8616c81 doc: initial RapidCheck property-based testing documentation (Jon Atack)

Pull request description:

  This commit proposes documentation that would have been helpful to me when setting up RapidCheck to work correctly with Bitcoin Core. I tested these instructions repeatedly with Linux (Debian 4.19 / GCC 8.3) and macOS (10.14.6 / AppleClang 10).

  The markdown version can be seen at https://github.com/jonatack/bitcoin/blob/rapidcheck-documentation/doc/rapidcheck.md.

ACKs for top commit:
  fanquake:
    ACK 8616c81 - Thanks for updating.

Tree-SHA512: 9c2a65f0eb99f59e9adfea82855f217727a8a9d30618c1c0bdd2a73ae9c1ee61bc7efd59fc8703a666d182ad4220e22d6034ac3109311e6573dad00dfa4b06ea
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 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.

4 participants