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

Add Solana Program Library as a submodule #90

Merged
merged 9 commits into from
May 25, 2021
Merged

Add Solana Program Library as a submodule #90

merged 9 commits into from
May 25, 2021

Commits on May 25, 2021

  1. Add Solana Program Library as a submodule

    Solido depends on the SPL stake pool program, which is not present on a
    local testnet by default, so we need to build it from source. To be able
    to do that reliably in the tests, pull in the SPL as a submodule here,
    so we can depend on its stake pool program.
    
    The specific commit adds one patch on top of the upstream repository,
    which removes the Cargo workspace in that repository, to prevent it from
    interfering with our workspace.
    
    Aside from helping to test on a localnet, having a pinned version of the
    SPL stake pool program is also useful if we want to deploy our own
    version of the stake pool: we can pin it, and upgrade at our own pace.
    But we can still pull in the latest changes from upstream in the
    submodule, there is no difficult patch backporting process.
    ruuda committed May 25, 2021
    Configuration menu
    Copy the full SHA
    a5300b1 View commit details
    Browse the repository at this point in the history
  2. Fix test for new stake pool rewards

    After pulling in a new version of the SPL stake pool, which fixes the
    way it computes rewards, we need to update the test to match, because
    the number of reward tokens is indeed different.
    ruuda committed May 25, 2021
    Configuration menu
    Copy the full SHA
    db59a87 View commit details
    Browse the repository at this point in the history
  3. Run CI for pull requests regardless of branch

    Without this, if you open a stacked pull request (against the branch of
    an existing pull request), it will not run CI for that pull request.
    ruuda committed May 25, 2021
    Configuration menu
    Copy the full SHA
    5bcad24 View commit details
    Browse the repository at this point in the history
  4. Update multisig submodule to avoid name clash

    For some reason, the "multisig" mod in the crate was conflicting with
    the "multisig" crate name itself. I'm not sure why this suddenly started
    happening now, but renaming the mod inside resolved the problem. This
    updates the submodule to the commit that includes that rename.
    ruuda committed May 25, 2021
    Configuration menu
    Copy the full SHA
    9033737 View commit details
    Browse the repository at this point in the history
  5. Run build-bpf before test-bpf on CI

    The test that depends on the SPL stake pool program fails without first
    running "cargo build-bpf"; the fee computation is wrong. I'm not sure
    why this happens, it's as if it uses an older version of the SPL stake
    pool program, but I don't know where it gets that from. Either way,
    running "cargo build-bpf" before running the tests makes the tests pass
    ...
    ruuda committed May 25, 2021
    Configuration menu
    Copy the full SHA
    81467aa View commit details
    Browse the repository at this point in the history
  6. Try if a clean before build-bpf fixes the build

    So the previous commit still fails on CI ... what stood out is that the
    command completed quickly, I think it did not actually build anything.
    So let's try after a clean.
    ruuda committed May 25, 2021
    Configuration menu
    Copy the full SHA
    26e86b6 View commit details
    Browse the repository at this point in the history
  7. Run test-bpf from repository root on CI

    I think this might be the trigger for "cargo test-bpf" to use the wrong
    version of the stake pool program? It runs from the wrong directory?
    ruuda committed May 25, 2021
    Configuration menu
    Copy the full SHA
    213e737 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    08cb4fb View commit details
    Browse the repository at this point in the history
  9. Delete checked-in spl_stake_pool.so

    We now pull in the SPL stake pool through a submodule and build it; the
    artifact should not live in the repository.
    ruuda committed May 25, 2021
    Configuration menu
    Copy the full SHA
    d943a5b View commit details
    Browse the repository at this point in the history