-
Notifications
You must be signed in to change notification settings - Fork 2
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
Adopt CKB@v0.105.0 #102
Comments
Oh, this is really tricky |
in ruby code, the core function which parse the
the line However this function works under so I want to know where can I find the document showing which position of byte/bits belongs to which. e.g. |
@shaojunda who wrote this logic says there's no such a document of how to parse the miner message from the witness, he interpreted the code from ckb source code. But the code snippet posted above recalls me that the data should be serialized by https://github.com/nervosnetwork/molecule @quake could you do me a favor to add a link to the schema? |
Got the code here https://github.com/nervosnetwork/ckb/blob/fafa37d979bd83f867358efb7aa176a0ec295bbd/util/types/src/generated/blockchain.rs#L8514-L8548 @iamyates |
I've found something new about the miner message and will update in this issue. The abnormal decoding could be a problem of frontend and testnet miner |
The message is failed to be decoded for 2 reasons
So we should fix the decoding of message by 2 updates
|
Fixde by PR nervosnetwork/ckb-explorer-frontend#1105 which fixes the Now I've confirmed the first 4 bytes are meaningless and can be omitted so rendering them as invisible characters is fine. |
The method to parse the miner message changes since CKB@v0.105.0, the first 4 bytes will be the signal of softfork activation state.
Or we can fetch softfork state by PRC get_deployments_info which returns the version by a
bit
field. Ifbit
is 1, the first 4 bytes of miner message should be treated as a signal.Ref:
Code of versionbits: https://github.com/nervosnetwork/ckb/blob/de391ff6849f12bb01e05af9e634f4a8a6295bac/spec/src/versionbits/mod.rs#L310-L319
PR of versionbits: nervosnetwork/ckb#3515
The text was updated successfully, but these errors were encountered: