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

fix benchmarking results #1522

Merged
merged 8 commits into from
May 23, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
22 changes: 13 additions & 9 deletions .github/workflows/deploy.nightly.devnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ jobs:
env:
TF_VAR_deployment_name: ${{ secrets.TF_VAR_DEPLOYMENT_NAME }}
TF_VAR_owner: ${{ secrets.TF_VAR_OWNER }}
- name: Retrieve state file from s3
run: aws s3 cp s3://polygon-edge-devnet-tf-states/state/${{ secrets.TF_VAR_DEPLOYMENT_NAME }} state.json
gatsbyz marked this conversation as resolved.
Show resolved Hide resolved
- name: Configure private keys
run: |
terraform output pk_ansible > ~/devnet_private.key
Expand Down Expand Up @@ -116,6 +118,7 @@ jobs:
polygon-edge polybft-secrets --data-dir {{ hostvars[item].tags["Name"] }} --json --insecure > {{ hostvars[item].tags["Name"] }}.json
{% endif %}
{% endfor %}

polygon-edge genesis \
--consensus polybft \
{% for item in hostvars %}{% if (hostvars[item].tags.Role == "fullnode" or hostvars[item].tags.Role == "validator") %} --bootnode /dns4/{{ hostvars[item].tags["Name"] }}/tcp/{{ edge_p2p_port }}/p2p/$(cat {{ hostvars[item].tags["Name"] }}.json | jq -r '.[0].node_id') {% endif %}{% endfor %} \
Expand All @@ -125,24 +128,26 @@ jobs:
--premine 0xA39Fed214820cF843E2Bcd6cA1759257a530894B:1000000000000000000000000000 \
--premine 0x181d9fEc79EC674DD3cB30dd9dd4188E737939FE:1000000000000000000000000000 \
--premine 0x1AB8C3df809b85012a009c0264eb92dB04eD6EFa:1000000000000000000000000000 \
--block-gas-limit {{ block_gas_limit }} --block-time {{ block_time }}s \
--block-gas-limit {{ block_gas_limit }} --block-time {{ block_time }}s \
{% for item in hostvars %}{% if (hostvars[item].tags.Role == "validator") %} --validators /dns4/{{ hostvars[item].tags["Name"] }}/tcp/{{ edge_p2p_port }}/p2p/$(cat {{ hostvars[item].tags["Name"] }}.json | jq -r '.[0].node_id'):$(cat {{ hostvars[item].tags["Name"] }}.json | jq -r '.[0].address' | sed 's/^0x//'):$(cat {{ hostvars[item].tags["Name"] }}.json | jq -r '.[0].bls_pubkey') {% endif %}{% endfor %} \
--chain-id {{ chain_id }} \
--epoch-size 10
--epoch-size 10 \
--native-token-config MyToken:MTK:18:true

polycli wallet create --words 12 --language english | jq '.Addresses[0]' > rootchain-wallet.json

COINBASE_ADDRESS=$(cast rpc --rpc-url {{ rootchain_json_rpc }} eth_coinbase | sed 's/"//g')

cast send --rpc-url {{ rootchain_json_rpc }} --from $COINBASE_ADDRESS --value 100ether $(cat rootchain-wallet.json | jq -r '.ETHAddress')
# Should the deployer be funded from an unlocked L1 chain or from a prefunded account on L1
{% if (not fund_rootchain_coinbase) %}# {% endif %}COINBASE_ADDRESS=$(cast rpc --rpc-url {{ rootchain_json_rpc }} eth_coinbase | sed 's/"//g')
{% if (not fund_rootchain_coinbase) %}# {% endif %}cast send --rpc-url {{ rootchain_json_rpc }} --from $COINBASE_ADDRESS --value {{ rootchain_deployer_fund_amount }} $(cat rootchain-wallet.json | jq -r '.ETHAddress') --unlocked
{% if (fund_rootchain_coinbase) %}# {% endif %}cast send --rpc-url {{ rootchain_json_rpc }} --from {{ rootchain_coinbase_address }} --value {{ rootchain_deployer_fund_amount }} $(cat rootchain-wallet.json | jq -r '.ETHAddress') --private-key {{ rootchain_coinbase_private_key }}

polygon-edge rootchain deploy \
--deployer-key $(cat rootchain-wallet.json | jq -r '.HexPrivateKey') \
--json-rpc {{ rootchain_json_rpc }}

{% for item in hostvars %}
{% if (hostvars[item].tags.Role == "validator") %}
cast send --rpc-url {{ rootchain_json_rpc }} --from $COINBASE_ADDRESS --value 100ether $(cat {{ hostvars[item].tags["Name"] }}.json | jq -r '.[0].address')
cast send --rpc-url {{ rootchain_json_rpc }} --from $(cat rootchain-wallet.json | jq -r '.ETHAddress') --private-key $(cat rootchain-wallet.json | jq -r '.HexPrivateKey') \
--value {{ rootchain_validator_fund_amount }} $(cat {{ hostvars[item].tags["Name"] }}.json | jq -r '.[0].address')
{% endif %}
{% endfor %}

Expand All @@ -163,7 +168,7 @@ jobs:

{% for item in hostvars %}
{% if (hostvars[item].tags.Role == "validator") %}
polygon-edge polybft stake --data-dir {{ hostvars[item].tags["Name"] }} --chain-id {{ chain_id }} \
polygon-edge polybft stake --data-dir {{ hostvars[item].tags["Name"] }} --chain-id $(cat genesis.json | jq -r '.params.chainID') \
--amount 10 \
--stake-manager $(cat genesis.json | jq -r '.params.engine.polybft.bridge.stakeManagerAddr') \
--native-root-token $(cat genesis.json | jq -r '.params.engine.polybft.bridge.nativeERC20Address') \
Expand All @@ -183,7 +188,6 @@ jobs:

main


EOF
- name: Run Ansible
working-directory: ansible
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/manual.deploy.nightly.devnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

name: Nightly DevNet Workflow (Manual)
on: # yamllint disable-line rule:truthy
# push:
# branches:
# - jesse/fix-nightly-build
push:
branches:
- jesse/fix-*
gatsbyz marked this conversation as resolved.
Show resolved Hide resolved
workflow_call: {}
workflow_dispatch: {}

Expand Down