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

multi: move the btcutil repo into btcd as a sub-module #1785

Merged
merged 3 commits into from Jan 11, 2022

Conversation

Roasbeef
Copy link
Member

In this PR, we move the btcutil repo into btcd itself as a sub-module, as suggested in #1777. With this change we won't need to retain the copy of btcec v1 and can skip to using the `v2 version instead directly.

Once this PR is merged, we'll need to push a btcutil/v1.0.0 tag. After that I can update the go.mod in the btcutil sub-module to use a replace directive as normal, since it needs to reference a version of the greater btcd module as is.

If we don't want to finally bite the bullet and move over to having more sub-modules in btcd, then I can modify the initial commit to just add the new package to the existing btcd super-module.

The final commit borrows the Makefile that btcutil borrowed from the lnd repo.

@Roasbeef
Copy link
Member Author

--- FAIL: TestUseBlockHash (0.00s)
    builder_test.go:86: Address script build failed: unable to generate payment script for unsupported address type *btcutil.AddressScriptHash

So I think we might actually need to do things in two phases:

  1. PR that moves the package into the repo.
    1a. Tag a new module after the above PR is merged.
  2. PR that updates imports, and the top-level go.mod.

@Roasbeef
Copy link
Member Author

OK, so I might've found a way around things. Just pushed up a new version, builds for mew locally....

The change here is to not attempt to replace the main btcd module from within btcutil, and also stop using PayToAddrScript from within the btcutl/gcs tests. If this works, then we just need to merge this, then make a new PR after the new tags are added to put the replace directives in place.

@coveralls
Copy link

coveralls commented Jan 11, 2022

Pull Request Test Coverage Report for Build 1680556584

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+26.8%) to 79.676%

Totals Coverage Status
Change from base Build 1578469814: 26.8%
Covered Lines: 1231
Relevant Lines: 1545

💛 - Coveralls

In this commit, we move `btcutil` as well as its sub-module, the `psbt`
package into the `btcd` repo itself.
In this commit, we update all the btcutil imports to point to the new
sub-module.

In the same commit, we also modify the recently added `btcutil/go.mod`
file as we need to continue pointing to the _old_ version of btcd, until
we merge this PR and push a new tag.
In this commit, we adapt the Makefile that was being used for the
btcutil project to work for btcd as well. The Makefile is pretty simple,
and is just a series of templated commands. Overtime, we can pull in
some of the `lnd` additions as well, which we use to handle our
reproducible build and verification system.
@Roasbeef
Copy link
Member Author

Looks like we had a build y'all!

After this, it'll remove the old CI builds and have the newer ones instead be shown as required.

Copy link

@positiveblue positiveblue left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

@Roasbeef Roasbeef merged commit 97732e5 into btcsuite:master Jan 11, 2022
Roasbeef added a commit to Roasbeef/btcutil that referenced this pull request Jan 26, 2022
After [this PR](btcsuite/btcd#1785) this repo is
now deprecated as the code lives in `btcd` within a new sub-module. In
this commit, we remove all the code, and update the README to point to
the new location.
Roasbeef added a commit to Roasbeef/btcutil that referenced this pull request Jan 26, 2022
After [this PR](btcsuite/btcd#1785) this repo is
now deprecated as the code lives in `btcd` within a new sub-module. In
this commit, we remove all the code, and update the README to point to
the new location.
Roasbeef added a commit to Roasbeef/btcutil that referenced this pull request Jan 29, 2022
After [this PR](btcsuite/btcd#1785) this repo is
now deprecated as the code lives in `btcd` within a new sub-module. In
this commit, we remove all the code, and update the README to point to
the new location.
vpereira01 added a commit to vpereira01/btcd that referenced this pull request Feb 22, 2022
With PR btcsuite#1785 multiple coverage reports are sent to coveralls. This
makes coveralls only conside the last report sent. This fix treat all reports
has parallel reports so they can all be compiled later by coveralls.
vpereira01 added a commit to vpereira01/btcd that referenced this pull request Feb 22, 2022
With PR btcsuite#1785 multiple coverage reports are sent to coveralls. This
makes coveralls only conside the last report sent. This fix treat all reports
has parallel reports so they can all be compiled later by coveralls.
vpereira01 added a commit to vpereira01/btcd that referenced this pull request Feb 23, 2022
With PR btcsuite#1785 multiple coverage reports are sent to coveralls. This
makes coveralls only consider the last report sent. This fix treat all
reports has parallel reports so they can all be compiled later by coveralls.
vpereira01 added a commit to vpereira01/btcd that referenced this pull request Mar 7, 2022
With PR btcsuite#1785 multiple coverage reports are sent to coveralls. This
makes coveralls only consider the last report sent. This fix treat all
reports has parallel reports so they can all be compiled later by coveralls.
jcvernaleo pushed a commit that referenced this pull request Mar 10, 2022
With PR #1785 multiple coverage reports are sent to coveralls. This
makes coveralls only consider the last report sent. This fix treat all
reports has parallel reports so they can all be compiled later by coveralls.
vpereira01 added a commit to vpereira01/btcd that referenced this pull request Mar 10, 2022
With PR btcsuite#1785 multiple coverage reports are sent to coveralls. This
makes coveralls only consider the last report sent. This fix treat all
reports has parallel reports so they can all be compiled later by coveralls.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants