crypto-bug-hunters / bug-buster

🪲 Bug Buster, a bug bounty platform powered by Cartesi Rollups
https://x.com/BugBusterApp
Apache License 2.0
10 stars 13 forks source link

Build extra binaries in root Dockerfile #145

Closed guidanoli closed 1 month ago

guidanoli commented 3 months ago

Context

In the early days of Bug Buster, all bounties were added via inputs. Then, we noticed some programs were too big to add via inputs. So, we created built-in bounties, which are just bundles already in the template machine. We've also added the possibility to reference these bundles through their paths.

Now, we've added built-in bundles for:

We're soon thinking of adding one for Reth, but the problem is... It takes a lot of time to untar Reth, so it would be better if it were in the filesystem ready to be run. This gives us an opportunity to built Reth in the root Dockerfile. If we do this for all extra programs we've collected so far, we wouldn't need to do make bounties before pnpm build.

Maybe we'd still need to do it for tests? But, still, they would be much smaller, containing basically the start.sh file.

Also, maybe there's a better way to organize this root Dockerfile as it grows? Maybe separate it into smaller Dockefiles, and make the main one reference the others? I'm sure more seasoned devs like @endersonmaia will have an opinion on this.

endersonmaia commented 2 months ago

I assume this is already being tackled at the builtins repository.

So the issue is to adapt the current Dockerfile to get the binaries released on that repository inside the final bug-buster machine image.

guidanoli commented 2 months ago

I assume this is already being tackled at the builtins repository.

Exactly. Just missing solc to do the transition.

claudioantonio commented 1 month ago

This issue is outdated given that we solved it another way with the built-in repo (we are not building the binaries on the root docker, but copying the binaries built with the built-in images).