Skip to content

Support OpenBSD/adJ #2782

@vtamara

Description

@vtamara

Context and scope

I was following the Subnet architecture course that required installing avalanche-cli, then I tried to do it on my platform that is OpenBSD/adJ 7.4 but it didn't work.

After some experiments that I described at ava-labs/avalanche-cli#1498 I was told by @arturrez to open this request here.

Discussion and alternatives

I was able to generate build/avalanchego by:

  1. Adding support for OpenBSD to utils/storage as described by this commit vtamara@07de44d explained by syscall: Statfs_t on OpenBSD with f_ golang/go#47958
  2. Modifying my downloaded version of [email protected] (used by avalanchego and avalanche-cli) to backport the support for OpenBSD added in version v1.1.0. Implementing the changes for vfs/disk_usage_openbsd.go and vfs/disk_usage_unix.go described at cockroachdb/pebble@v1.0.0...v1.1.0#diff-e80071db294208cc80f86aa6d7915a187eaa64a03a17ec7eec3a2d96bda5dbfb

However when I run build/avalanchego , it produces a segmentatio violation:... The segmentation violation was produced by supranational/blst, I opened an issue and the author improved that library and now build/avalanchego runs without issue.

In my humble opinion it is good for Avalanchego to:

  1. Support more platforms, and in particular OpenBSD/adJ that is well known for its security.
  2. Use an updated version of pebble that supports OpenBSD/adJ (greater than v1.1.0) or to fork the version v0.0.0-20230209160836-829675f94811 currently used by Avalanchego to support more platforms, in particular to backport the support for OpenBSD added in version v1.1.0
  3. Reproduce and further investigate the segmentation violation produced during my experiments on OpenBSD/adJ 7.4, because one possibility is that it is pointing to an avalanchego implementation bug triggered by OpenBSD security features. Upgrade blst to version 0.3.12 as requested at Update blst to 0.3.12 #3079

Open questions

  • Is there a bounty program to discover security flaws in avalanche?
  • Is there any grant program to port avalanchego/avalanche-cli to a different platorm like a secure and updated OpenBSD/adJ 7.4?
  • Do you envision running Avalanche nodes in platforms different to the current supported ones and particularly OpenBSD/adJ?
  • Should I open a PR with vtamara@07de44d ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Done 🎉

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions