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

Bring local-setup into the V2 era #156

Closed
wants to merge 15 commits into from
Closed

Bring local-setup into the V2 era #156

wants to merge 15 commits into from

Commits on Jul 6, 2023

  1. Clear out old v1 cruft

    Beau Shinkle authored and beaurancourt committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    88214ca View commit details
    Browse the repository at this point in the history
  2. Encapsulate bitcoin docker stuff

    This does a few things at once:
    • Prepares us for a future where there will be multiple projects inside ./docker
    • Updates the bitcoind instance to the latest one
    • Updates esplora and electrs
    Beau Shinkle authored and beaurancourt committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    87744d6 View commit details
    Browse the repository at this point in the history
  3. Add the v2 submodules

    Beau Shinkle authored and beaurancourt committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    4e72837 View commit details
    Browse the repository at this point in the history
  4. Add geth genesis data

    Beau Shinkle authored and beaurancourt committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    e4d92ed View commit details
    Browse the repository at this point in the history
  5. Add a geth docker service

    This builds a geth node and deploys contracts
    Beau Shinkle authored and beaurancourt committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    678c622 View commit details
    Browse the repository at this point in the history
  6. Add a geth reset script

    Most of the time this won't be needed (the geth docker resets itself when contracts change), but handy if something goes very wrong.
    Beau Shinkle authored and beaurancourt committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    2e83f60 View commit details
    Browse the repository at this point in the history
  7. Bundle everything into docker-compose

    We build the following services:
    • geth (ethereum) with contracts deployed
    • geth block explorer (localhost:8095)
    • bitcoind (bitcoin)
    • bitcoin api
    • bitcoin block explorer (localhost:8096)
    Beau Shinkle authored and beaurancourt committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    32520a3 View commit details
    Browse the repository at this point in the history
  8. Include the data generation folders in .gitignore

    Beau Shinkle authored and beaurancourt committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    ab7a71d View commit details
    Browse the repository at this point in the history
  9. Bitcoind doesn't need jq

    Beau Shinkle authored and beaurancourt committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    c1569d7 View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2023

  1. Configuration menu
    Copy the full SHA
    aede19d View commit details
    Browse the repository at this point in the history
  2. Put the submodules in parent directories

    This helps organize code a little better and also provides context to what "solidity-contracts" is
    beaurancourt committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    b195086 View commit details
    Browse the repository at this point in the history
  3. Remove git init from the build steps

    These were necessary back when I was running keep-core's install.sh directly (which assumes it's being run in a git repo).
    
    Over time, I replicated the functionality in install.sh and split it up into the dockerfile and entrypoint for efficiency. We want as much as possible to live at build-time!
    beaurancourt committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    facc694 View commit details
    Browse the repository at this point in the history
  4. Comment the mysterious yarn build || true

    When we run it a single time, we get:
    
    ```
    #0 62.31 Error HH501: Couldn't download compiler version 0.8.17+commit.8df45f5f. Please check your internet connection and try again.
    #0 62.31 HardhatError: HH501: Couldn't download compiler version 0.8.17+commit.8df45f5f. Please check your internet connection and try again.
    #0 62.31     at /tbtc-v2/solidity/node_modules/hardhat/src/internal/solidity/compiler/downloader.ts:175:15
    #0 62.31     at async CompilerDownloader.downloadCompiler (/tbtc-v2/solidity/node_modules/hardhat/src/internal/solidity/compiler/downloader.ts:150:5)
    #0 62.31     at async SimpleTaskDefinition.action (/tbtc-v2/solidity/node_modules/hardhat/src/builtin-tasks/compile.ts:585:9)
    #0 62.31     at async Environment._runTaskDefinition (/tbtc-v2/solidity/node_modules/hardhat/src/internal/core/runtime-environment.ts:308:14)
    #0 62.31     at async Environment.run (/tbtc-v2/solidity/node_modules/hardhat/src/internal/core/runtime-environment.ts:156:14)
    #0 62.31     at async SimpleTaskDefinition.action (/tbtc-v2/solidity/node_modules/hardhat/src/builtin-tasks/compile.ts:678:36)
    #0 62.31     at async Environment._runTaskDefinition (/tbtc-v2/solidity/node_modules/hardhat/src/internal/core/runtime-environment.ts:308:14)
    #0 62.31     at async Environment.run (/tbtc-v2/solidity/node_modules/hardhat/src/internal/core/runtime-environment.ts:156:14)
    #0 62.31     at async Environment._runTaskDefinition (/tbtc-v2/solidity/node_modules/hardhat/src/internal/core/runtime-environment.ts:308:14)
    #0 62.31     at async OverriddenTaskDefinition._action (/tbtc-v2/solidity/node_modules/@openzeppelin/hardhat-upgrades/src/index.ts:77:33)
    #0 62.31
    #0 62.31     Caused by: HeadersTimeoutError: Headers Timeout Error
    #0 62.31         at Timeout.onParserTimeout [as _onTimeout] (/tbtc-v2/solidity/node_modules/undici/lib/client.js:894:28)
    #0 62.31         at listOnTimeout (node:internal/timers:561:11)
    #0 62.31         at processTimers (node:internal/timers:502:7)
    #0 62.48 error Command failed with exit code 1.
    ```
    
    But it always works on the second time. There is probably a way to fix this "better", but for now just running it twice (ignoring the error with `|| true`) works.
    beaurancourt committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    c42e76a View commit details
    Browse the repository at this point in the history
  5. Comment the mysterioud commit checkout in electrs

    Blockstream's electrs doesn't use git tags, and we don't want the docker builds to change behavior based on when they're built, so we need to check out code at a specific point.
    
    We choose the most up-to-date branch in the repo, which happens to be `202305-fix-mempool-batching`. Unclear as to why these branches don't make their way back into the main branch. Unclear as to what the main branch is.
    beaurancourt committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    1a46f7c View commit details
    Browse the repository at this point in the history
  6. Nuke the workflows

    They're out of date and failing. If we want to build similar ones in the
    future, we can!
    beaurancourt committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    8c71a0e View commit details
    Browse the repository at this point in the history