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

Osiris/devnet cleanup #63

Merged
merged 7 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/run-k8s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
run: |
eval $(minikube -p minikube docker-env)
just devnet-up

- name: Block Building
run: |
just assertor -b
Expand Down
7 changes: 5 additions & 2 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ test:
@just ./world-chain-builder/test

# Formats the world-chain-builder
fmt:
fmt:
@just ./world-chain-builder/fmt

# Runs the block building assertions
# NOTE: The devnet needs to be running for this to work
assertor *args='':
@just ./world-chain-builder/assertor $@
@just ./world-chain-builder/assertor $@

fixtures:
@just ./devnet/fixtures
6 changes: 6 additions & 0 deletions devnet/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,9 @@ build: build-world-chain

build-world-chain:
docker buildx build -t world-chain-builder:latest -f ../world-chain-builder/Dockerfile ../world-chain-builder

fixtures:
chmod +x fixtures.sh && ./fixtures.sh

fmt:
kurtosis lint --format
17 changes: 9 additions & 8 deletions devnet/fixtures.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@
set -e
MNEMONIC="test test test test test test test test test test test junk"
# This needs to be configured to the enclave (public rpc ports are non-deterministic)
BUILDER_SOCKET=""
export IDENTITY=11ff11
export INCLUSION_PROOF_URL="https://signup-orb-ethereum.stage-crypto.worldcoin.dev/inclusionProof"
kurtosis_port=$(kurtosis port print world-chain wc-admin-world-chain-builder rpc)
BUILDER_SOCKET=$(echo "$kurtosis_port" | grep -o 'http://127.0.0.1:[0-9]*')

make_txs() {
local fixture_file=$1
declare -a local_fixture=()
for t in {0..29}; do
tx=$(cast mktx --private-key "$2" 0xDeaDbeefdEAdbeefdEadbEEFdeadbeEFdEaDbeeF --value $3 --rpc-url "$BUILDER_SOCKET" --nonce "$t")
transaction=$(toolkit prove -t "$tx" -N "$t")
local_fixture[$t]="$transaction"
tx=$(cast mktx --private-key "$2" 0xDeaDbeefdEAdbeefdEadbEEFdeadbeEFdEaDbeeF --value $3 --rpc-url "$BUILDER_SOCKET" --nonce "$t")
transaction=$(toolkit prove -t "$tx" -N "$t")
local_fixture[$t]="$transaction"
done

# Write local_fixture to a temporary file
printf '%s\n' "${local_fixture[@]}" > "$fixture_file"
printf '%s\n' "${local_fixture[@]}" >"$fixture_file"
echo "Finished Process: $3"
}

Expand All @@ -35,14 +36,14 @@ FIXTURE=()
for tmp_file in /tmp/fixture_*.tmp; do
while read -r line; do
FIXTURE+=("$line")
done < "$tmp_file"
done <"$tmp_file"
done

# Convert the FIXTURE array into a JSON-friendly format
fixture_json=$(printf '%s\n' "${FIXTURE[@]}" | jq -R . | jq -s .)

# Write the fixture to a JSON file
echo "{\"fixture\": $fixture_json}" > "${PWD}/fixtures/fixture.json"
echo "{\"fixture\": $fixture_json}" >"${PWD}/fixtures/fixture.json"

# Clean up temporary files
rm /tmp/fixture_*.tmp
rm /tmp/fixture_*.tmp
99 changes: 0 additions & 99 deletions devnet/src/batcher/op-batcher/op_batcher_launcher.star

This file was deleted.

200 changes: 0 additions & 200 deletions devnet/src/cl/hildr/hildr_launcher.star

This file was deleted.

Loading
Loading