Bacalhau jobs currently are not able to dynamically access network resources. They can access network resources up front by declaring them as IPFS or HTTP(S) downloads that are shared amongst all nodes.
There are a few reasons for this:
There are lots of use cases we currently can’t meet because of this restriction.
Note: maintaining these restrictions for general networking (i.e. allowing jobs to open sockets, even with an allow-list) is hard. Where possible, in the following use cases we have considered alternatives to needing to do that.
A user has come along and tried to build Nix packages on Bacalhau. We (Simon) has also tried to build Rust into WASM using Bacalhau.
We are interested in this use case because:
bacalhau run rust
could translate into a Docker job to compile a binary and then a WASM job to execute it).Our Nix user told us that there’s little value in trying to run this type of workload on Bacalhau if the dependencies have to be computed up front because doing that is a majority part of running the build. So the user would need access to the package repository for their language in a way their build tools expect (e.g. via an API).
Once challenge is: how do we stop people running pip install bitcoin_miner
and sucking up our compute at build time?