Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
7d79e7a
Initial tuktuk buildout
ChewingGlass Nov 25, 2024
b5b7c4e
Add ability to close queue and min deposit requirements
ChewingGlass Nov 26, 2024
bda41be
Bugfix
ChewingGlass Nov 26, 2024
7dedf58
Add guards against spending too much
ChewingGlass Nov 26, 2024
a43c56a
Fix tests
ChewingGlass Nov 26, 2024
882214b
fix tests
ChewingGlass Nov 26, 2024
28cd8eb
fix writable
ChewingGlass Nov 26, 2024
7208586
Attempting to work through CPI rescheduling
ChewingGlass Dec 1, 2024
8237557
almost working
ChewingGlass Dec 2, 2024
b18d6a0
Implement self-rescheduling
ChewingGlass Dec 3, 2024
7631a98
Add docker support
ChewingGlass Dec 3, 2024
3c681d6
Switch to entirely sol based
ChewingGlass Dec 13, 2024
20dc97e
WIP: Add remote transactions
ChewingGlass Jan 13, 2025
bc0fc4f
Add a remote server example and tested it works
ChewingGlass Jan 14, 2025
2a7edaf
Cron jobs working, needs cli support
ChewingGlass Jan 14, 2025
5d7ef94
Add cli support for crons, closing tasks
ChewingGlass Jan 15, 2025
ad0c456
Fix build
ChewingGlass Jan 15, 2025
63f40fc
Fix build
ChewingGlass Jan 15, 2025
8691cf1
Readme, more lint
ChewingGlass Jan 15, 2025
c5e2b3f
More lint
ChewingGlass Jan 15, 2025
575a799
Set rust toolchain
ChewingGlass Jan 15, 2025
79671fb
Add rustfmnt clipptt
ChewingGlass Jan 15, 2025
f4aa9de
Add cron tests to github actions
ChewingGlass Jan 15, 2025
b65b57f
Fix account watching logic
ChewingGlass Jan 15, 2025
8c263bb
Add ability to queue tasks from a return account for large crons
ChewingGlass Jan 16, 2025
19eaa5f
Add LUTs, reduce TX size for remote txs
ChewingGlass Jan 17, 2025
6b36413
Use an anchor account for RemoteTaskTransactionV0 so that it can be p…
ChewingGlass Jan 17, 2025
cd332cd
Lint
ChewingGlass Jan 17, 2025
2c8076b
Fix builds
ChewingGlass Jan 17, 2025
8d71496
Fix tx packing and requeue
ChewingGlass Jan 17, 2025
1fb3ee9
Add new signer type
ChewingGlass Jan 21, 2025
cb793af
Add docker info
ChewingGlass Jan 21, 2025
5c154c6
Fix envs
ChewingGlass Jan 22, 2025
82ca61c
Rm unused
ChewingGlass Jan 22, 2025
e881cb0
Code review comments
ChewingGlass Jan 28, 2025
7ba2b80
Fix payouts
ChewingGlass Jan 30, 2025
b8d7307
Add metrics
ChewingGlass Feb 3, 2025
4dda8f9
Bugfixes with metrics
ChewingGlass Feb 3, 2025
07f3709
lots of versionedtx bugs
ChewingGlass Feb 3, 2025
ae8a199
Missing metric
ChewingGlass Feb 4, 2025
ff4b5a9
Missing completion condition
ChewingGlass Feb 4, 2025
98384b6
Fix never freeing up task ids
ChewingGlass Feb 4, 2025
35355b9
Fix cron running a cycle too late
ChewingGlass Feb 4, 2025
5688927
Some minor bugfixes and better metrics
ChewingGlass Feb 4, 2025
87ac4da
Add descriptions to tasks
ChewingGlass Feb 6, 2025
1b2384c
Add ability to have multiple queue authority
ChewingGlass Feb 6, 2025
4e3b4f7
Bump ver
ChewingGlass Feb 6, 2025
55f8ff9
Fix artifact
ChewingGlass Feb 6, 2025
7a0f1b9
Add devnet feature
ChewingGlass Feb 6, 2025
6097ff6
Trigger deploy
ChewingGlass Feb 6, 2025
ff20954
Fix develop change program
ChewingGlass Feb 6, 2025
73dcfa8
Fix action
ChewingGlass Feb 6, 2025
58cfb28
ignore cpi example
ChewingGlass Feb 6, 2025
b70cda0
Add missing lockfiles
ChewingGlass Feb 6, 2025
ddf549d
Fix cargo build verified
ChewingGlass Feb 6, 2025
698599d
More fixes to deploy process
ChewingGlass Feb 6, 2025
2e70217
Trigger build
ChewingGlass Feb 6, 2025
2d52ca3
Fix broken action
ChewingGlass Feb 7, 2025
95cb931
Fix action again
ChewingGlass Feb 7, 2025
a144eb5
More action fixing
ChewingGlass Feb 7, 2025
e611f44
ugggh
ChewingGlass Feb 7, 2025
0832559
d
ChewingGlass Feb 7, 2025
735f644
Rm IDL log
ChewingGlass Feb 7, 2025
b01ce35
Fix idl buffer save
ChewingGlass Feb 7, 2025
c08b52e
Bump sqds
ChewingGlass Feb 7, 2025
b480f38
Bugfixes
ChewingGlass Feb 7, 2025
fa29111
More bugfixes
ChewingGlass Feb 7, 2025
a61e159
README update
ChewingGlass Feb 10, 2025
92c5416
Fix tests
ChewingGlass Feb 10, 2025
23a903e
Fix tests
ChewingGlass Feb 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 120 additions & 0 deletions .github/actions/buffer-deploy/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: "Upload BPF"
description: "Uploads an anchor program as a bpf"
inputs:
devnet:
description: "Whether to use devnet feature"
required: false
default: "false"
testing:
description: "Whether to use devnet feature"
required: false
default: "false"
network:
description: "The Solana network"
required: true
default: "devnet"
program:
description: "The program to build and upload"
required: true
program-id:
description: "The program id of the program we are uploading"
required: true
keypair:
description: "The keypair to use for deploys"
required: true
buffer-authority:
description: "The buffer authority to set"
required: true
outputs:
buffer:
description: "The buffer address"
value: ${{ steps.buffer-deploy-store.outputs.BUFFER }}
idl-buffer:
description: "The idl buffer address."
value: ${{ steps.buffer-deploy-store.outputs.IDL_BUFFER }}

runs:
using: "composite"
steps:
- uses: ./.github/actions/setup/
- uses: ./.github/actions/setup-anchor/
with:
node-version: ${{ env.NODE_VERSION }}
- run: echo "$DEPLOY_KEYPAIR" > ./deploy-keypair.json && chmod 600 ./deploy-keypair.json
shell: bash
env:
DEPLOY_KEYPAIR: ${{ inputs.keypair }}
working-directory: solana-programs
- run: solana-keygen new -s -o keyp --no-bip39-passphrase
working-directory: solana-programs
shell: bash
- run: ls -l ./target/deploy/
shell: bash
working-directory: solana-programs
- name: Buffer Deploy
if: steps.cache-buffer.outputs.cache-hit != 'true'
id: buffer-deploy
uses: nick-invision/retry@v2
with:
timeout_minutes: 30
max_attempts: 10
shell: bash
command: cd solana-programs && solana program write-buffer --max-sign-attempts 50 --with-compute-unit-price 100000 --use-rpc --buffer ./keyp -k ./deploy-keypair.json ./target/deploy/$PROGRAM.so -u $NETWORK > ./buffer.out
env:
NETWORK: ${{ inputs.network }}
PROGRAM: ${{ inputs.program }}
- name: IDL Buffer Deploy
uses: nick-invision/retry@v2
id: idl-buffer-deploy
if: steps.cache-buffer.outputs.cache-hit != 'true'
with:
timeout_minutes: 10
max_attempts: 50
shell: bash
command: cd solana-programs && ~/.cargo/bin/anchor idl write-buffer $PROGRAM_ID --filepath ./target/idl/$PROGRAM.json --provider.cluster $NETWORK --provider.wallet ./deploy-keypair.json > idl-buffer.out
env:
PROGRAM_ID: ${{ inputs.program-id }}
PROGRAM: ${{ inputs.program }}
NETWORK: ${{ inputs.network }}
- name: Buffer Deploy Store
shell: bash
working-directory: solana-programs
id: buffer-deploy-store
run: |
echo "BUFFER=$(cat buffer.out | sed 's/Buffer: //g' | xargs echo -n)" >> $GITHUB_OUTPUT
echo "IDL_BUFFER=$(tail -n 1 idl-buffer.out | sed 's/Idl buffer created: //g' | xargs echo -n)" >> $GITHUB_OUTPUT
- run: echo "The buffer is ${{ steps.buffer-deploy-store.outputs.BUFFER }}"
shell: bash
working-directory: solana-programs
- run: echo "the idl buffer is ${{ steps.buffer-deploy-store.outputs.IDL_BUFFER }}"
shell: bash
working-directory: solana-programs
- name: Transfer idl buffer to authority
uses: nick-invision/retry@v2
if: steps.cache-buffer.outputs.cache-hit != 'true'
with:
timeout_minutes: 10
max_attempts: 50
shell: bash
command: cd solana-programs && anchor idl set-authority $IDL_BUFFER --provider.cluster $NETWORK --program-id $PROGRAM_ID --new-authority $AUTHORITY --provider.wallet ./deploy-keypair.json
env:
IDL_BUFFER: ${{ steps.buffer-deploy-store.outputs.IDL_BUFFER }}
AUTHORITY: ${{ inputs.buffer-authority }}
NETWORK: ${{ inputs.network }}
PROGRAM_ID: ${{ inputs.program-id }}
- name: Transfer buffer to authority
uses: nick-invision/retry@v2
if: steps.cache-buffer.outputs.cache-hit != 'true'
with:
timeout_minutes: 10
max_attempts: 50
shell: bash
command: cd solana-programs && solana program set-buffer-authority $BUFFER -k ./deploy-keypair.json --new-buffer-authority $AUTHORITY -u $NETWORK
env:
BUFFER: ${{ steps.buffer-deploy-store.outputs.BUFFER }}
AUTHORITY: ${{ inputs.buffer-authority }}
NETWORK: ${{ inputs.network }}
- run: rm ./deploy-keypair.json
shell: bash
if: always()
working-directory: solana-programs
42 changes: 42 additions & 0 deletions .github/actions/build-anchor/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Setup Anchor"
description: "Setup Anchor"
inputs:
devnet:
description: "Whether to use devnet feature"
required: false
default: "false"
testing:
description: "Whether to use devnet feature"
required: false
default: "false"
program:
description: "The program to build"
required: false
runs:
using: "composite"
steps:
- uses: ./.github/actions/setup/
- uses: ./.github/actions/setup-anchor/
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/cache@v2
name: Cache Cargo registry + index
id: cache-cargo-registry
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
- name: Cache Anchor Build
uses: actions/cache@v2
id: cache-anchor-build
with:
path: |
./solana-programs/target/
key: build-${{ runner.os }}-${{env.ANCHOR_VERSION}}-${{env.ANCHOR_SHA}}-v0003-${{ inputs.devnet }}-${{ inputs.testing }}-${{ hashFiles('./solana-programs/programs/**/**') }}-${{ inputs.program }}
- run: ${{ inputs.testing == 'true' && 'TESTING=true' || '' }} ~/.cargo/bin/anchor build ${{ (inputs.program != '' && '-p') || '' }} ${{ inputs.program || '' }} ${{ inputs.devnet == 'true' && '-- --features devnet' || '' }}
if: steps.cache-anchor-build.outputs.cache-hit != 'true'
shell: bash
working-directory: solana-programs
49 changes: 49 additions & 0 deletions .github/actions/build-verified/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "Build Verified"
description: "Builds an Anchor Program using solana-verify"
inputs:
devnet:
description: "Whether to use devnet feature"
required: false
default: "false"
testing:
description: "Whether to use devnet feature"
required: false
default: "false"
program:
description: "The program to build and upload"
required: true
program-id:
description: "The program id of the program we are uploading"
required: true

runs:
using: "composite"
steps:
- uses: ./.github/actions/setup/
- uses: ./.github/actions/setup-anchor/
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/cache@v2
name: Cache Cargo registry + index
id: cache-cargo-registry
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-${{ runner.os }}-v0001-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/cache@v2
name: Cache Solana Verify
id: cache-solana-verify
with:
path: |
~/.cargo/bin/solana-verify
key: cargo-${{ runner.os }}-solana-verify
- run: cargo install solana-verify --locked
if: steps.cache-solana-verify.outputs.cache-hit != 'true'
shell: bash
- run: ${{ inputs.testing == 'true' && 'TESTING=true' || '' }} ~/.cargo/bin/solana-verify build --library-name $PROGRAM ${{ inputs.devnet == 'true' && '-- --features devnet' || '' }}
shell: bash
working-directory: solana-programs
env:
PROGRAM: ${{ inputs.program }}
28 changes: 28 additions & 0 deletions .github/actions/setup-anchor/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Setup Anchor"
description: "Setup Anchor"
runs:
using: "composite"
steps:
- uses: ./.github/actions/setup/
- uses: ./.github/actions/setup-solana/
- uses: actions/cache@v2
name: Cache Anchor Cli
id: cache-anchor-cli
with:
path: |
~/.cargo/bin/anchor
key: anchor-cli-${{ runner.os }}-v0003-${{ env.ANCHOR_VERSION }}-${{ env.ANCHOR_SHA }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if you'll need it but

    - run: rustup install 1.79 && rustup default 1.79
      shell: bash
      if: steps.cache-anchor-cli.outputs.cache-hit != 'true'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed since we're on newer anchor I think

# if ANCHOR_VERSION is 0, then install the anchor-cli from source
- run: if [ $ANCHOR_VERSION -eq 0 ]; then cargo install --git https://github.com/coral-xyz/anchor --rev $ANCHOR_SHA anchor-cli --locked --force; else cargo install --git https://github.com/coral-xyz/anchor --tag "v$ANCHOR_VERSION" anchor-cli --locked; fi
shell: bash
if: steps.cache-anchor-cli.outputs.cache-hit != 'true'
- uses: actions/cache@v2
name: Cache Toml Cli
id: cache-toml-cli
with:
path: |
~/.cargo/bin/toml
key: toml-cli-${{ runner.os }}-v0002
- run: (cargo install toml-cli || true)
if: steps.cache-toml-cli.outputs.cache-hit != 'true'
shell: bash
22 changes: 22 additions & 0 deletions .github/actions/setup-solana/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "Setup Solana"
description: "Setup Solana"
runs:
using: "composite"
steps:
- uses: actions/cache@v2
name: Cache Solana Tool Suite
id: cache-solana
with:
path: |
~/.cache/solana/
~/.local/share/solana/
key: solana-${{ runner.os }}-v0000-${{ env.SOLANA_CLI_VERSION }}
- run: sh -c "$(curl -sSfL https://release.solana.com/v${{ env.SOLANA_CLI_VERSION }}/install)"
shell: bash
if: steps.cache-solana.outputs.cache-hit != 'true'
- run: echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
shell: bash
- run: solana-keygen new -s --no-bip39-passphrase --force
shell: bash
- run: solana config set --url localhost
shell: bash
25 changes: 25 additions & 0 deletions .github/actions/setup-ts/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "Setup ts"
description: "Setup ts"
runs:
using: "composite"
steps:
- uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/cache@v2
name: Cache Typescript node_modules
id: cache-typescript-node-modules
with:
path: |
./solana-programs/node_modules/
key: node-modules-${{ runner.os }}-v0000-${{ env.NODE_VERSION }}-${{ hashFiles('./yarn.lock') }}-${{ hashFiles('./**/*/package.json') }}
- run: corepack enable
shell: bash
working-directory: solana-programs
- run: yarn
shell: bash
working-directory: solana-programs
if: steps.cache-typescript-node-modules.outputs.cache-hit != 'true'
- run: yarn run build
shell: bash
working-directory: solana-programs
31 changes: 31 additions & 0 deletions .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "Setup"
description: "Setup"
runs:
using: "composite"
steps:
- run: sudo apt-get update
shell: bash
- run: sudo apt-get install -y pkg-config build-essential libudev-dev
shell: bash
- run: echo "ANCHOR_VERSION=0" >> $GITHUB_ENV
shell: bash
- run: echo "ANCHOR_SHA=98396c0aeffb4745ab08fb9f45e0d31ad0bd1402" >> $GITHUB_ENV
shell: bash
- run: git submodule update --init --recursive --depth 1
shell: bash
- name: Install Protoc
uses: arduino/setup-protoc@v3
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.80.1
- uses: actions/cache@v3
with:
path: |
~/.rustup/toolchains
~/.rustup/update-hashes
~/.rustup/settings.toml
key: rust-components-${{ runner.os }}-${{ hashFiles('**/rust-toolchain', '**/rust-toolchain.toml') }}
- run: rustup component add rustfmt
shell: bash
- run: rustup component add clippy
shell: bash
Loading
Loading