Skip to content

Commit

Permalink
Add baedeker workflow - in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
gztensor committed Jul 29, 2024
1 parent 27cdddc commit 6e6c783
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .baedeker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ENV PATH="/root/.cargo/bin:${PATH}"
COPY . .

# Cargo build
RUN cargo build --release
RUN cargo build --release --target-dir /target && cp /target/release/node-subtensor ./target/release
EXPOSE 9946

# Run the Substrate node binary
Expand Down
13 changes: 5 additions & 8 deletions .baedeker/util/runtimeUpgrade.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,18 @@ async function main() {
);

// Send the transaction using the sudo account
const unsub = await sudoCall.signAndSend(sudoAccount, ({ status }) => {
await sudoCall.signAndSend(sudoAccount, ({ status }) => {
if (status.isInBlock) {
console.log(`Transaction included at blockHash ${status.asInBlock}`);
} else if (status.isFinalized) {
console.log(`Transaction finalized at blockHash ${status.asFinalized}`);
unsub();
process.exit(0);
}
});

// Disconnect from the provider on error or completion
// provider.disconnect();

// We miss disconnect/unref for some reason, so we need explicit successful exit here
process.exit(0);
}

main().catch(console.error);
main().catch((error) => {
console.error(error);
process.exit(1);
});
15 changes: 15 additions & 0 deletions .github/workflows/check-finney-clone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,3 +216,18 @@ jobs:
../../scripts/wait_first_block_local.sh
echo "Executing runtime upgrade"
node runtimeUpgrade.js
# check that runtime upgrade happened (spec version updated)
# Wait for new blocks after upgrade
# Balance transfer test

# need process exit from JS, it's not exiting

# see how to run custom JS with this job (msg from Sam J.)

# epoch test: Set subnet1 tempo to 10 blocks
# - wait for OTF hotkey to receive rewards
# - check block times

# feature for testing hotkey tempos (talk to Samuel - maybe add to fast-blocks)
# - add childkey test
4 changes: 4 additions & 0 deletions docker-compose-baedeker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ services:
localnet:
ports:
- 9946:9946
volumes:
- type: bind
source: ./target
target: /target
build:
context: .
dockerfile: ./.baedeker/Dockerfile
Expand Down

0 comments on commit 6e6c783

Please sign in to comment.