Skip to content

Conversation

@m3dwards
Copy link
Collaborator

Kubernetes default networking prevents bitcoin core from routing traffic between nodes. Until we have a better workaround for that problem these images are of a modified bitcoin core that will route to private IP addresses.

Unlike warnets standard bitcoin-core images which download bitcoin core binary, these images are built from bitcoin core source so that we can apply a patch.

@vercel
Copy link

vercel bot commented Nov 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
warnet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 22, 2024 2:00pm

@willcl-ark
Copy link
Contributor

Nice work!

Until we have a better workaround for that problem these images are of a modified bitcoin core that will route to private IP addresses.

One nit in the desc, not for you but for future devs: Core always routes (traffic) to private IP addresses, but the patch marks the CNetAddr as IsRoutable() which in turn affects it's "reachability" (according to Core) and therefore whether they should be gossiped (or not) on the network in addr messages.

Will take a proper look later.

@josibake
Copy link
Collaborator

josibake commented Dec 6, 2023

this needs a few changes:

  • following a discussion in the chat, we should just use the same image for both docker and k8s, since we are moving towards just using the patch for now
  • we dont need to download binaries
  • we should figure out how to build older tagged versions on an ad hoc basis (low priority for now)

--build-arg BRANCH="v${VERSION}" \
--build-arg BUILD_ARGS="${BUILD_ARGS}" \
--tag "${IMAGE_FULL_NAME}" \
. --push
Copy link
Contributor

Choose a reason for hiding this comment

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

This was not specifying --file Dockerfile_k8s so (for me) it was using the default Dockerfile.

This could be why @josibake observed networking not working? (perhaps patch not applied?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Could have been. I might have built and pushed the images and then renamed the Dockerfile but forgot to update it here. I might be misremembering but I thought I saw bitcoind compiling.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We should re-push the images though as there is doubt.

Copy link
Collaborator

Choose a reason for hiding this comment

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

were the images re-pushed? if not no worries, was going to do it now as part of testing this PR

Copy link
Contributor

Choose a reason for hiding this comment

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

I did not re-push anything

@willcl-ark
Copy link
Contributor

Removed my commits for now, as we are not sure if the patch actually works?

@josibake
Copy link
Collaborator

josibake commented Dec 8, 2023

Removed my commits for now, as we are not sure if the patch actually works?

why not just keep the PR open for now with the commits? still works for docker, we just tell docker to assign IPs in a /8 subnet and can still remove code where we are manually generating and assigning the IPs.

still need to do some thinking about k8s, but until then i dont see any point in remove commits from the PR

@willcl-ark
Copy link
Contributor

The pr is open?

@josibake
Copy link
Collaborator

josibake commented Dec 8, 2023

The pr is open?

"..with the commits"

m3dwards and others added 2 commits January 22, 2024 13:10
* remove erroneous whitespace
* Reference correct dockerfile
* Add Bitcoin Core v26.0
@willcl-ark willcl-ark force-pushed the patched-bitcoin-docker-images branch from 1397282 to c191dee Compare January 22, 2024 13:59
@willcl-ark
Copy link
Contributor

LGTM.
Let's get this in for now then.

@willcl-ark willcl-ark merged commit 2de17f1 into main Jan 22, 2024
@willcl-ark
Copy link
Contributor

I am pushing v26.0 to docker hub too, so that main graph should work on k8s

@m3dwards m3dwards deleted the patched-bitcoin-docker-images branch January 29, 2024 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

4 participants