Commit Graph

32 Commits

Author SHA1 Message Date
Andrew Poelstra 504f77adca
ci: revert #2301 "update download-artifact to v4" 2023-12-19 19:28:44 +00:00
dependabot[bot] 7e2321de75
Bump actions/download-artifact from 3 to 4
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 10:36:58 +00:00
Tobin C. Harding 69e56a64ed
Add bitcoin-units crate
Add a new crate `bitcoin-units`, move the `amount` module over to it and
re-export all types from `bitcoin::amount` so this as not a breaking
change.
2023-12-11 08:52:31 +11:00
Andrew Poelstra 539f4ba64c
apoelstra run of generate-files.sh 2023-10-10 14:39:15 -03:00
Einherjar 20f3a05d2a
ci: replace fuzz toolchain
old: `actions-rs/toolchain`
new: `dtolnay/rust-toolchain`

fix

ci(fuzz): change runner to ubuntu-latest

ci: update run syntax in fuzz job

ci: update and run fuzz/generate-files.sh
2023-10-10 14:39:15 -03:00
Einherjar 3e6021bbc6
ci: fuzz test YAML toolchain future-proof
To avoid YAML automatic parsing of inputs as floats,
e.g. [`1.60` being parsed as `1.6`](https://github.com/rust-bitcoin/rust-bitcoin/pull/2109#issuecomment-1751392327),
it is best to future-proof the `toolchain` input in CI fuzz testing
as a string.
2023-10-07 14:30:29 -03:00
Vincenzo Palazzo 4537634e7e ci: bump rustc to 1.60 for fuzz test
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-10-07 11:19:47 +02:00
dependabot[bot] 0f77afdef0
Bump actions/upload-artifact from 2 to 3
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 10:17:32 +00:00
dependabot[bot] ddcf705f6a
Bump actions/checkout from 2 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-09 15:26:36 +00:00
Andrew Poelstra 31c46d72a7
Merge rust-bitcoin/rust-bitcoin#2058: Bump actions/cache from 2 to 3
daa70ea931 Bump actions/cache from 2 to 3 (dependabot[bot])

Pull request description:

  Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3.
  <details>
  <summary>Release notes</summary>
  <p><em>Sourced from <a href="https://github.com/actions/cache/releases">actions/cache's releases</a>.</em></p>
  <blockquote>
  <h2>v3.0.0</h2>
  <ul>
  <li>
  <p>This change adds a minimum runner version(node12 -&gt; node16), which can break users using an out-of-date/fork of the runner. This would be most commonly affecting users on GHES 3.3 or before, as those runners do not support node16 actions and they can use actions from github.com via <a href="https://docs.github.com/en/enterprise-server@3.0/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect">github connect</a> or manually copying the repo to their GHES instance.</p>
  </li>
  <li>
  <p>Few dependencies and cache action usage examples have also been updated.</p>
  </li>
  </ul>
  <h2>Updating actions/core to version 1.10.0</h2>
  <p>The ::save-state and ::set-output are deprecated. The newer version of actions/core &gt;1.10.0 uses the new syntax for save and set output. After this change, customers using actions/cache@v2 won't see deprecation warning message.</p>
  <h2>v2.1.7</h2>
  <p>Support 10GB cache upload using the latest version <code>1.0.8</code> of <a href="https://www.npmjs.com/package/@actions/cache"><code>@actions/cache</code> </a></p>
  <h2>v2.1.6</h2>
  <ul>
  <li>Catch unhandled &quot;bad file descriptor&quot; errors that sometimes occurs when the cache server returns non-successful response (<a href="https://redirect.github.com/actions/cache/pull/596">actions/cache#596</a>)</li>
  </ul>
  <h2>v2.1.5</h2>
  <ul>
  <li>Fix permissions error seen when extracting caches with GNU tar that were previously created using BSD tar (<a href="https://redirect.github.com/actions/cache/issues/527">actions/cache#527</a>)</li>
  </ul>
  <h2>v2.1.4</h2>
  <ul>
  <li>Make caching more verbose <a href="https://redirect.github.com/actions/toolkit/pull/650">#650</a></li>
  <li>Use GNU tar on macOS if available <a href="https://redirect.github.com/actions/toolkit/pull/701">#701</a></li>
  </ul>
  <h2>v2.1.3</h2>
  <ul>
  <li>Upgrades <code>@actions/core</code> to v1.2.6 for <a href="https://github.com/advisories/GHSA-mfwh-5m23-j46w">CVE-2020-15228</a>. This action was not using the affected methods.</li>
  <li>Fix error handling in <code>uploadChunk</code> where 400-level errors were not being detected and handled correctly</li>
  </ul>
  <h2>v2.1.2</h2>
  <ul>
  <li>Adds input to limit the chunk upload size, useful for self-hosted runners with slower upload speeds</li>
  <li>No-op when executing on GHES</li>
  </ul>
  <h2>v2.1.1</h2>
  <ul>
  <li>Update <code>@actions/cache</code> package to <code>v1.0.2</code> which allows cache action to use posix format when taring files.</li>
  </ul>
  <h2>v2.1.0</h2>
  <ul>
  <li>Replaces the <code>http-client</code> with the Azure Storage SDK for NodeJS when downloading cache content from Azure.  This should help improve download performance and reliability as the SDK downloads files in 4 MB chunks, which can be parallelized and retried independently</li>
  <li>Display download progress and speed</li>
  </ul>
  </blockquote>
  </details>
  <details>
  <summary>Changelog</summary>
  <p><em>Sourced from <a href="https://github.com/actions/cache/blob/main/RELEASES.md">actions/cache's changelog</a>.</em></p>
  <blockquote>
  <h1>Releases</h1>
  <h3>3.0.0</h3>
  <ul>
  <li>Updated minimum runner version support from node 12 -&gt; node 16</li>
  </ul>
  <h3>3.0.1</h3>
  <ul>
  <li>Added support for caching from GHES 3.5.</li>
  <li>Fixed download issue for files &gt; 2GB during restore.</li>
  </ul>
  <h3>3.0.2</h3>
  <ul>
  <li>Added support for dynamic cache size cap on GHES.</li>
  </ul>
  <h3>3.0.3</h3>
  <ul>
  <li>Fixed avoiding empty cache save when no files are available for caching. (<a href="https://redirect.github.com/actions/cache/issues/624">issue</a>)</li>
  </ul>
  <h3>3.0.4</h3>
  <ul>
  <li>Fixed tar creation error while trying to create tar with path as <code>~/</code> home folder on <code>ubuntu-latest</code>. (<a href="https://redirect.github.com/actions/cache/issues/689">issue</a>)</li>
  </ul>
  <h3>3.0.5</h3>
  <ul>
  <li>Removed error handling by consuming actions/cache 3.0 toolkit, Now cache server error handling will be done by toolkit. (<a href="https://redirect.github.com/actions/cache/pull/834">PR</a>)</li>
  </ul>
  <h3>3.0.6</h3>
  <ul>
  <li>Fixed <a href="https://redirect.github.com/actions/cache/issues/809">#809</a> - zstd -d: no such file or directory error</li>
  <li>Fixed <a href="https://redirect.github.com/actions/cache/issues/833">#833</a> - cache doesn't work with github workspace directory</li>
  </ul>
  <h3>3.0.7</h3>
  <ul>
  <li>Fixed <a href="https://redirect.github.com/actions/cache/issues/810">#810</a> - download stuck issue. A new timeout is introduced in the download process to abort the download if it gets stuck and doesn't finish within an hour.</li>
  </ul>
  <h3>3.0.8</h3>
  <ul>
  <li>Fix zstd not working for windows on gnu tar in issues <a href="https://redirect.github.com/actions/cache/issues/888">#888</a> and <a href="https://redirect.github.com/actions/cache/issues/891">#891</a>.</li>
  <li>Allowing users to provide a custom timeout as input for aborting download of a cache segment using an environment variable <code>SEGMENT_DOWNLOAD_TIMEOUT_MINS</code>. Default is 60 minutes.</li>
  </ul>
  <h3>3.0.9</h3>
  <ul>
  <li>Enhanced the warning message for cache unavailablity in case of GHES.</li>
  </ul>
  <h3>3.0.10</h3>
  <ul>
  <li>Fix a bug with sorting inputs.</li>
  <li>Update definition for restore-keys in README.md</li>
  </ul>
  <!-- raw HTML omitted -->
  </blockquote>
  <p>... (truncated)</p>
  </details>
  <details>
  <summary>Commits</summary>
  <ul>
  <li><a href="704facf57e"><code>704facf</code></a> Merge pull request <a href="https://redirect.github.com/actions/cache/issues/1236">#1236</a> from actions/bethanyj28/bump-version</li>
  <li><a href="17e2888746"><code>17e2888</code></a> Add to RELEASES.md</li>
  <li><a href="667d8fdfa2"><code>667d8fd</code></a> bump action version to 3.3.2</li>
  <li><a href="f7ebb81a3f"><code>f7ebb81</code></a> Consume latest toolkit and fix dangling promise bug (<a href="https://redirect.github.com/actions/cache/issues/1217">#1217</a>)</li>
  <li><a href="67b839edb6"><code>67b839e</code></a> Merge pull request <a href="https://redirect.github.com/actions/cache/issues/1187">#1187</a> from jorendorff/jorendorff/rm-add-to-project</li>
  <li><a href="57f0e3f198"><code>57f0e3f</code></a> Remove actions to add new PRs and issues to a project board</li>
  <li><a href="04f198bf0b"><code>04f198b</code></a> Merge pull request <a href="https://redirect.github.com/actions/cache/issues/1132">#1132</a> from vorburger/bazel-example</li>
  <li><a href="bd9b49b6c3"><code>bd9b49b</code></a> Merge branch 'main' into bazel-example</li>
  <li><a href="ea0503788c"><code>ea05037</code></a> Merge pull request <a href="https://redirect.github.com/actions/cache/issues/1122">#1122</a> from actions/pdotl-patch-1</li>
  <li><a href="6a1a45d49b"><code>6a1a45d</code></a> Merge branch 'main' into pdotl-patch-1</li>
  <li>Additional commits viewable in <a href="https://github.com/actions/cache/compare/v2...v3">compare view</a></li>
  </ul>
  </details>
  <br />

  [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/cache&package-manager=github_actions&previous-version=2&new-version=3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

  Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

  [//]: # (dependabot-automerge-start)
  [//]: # (dependabot-automerge-end)

  ---

  <details>
  <summary>Dependabot commands and options</summary>
  <br />

  You can trigger Dependabot actions by commenting on this PR:
  - `@dependabot rebase` will rebase this PR
  - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
  - `@dependabot merge` will merge this PR after your CI passes on it
  - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
  - `@dependabot cancel merge` will cancel a previously requested merge and block automerging
  - `@dependabot reopen` will reopen this PR if it is closed
  - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
  - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

  </details>

ACKs for top commit:
  apoelstra:
    ACK daa70ea931
  tcharding:
    ACK daa70ea931

Tree-SHA512: bb832378a7b5cb507a253d263eb55e35bb54f2a738fd379c9022fc30ae81e29f92d5b861ccfae6c1f4bffeb3b72c29bac06cbd374277dcf8e3abd24a362ff459
2023-09-09 15:25:48 +00:00
dependabot[bot] daa70ea931
Bump actions/cache from 2 to 3
Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-08 20:23:05 +00:00
dependabot[bot] ba3c770e69
Bump actions/download-artifact from 2 to 3
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-08 20:23:02 +00:00
Andrew Poelstra a1aaf5f12c
ci: fix run syntax in fuzz job 2023-05-08 22:11:40 +00:00
Andrew Poelstra ab4a48c8ba
ci: use new fuzzing cfg flags when fuzzing bitcoin (but not hashes) 2023-05-01 21:33:11 +00:00
Andrew Poelstra 6534f22362
fuzz: auto-generate CI and Cargo.toml files 2023-04-27 00:24:52 +00:00
Andrew Poelstra 8021034d86
rename travis-fuzz.sh to fuzz.sh; partially patch CI 2023-04-27 00:24:52 +00:00
Jonathan Underwood a629bef85e
CI: Prevent duplicate CI runs 2023-03-22 08:19:30 -07:00
Tobin C. Harding b9643bf3e9 Import bitcoin_hashes crate into hashes
We would like to bring the `bitcoin_hashes` crate into the
`rust-bitcoin` repository.

Import `bitcoin_hashes` into `rust-bitocin/hashes`, doing so looses all
the commit history from the original crate but if we archive the
original repository then the history will be preserved. We maintain the
same version number obviously and in the changelog we note the change of
repository.

Commit hash that was tip of `bitcoin_hashes` at time of import:

 commit 54c16249e06cc6b7870c7fc07d90f489d82647c7

Includes making `embedded` and `fuzzing` per-crate i.e., move them into
`bitcoin` as hashes includes these also.

NOTE: Does _not_ enable fuzzing for `hashes` in CI.

Notes on CI:

Attempts to merge in the github actions from the hashes crate however reduces
coverage by not running hashes tests for beta toolchain. Some additional
work could be done to improve the CI to increase efficiency without
reducing coverage. Leaving for another day.
2022-11-08 08:58:09 +11:00
Tobin C. Harding cb9893c4a9 Add Target and Difficulty types
Currently we use the `Uint256` type to represent two proof of work
integers, namely target and difficulty (work).

It would be nice to not have a public integer type that is not fully
implemented (i.e., does not implement arithmetic etc as do integer types
in stdlib). Instead of implementing all the stdlib functions we can
instead add two new wrapper types, since these are not general purpose
integers they do not need to implement anything we do not need to use.

- Add a `pow` module.
- Put a modified version of `Uint256` to `pow`.
- Add two new wrapper types `Target` and `Difficulty`.
- Only implement methods that we use on each type.

Note this patch does not remove the original `Uint256`, that will be
done as a separate patch.
2022-09-28 04:16:59 +10:00
Tobin Harding b79c178ea8 Add fuzz test for PrefilledTransaction
Add a simple deserialization fuzz test for `PrefilledTransaction`.
2022-09-16 13:02:24 +10:00
Andrew Poelstra d25aba8ca0 fuzz: use travis-fuzz.sh in CI 2022-08-30 21:51:42 +00:00
Andrew Poelstra 407cbca111
fuzz: remove mysteriously-not-necessary quotes from gh action script 2022-08-30 20:42:28 +00:00
Andrew Poelstra 0a32525862
fuzz: disable features in honggfuzz 2022-08-30 20:42:28 +00:00
Andrew Poelstra c7910f4561
Revert "Temporarily disable fuzzing"
This reverts commit 720ea29865.
2022-08-30 20:42:28 +00:00
Tobin C. Harding 720ea29865 Temporarily disable fuzzing
Honggfuzz is broken, I have no idea why but no PRs can merge while its
broken.
2022-08-24 08:34:57 +10:00
sanket1729 8016a858f9 Tempararily pin fuzzer on rust 1.58
I think this might take a while to resolve and we should move ahead with
1.58. Looks like the fresh release of 1.59 added LLVM 13.0 that broke
some things.
2022-02-24 23:47:30 -08:00
Andrew Ahlers 006193f5b6 feat: Support running CI locally with `act`
Disable problematic jobs that involve Github Actions caching or `cross`
whenever the environment is set to ACT. This allows running the CI
pipeline locally and hopefully speeds up PR cycle times by reducing
unexpected CI pipeline results.
2022-02-17 21:11:30 +01:00
Riccardo Casatta 106acdc3ac
Add fuzzing for Witness struct 2021-12-28 09:56:41 +01:00
Martin Habovstiak 0e1b99359c Added fuzz test for `Script::bytes_to_asm_fmt`
This adds fuzz target for `Script::bytes_to_asm_fmt` which could
panic due to overflow in the past. Fuzzing should decrease the risk of
other panics.
2021-09-30 15:06:18 +02:00
Riccardo Casatta 2bbf63c7e0
Use stable toolchain for fuzzing 2021-09-27 20:04:14 +02:00
Riccardo Casatta 1aefc1ccf3
In fuzzing add a final job verifying all the fuzz targets have been executed 2021-09-24 11:49:42 +02:00
Riccardo Casatta 3e310d3c26
execute fuzzing in separate ci workflow 2021-09-23 11:41:03 +02:00