Developer Training Course Labs questions

Hi, all! I’ve found this Welcome - Developer Training Course and trying to follow Labs exercises. Can anybody explain to me, where I can find lock_arg from this Lab Lab: Validating Out Points - Developer Training Course

Because my output is:

rpc get_live_cell --tx-hash 0xe5d87c4b758452f6bee784e9da675746fa68c91f915f308b89fae16046f52ecb --index 0

  data: ~
    capacity: 0x2b95fd500
      args: 0x
      code_hash: 0x0000000000000000000000000000000000000000000000000000000000000000
      hash_type: data
    type: ~
status: live
1 Like

lock_arg is here


Is this transaction hash the one that was generated when you sent 100,000 CKBytes to another address?

lock_arg is here

lock_arg = lock:args? Looks like in Course another information, no?

Yes, or even another hash, also can’t find lock_arg field.
I just trying to follow. In the Course, I don’t see a screenshot of output with lock_arg too.

Looks like I am starting to understand.

Explanations for beginners:
account list command shows lock_arg value (0x47d2d74c96ea6aa9205e68cd75597a02ac4b072f) for each accounts and when you get details of the transaction by rpc get_transaction --hash 0xe8bbfccd5126fefb963fbafbf68492dcbfacbdf1362ad452f47968a12b6d03d8 (for example),

    args: 0x47d2d74c96ea6aa9205e68cd75597a02ac4b072f

lock: args: value == lock_arg value - same values.

1 Like

Another question, when I get my account:

  mainnet: ckb1qyqy05khfjtw564fyp0x3nt4t9aq9tztquhst6hrth
  testnet: ckt1qyqy05khfjtw564fyp0x3nt4t9aq9tztquhsklfu8t
lock_arg: 0x47d2d74c96ea6aa9205e68cd75597a02ac4b072f
lock_hash: 0xe6ca3cd13c73dca2198c67ce0ec41dd0c80720310f176b6d6e6f2ddb1fba799d

and when use them:

const nodeUrl = "";

const privateKey = "0x47d2d74c96ea6aa9205e68cd75597a02ac4b072f";

const address = "ckt1qyqy05khfjtw564fyp0x3nt4t9aq9tztquhsklfu8t";

I get this error:

Indexer is syncing. Please wait.
(node:22290) UnhandledPromiseRejectionWarning: Error: internal error in Neon module: stored block key: TotalSizeNotMatch("Byte32Reader", 32, 36)

This error is indicating that the length of something is wrong.

I see you posted this line of code:

const privateKey = "0x47d2d74c96ea6aa9205e68cd75597a02ac4b072f";

You have put your lock_arg in the private key area. These are not the same. A private key is always 32 bytes, which is 66 characters long in hex.

What step of the training course are you on now?

1 Like

I am at Introduction to Lumos
But looks like I didn’t understand what is PRIVATE KEY and where to get it. I thought that’s lock_arg

In Lab Exercise Setup is written, need to complete the setup instruction from the URL below for the sections “Setup a Dummy-Worker Blockchain” and “Adding the Genesis Issued Cells”
Adding the Genesis Issued Cells wasn’t clear for me. But one guy from telegram prompted me that need to use this command to export extended private key:
account export --lock-arg *********** --extended-privkey-path
I got 2 lines in file:


When I am trying to import it:
Key already exists

Why 2 lines?
When I try to use 1 of line with Golang code - looks like key is good already.
But when I am trying to use in JS code - same error. Confused.

Thank you for the feedback. We will update this to make it more clear.

I do not know why he told you to do this. There is no reason to export and then import the same key into ckb-cli.

The labs in the Developer Training Course already have the private key populated. You should not need to change this.

The top line is the private key. The second line is some kind of chain code for BIP44, and it can be ignored.

It is helpful if you tell me which lab exercise you are having a problem with, and exactly what error you are receiving.

1 Like

My problems started when I missed the section with Genesis Issued Cells and then created new accounts, but I didn’t understand where to get PRIVATE KEYs for that accounts. I think, would be better if you add some information about PRIVATE KEYs.
Also, for me wasn’t clear about lock_arg and lock: args:. I was confused there too.
Maybe, I am too newbie and it’s feeling that the Course was written by professionals, that understand all basics. It’s normal, but maybe my strange questions will help to improve something.

Yes, but that info returned me to the section about import/export keys. It’s funny. So, the puzzle is combining more clear for me.

To be honest, my journey with this Course started from Golang SDK, but their developers didn’t add even any line of comments so I started to look for additional information. As I’ve read in the Course, the lifecycle of transactions is similar in every framework/SDK, so I hope to transfer my understanding of the Course (JS) to Golang. Maybe, you can answer Golang SDK questions too?

Yes, they do help us to understand what is confusing so we can continue to improve it for everyone.

They all use the Cell Model at the lowest level, so many of the concepts should be the same. The frameworks will probably be very different though. The Developer Training Course only supports JavaScript right now since that is the largest user base.

Unfortunately, I do not use Golang. If you have a question about the Golang SDK specifically, then the best place to ask that I can recommend is in the Nervos Discord #dev-chat channel or the Telegram Nervos Network / CKB Dev channel.