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

Configure initial delegation #429

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

novalis
Copy link
Contributor

@novalis novalis commented Apr 22, 2022

@novalis novalis marked this pull request as draft April 22, 2022 13:54
@novalis novalis changed the title Draft: Configure initial delegation Configure initial delegation Apr 22, 2022
@nicolasochem nicolasochem self-requested a review April 22, 2022 21:13
Copy link
Collaborator

@nicolasochem nicolasochem left a comment

Choose a reason for hiding this comment

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

I tried this by:

  • generating a chain with mkchain with 2 bakers
  • removing one of the bakers and renaming its key to baker-0-delegate
  • merging the lb_toggle branch
  • importing the genesis parameters from dailynet
  • setting the boot protocol to alpha
  • building a custom image of octez based on MR5071
  • setting delegate_to in the account as follows:
  baker-0-delegator:                                                                                                                                                                 
    bootstrap_balance: '4000000000000'                                                                                                                                               
    is_bootstrap_baker_account: false                                                                                                                                                
    key: edsk3H2d19nzQMxgSAmybcCpEkC2a4vFuZ2MF1xXJscQWtuHpW4PD2                                                                                                                      
    type: secret                                                                                                                                                                     
    delegate_to: baker-0                          

Then looking at activation logs:

          │         "bootstrap_delegations": [                                                                                                                                                │
│             {                                                                                                                                                                     │
│                 "from_pkh": "tz1erGynP5PAP5WJbnvYi8Ho4XsRYS3Ti4gn",                                                                                                               │
│                 "to_pkh": "tz1VuV7MYyJgVmdWywarAeUa6JQicZriAbvP"                                                                                                                  │
│             }                                                                                                                                                                     │
│         ]        

which is expected.

But then I opened a shell to the node and I didn't see what I was expecting:

 ~ $ tezos-client list known addresses
baker-0: tz1VuV7MYyJgVmdWywarAeUa6JQicZriAbvP (http sk known)
baker-0-delegator: tz1erGynP5PAP5WJbnvYi8Ho4XsRYS3Ti4gn (pk known)
~ $ tezos-client get delegate for baker-0
tz1VuV7MYyJgVmdWywarAeUa6JQicZriAbvP (known as baker-0)
~ $ tezos-client get delegate for baker-0-delegator
none

What did I get wrong? Here is my complete values.yaml

Also I think we should document this feature in the values.yaml comments (as we do for all features).

@novalis
Copy link
Contributor Author

novalis commented Apr 22, 2022 via email

@nicolasochem
Copy link
Collaborator

I am using alpha. On ithaca, it (predictably) refuses to bootstrap the chain because of an unknown param bootstrap_delegations.

@novalis
Copy link
Contributor Author

novalis commented Apr 25, 2022

dmttest_values.txt

My values file, which does work

@nicolasochem
Copy link
Collaborator

It works now with the latest pushes on MR5071.

@novalis novalis force-pushed the config-delegation branch from 38b7dfc to 7efaa22 Compare May 17, 2022 19:13
@novalis novalis marked this pull request as ready for review May 17, 2022 19:13
@novalis
Copy link
Contributor Author

novalis commented May 17, 2022

Upstream MR is now merged

@novalis novalis force-pushed the config-delegation branch from 7efaa22 to a130782 Compare May 17, 2022 19:21
@nicolasochem
Copy link
Collaborator

I tried again with a recent master branch build and it does not work anymore. Based on my previous comments, I expect to see bootstrap_delegations in my activation parameters, but it's no longer the case. Instead, I am seeing:


│             [                                                                                                                                                                     │
│                 "tz1cP2pmkWKDcgefqdjPrRbhbk5jRWc3Rttj",                                                                                                                           │
│                 "4000000000000",                                                                                                                                                  │
│                 "tz1gwzp3DKDWgfjGnxfMGTmjqnuysXuGBzKv"                                                                                                                            │
│             ]                              

This was apparently changed during one force-push: https://github.com/oxheadalpha/tezos-k8s/compare/38b7dfc8a8e3a5ed758e58af1222bb963ff6d3c5..7efaa2209acf94f30609319d385d53426de25c82#diff-1a28c90349a94d90b197e351f0a82a1ed3f70207ebcaaa2ecff3f57b1089831aL503

Was it accidental? Or are we in the process of changing the syntax in parameters.json?

@novalis
Copy link
Contributor Author

novalis commented May 25, 2022 via email

@nicolasochem
Copy link
Collaborator

I can't make it work with a recent container from master branch: https://hub.docker.com/layers/tezos/tezos/tezos/master_2c2c093b_20220525220334/images/sha256-3ee6dbff99a260a9b85bf642b2dfa033ef927fec6f8c4fcfbf10aacb01f70c45?context=explore

I am using proto alpha. I checkeded in the activation job log that the parameters contain the array with the third element being set to the correct hash:

│             [                                                                                                                                                                     │
│                 "tz1eawTP2ueRCqsYZq3DebwW9PkthdCqcZa8",                                                                                                                           │
│                 "4000000000000",                                                                                                                                                  │
│                 "tz1WrZpjVRpsmjv8VL3781RhyLi5JyHsGXK2"                                                                                                                            │
│             ]                                    

However I don't see the delegation:

~ $ tezos-client list known addresses
Warning:
  
                 This is NOT the Tezos Mainnet.
  
           Do NOT use your fundraiser keys on this network.

baker: tz1WrZpjVRpsmjv8VL3781RhyLi5JyHsGXK2 (http sk known)
delegator: tz1eawTP2ueRCqsYZq3DebwW9PkthdCqcZa8 (pk known)
~ $ tezos-client get delegate for delegator
Warning:
  
                 This is NOT the Tezos Mainnet.
  
           Do NOT use your fundraiser keys on this network.

none

Last time I checked prior to merge it was working. Here is my values.yaml (you may have to modify the utils container to match what you built locally):

david_values.yaml.txt

@novalis
Copy link
Contributor Author

novalis commented May 27, 2022

Aargh, I'm seeing this too, and I have no idea why. Will investigate.

@novalis novalis force-pushed the config-delegation branch from a130782 to 615bf12 Compare June 1, 2022 12:51
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