Skip to content

feat: local-environment-dynamic #862

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

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from
Draft

Conversation

skylar-simoncelli
Copy link
Contributor

@skylar-simoncelli skylar-simoncelli commented Jun 12, 2025

New fully dynamic local-environment, with configurable number of permissioned and registered validators, and automation of full end to end setup on mainchain and partnerchain

The main changes can be found in:

  • setup.sh
  • configurations/cardano/entrypoint.sh
  • configurations/partner-chains-setup/entrypoint.sh
image

@skylar-simoncelli
Copy link
Contributor Author

@LGLO I have removed the persistent changes to /dev/local-environment that were still in my branch

@skylar-simoncelli skylar-simoncelli requested a review from LGLO June 12, 2025 13:47
@skylar-simoncelli skylar-simoncelli requested a review from LGLO June 12, 2025 17:42
# Array to store payment addresses for registered nodes
registered_node_payment_addresses=() # Array to store payment addresses

# --- New: Generate Payment, Cold, KES, VRF, and Stake Keys for Permissioned Nodes ---
Copy link
Contributor

Choose a reason for hiding this comment

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

This is redundant, becuase permissioned nodes do not need any Cardano keys.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do they not need to be registered as SPOs?

# partner-chains-setup (extra)
tx_out4=1000000000

# Fund $NUM_PERMISSIONED_NODES_TO_PROCESS permissioned nodes
Copy link
Contributor

Choose a reason for hiding this comment

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

Again, everything "permissioned" is redundant. Permissioned candidates do not run/exists on Cardano in any form.

fi

# Validate batch size doesn't exceed reasonable limits
if [ "$batch_size" -gt 50 ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

If 300 nodes is the required supported number of nodes, then I think one transaction to fund all registered (up to 300) candidates is enough.
I think we can save a lot of lines of code here by doing all in one tx.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I spent a long time initially trying to a single huge transaction, and it was proving quite difficult to dynamically get all the outputs correct

This batch method has been much more reliable in my testing

echo "[DEBUG] CRITICAL ERROR: Failed to submit delegation transaction for $NODE_LOG_NAME after multiple attempts."
fi

echo "[LOG] Completed SPO registration and delegation process for $NODE_LOG_NAME."
Copy link
Contributor

Choose a reason for hiding this comment

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

I can see this log but at the same time I can observe all registrations have "InvalidStake".

curl -s -H "Content-Type:application/json" -d '{"jsonrpc":"2.0","method":"sidechain_getAriadneParameters","params":[10],"id":1}' http://localhost:9937 | jq .result.candidateRegistrations

Did you have different result for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll have to do more testing and understand why this is

Copy link
Contributor

@LGLO LGLO left a comment

Choose a reason for hiding this comment

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

Please fix:

  • InvalidStake of registered candidates
  • Remove redundant permissioned candidates related parts of Cardano setup
  • Remove tests containers from the setup or provide and instruction to follow that would lead to at least mostly successful tests run in the container
  • Optionally, remove complex batching if funding of 300 nodes could be done without it

@skylar-simoncelli skylar-simoncelli marked this pull request as draft June 13, 2025 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants