-
Notifications
You must be signed in to change notification settings - Fork 235
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
Lock the epoch length in a devchain using mainnet data #4092
Comments
Hello, have you tried speeding up the ckb miner? You can achieve this by setting lower values for [miner.client]
rpc_url = "http://127.0.0.1:8114/"
block_on_submit = true
# block template polling interval in milliseconds
poll_interval = 50
# enable listen notify mode
# listen = "127.0.0.1:8888"
[[miner.workers]]
worker_type = "Dummy"
delay_type = "Constant"
value = 100
|
@eval-exec the relevant part of
|
Now using @eval-exec Still very different from the parameter set in |
@phroi I read the v1-interface's The ckb node is initialized with data from the mainnet, and in this context, setting |
I just tried modifying (trap 'kill -INT 0' SIGINT; cd ~/ckb_dev/; ./ckb run --skip-spec-check --overwrite-spec --indexer & sleep 1 && ./ckb miner) The epoch length keeps being of constant length 1800 🤔 |
Let me know if you want to try something else 🤗 |
@phroi Before you run the command You can get this from the tail of |
I copied the data folder from my Neuron wallet and probably I haven't open it since then 🤔 This likely is the old tip header information:
Parsing the epoch field: The issue is that epoch length now is 1800, but it was 1119 🤔 🤔 🤔 Side note: when importing the data into the devchain, I was asked to update the database to the new version. |
Thank you, I'm trying to reproduce this. |
I've discovered that the maximum value for epoch length is Line 74 in 0a3f9b1
|
If it helps solving the issue, I can sync Neuron and we can redo the full procedure together, so we are 100% sure that we are both seeing the same data 🤗 |
Sure. I'm syncing my node to latest tip too. |
This behavior aligns with our expectations. When Lines 847 to 852 in 0a3f9b1
|
It'll take hours for me:
If you have any other question, feel free to ask 🤗 |
@eval-exec whenever you want I'm ready, also I have updated the node to |
@phroi I have reproduced successfully, and my previous mainnet node's tip header is |
#4097 seems exactly what I had in mind 🥳 |
If you'd like to give it a try, you can compile this branch of the CKB node yourself by |
I compiled ckb by #4097, and specify In This is my [params]
genesis_epoch_length = 1743
# Other parameters...
initial_primary_epoch_reward = 1_917_808_21917808
secondary_epoch_reward = 613_698_63013698
max_block_cycles = 10_000_000_000
cellbase_maturity = 0
primary_epoch_reward_halving_interval = 8760
epoch_duration_target = 80 # instead of 14400
permanent_difficulty_in_dummy = true
[pow]
func = "Dummy" and [miner.client]
rpc_url = "http://127.0.0.1:8114/"
block_on_submit = true
# block template polling interval in milliseconds
poll_interval = 10
# enable listen notify mode
# listen = "127.0.0.1:8888"
[[miner.workers]]
worker_type = "Dummy"
delay_type = "Constant"
value = 10
|
I tried to reproduce all steps from zero, but ckb node kept crashing. So I standardized and repeated all steps again and again until I remembered that on this old laptop I have to use ckb Portable, so I confirm that #4097 solves this issue, feel free to close this issue when the PR gets merged! Thanks for your support @eval-exec 🤗 |
A new RPC method will be added to ease generating an epoch: #4128 |
Feature Request
Background
Currently I'm working on rescuing dCKB deposits by writing a new web interface. Given the lack of documentation, it seems impossible to re-deploy correctly those contracts on a brand new devnet.
Is your feature request related to a problem? Please describe.
Following @doitian instructions, I'm running a devchain using existing mainnet data.
Now I want to speed up this devnet to test dCKB and NervosDAO interactions, so I followed the steps previously suggested, except for changing the
genesis_epoch_length
as indicated.The issue is the epoch length doesn't seem much affected by them, as currently one epoch is more than 16 minutes.
To fully reproduce this issue follow the steps indicated on the Readme.
Describe the solution you'd like
@doitian suggested:
Keep up the great work 💪
Phroi
The text was updated successfully, but these errors were encountered: