Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

generator command not enabling block generation #7783

Closed
Tracked by #7210
shuse2 opened this issue Nov 15, 2022 · 0 comments · Fixed by #7855
Closed
Tracked by #7210

generator command not enabling block generation #7783

shuse2 opened this issue Nov 15, 2022 · 0 comments · Fixed by #7855

Comments

@shuse2
Copy link
Collaborator

shuse2 commented Nov 15, 2022

Expected behavior

  • generator:enable should enable the block generation for specified address with parameters
  • generator:enable should have flag --use-status-values to use the status from the node

Actual behavior

  • generator:enable should enable the block generator, but it is just setting the generator parameter
  • generator:import fails with missing parameter

Steps to reproduce

  1. Remove existing data
  2. ./bin/run keys:encrypt -f ./config/default/dev-validators.json
  3. ./bin/run generator:import -f ./config/default/dev-validators.json (add "generatorInfo" in the json file with empty array)
  4. ./bin/run generator:enable lske5sqed53fdcs4m9et28f2k7u9fk6hno9bauday 0 0 0
  5. ./bin/run generator:enable lske5sqed53fdcs4m9et28f2k7u9fk6hno9bauday --use-status-values

Which version(s) does this affect? (Environment, OS, etc...)

v6.0.0-alpha.5

@shuse2 shuse2 changed the title generator:enable command not enabling the generator generator command not enabling block generation Nov 15, 2022
@Madhulearn Madhulearn added this to the Sprint 84 milestone Dec 5, 2022
@shuse2 shuse2 linked a pull request Dec 6, 2022 that will close this issue
shuse2 added a commit that referenced this issue Dec 10, 2022
### What was the problem?

This PR resolves #7783 

### How was it solved?

- Revert generator enable/disable command to have `--use-status-value`
  - Move height/max-height-generated/max-height-prevoted as flag
- Revert temporally lisk-db version to the previous version because it
leaves locks value LiskArchive/lisk-db#78
- Fix to pass `keypairs` from `generator` to `endpoint`
- Remove keypair when setting new key

### How was it tested?

1. clean ` rm -rf ~/.lisk/pos-mainchain`
2. encrypt keys `./bin/run keys:encrypt -f
./config/default/dev-validators.json`
3. import new keys `./bin/run keys:import -f
config/default/dev-validators.json`
4. enable block generation `./bin/run generator:enable
lsk2xxvfxaqpm42wr9reokucegh3quypqg9w9aqfo --height=0
--max-height-prevoted=0 --max-height-generated=0`
5. check block is generated (wait for 1 round)
6. check status `./bin/run generator:status --pretty`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants