• Dan Moore's avatar
    fix: prefund container suffixes for k8s (#818) · 968cfbdb
    Dan Moore authored
    **purpose:**
    - fix issue when running with k8s backend, where prefunded accts
    services are not destroyed instantaneously and this causes 'service
    already exists' errors
    
    **tests:**
    
    original error:
    ```
    Running ethereal to derive private keys of key 1
    There was an error executing Starlark code
    An error occurred executing instruction (number 9) at github.com/rebelArtists/ethereum-package/src/prefunded_accounts/get_prefunded_accounts.star[12:34]:
      run_sh(name="run-ethereal-private-key", run="private_key=$(/app/ethereal hd keys --seed=\"code code code code code code code code code code code quality\" --path=\"m/44'/60'/0'/0/1\" | awk '/Private key/{print substr($NF, 3)}'); echo -n $private_key", image="wealdtech/ethereal:latest", description="Running ethereal to derive private keys of key 1")
      Caused by: error occurred while creating a run_sh task with image: wealdtech/ethereal:latest
      Caused by: Failed registering service with name: 'run-ethereal-private-key'
      Caused by: Error registering service 'run-ethereal-private-key'
      Caused by: An error occurred creating Kubernetes service in enclave '629c500d8cda49d3b743a3d143d336b7' with ID 'run-ethereal-private-key'
      Caused by: Failed to create service 'run-ethereal-private-key' in namespace 'kt-cdk'
      Caused by: services "run-ethereal-private-key" already exists
    
    Error encountered running Starlark code.
    ```
    
    with fix (service name has key number suffix to prevent clash):
    ```
    ...
    Running ethereal to derive eth address of key 19
    Command returned with exit code '0' and the following output: 0x6d5821d6D50108649480A63d6f337F8473d661ef
    
    Running ethereal to derive private keys of key 20
    Command returned with exit code '0' and the following output: efa8369dbb93b8b452535ab87f526465e9441c7c5809a942908662b925eaff42
    
    Running ethereal to derive eth address of key 20
    Command returned with exit code '0' and the following output: 0x31C916e6EAD0DB63BeD514a6f292C526696F0549
    
    Printing a message
    PRE_FUNDED_ACCOUNTS: [struct(address = "0xXYZ", private_key = "ABCDEFG"),...]
    ```
    
    ---------
    Co-authored-by: default avatarRafael Matias <rafael@skyle.net>
    968cfbdb
Name
Last commit
Last update
..
apache Loading commit data...
assertoor Loading commit data...
beacon_metrics_gazer Loading commit data...
blob_spammer Loading commit data...
blobber Loading commit data...
blobscan Loading commit data...
blockscout Loading commit data...
blutgang Loading commit data...
broadcaster Loading commit data...
cl Loading commit data...
dora Loading commit data...
dugtrio Loading commit data...
el Loading commit data...
el_forkmon Loading commit data...
ethereum_metrics_exporter Loading commit data...
forky Loading commit data...
full_beaconchain Loading commit data...
goomy_blob Loading commit data...
grafana Loading commit data...
mev Loading commit data...
network_launcher Loading commit data...
package_io Loading commit data...
prefunded_accounts Loading commit data...
prelaunch_data_generator Loading commit data...
prometheus Loading commit data...
remote_signer Loading commit data...
shared_utils Loading commit data...
snooper Loading commit data...
static_files Loading commit data...
tracoor Loading commit data...
transaction_spammer Loading commit data...
vc Loading commit data...
xatu_sentry Loading commit data...
node_metrics_info.star Loading commit data...
participant.star Loading commit data...
participant_network.star Loading commit data...