Skip to content

Updated Tokenchain Keys - #457

Merged
maneeSHA-256 merged 23 commits into
developmentfrom
maneesha/update-token-chain/block-keys
Feb 10, 2026
Merged

maneeSHA-256 merged 23 commits into
developmentfrom
maneesha/update-token-chain/block-keys

Conversation

@maneeSHA-256

@maneeSHA-256 maneeSHA-256 commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

This PR is

  1. updating the token chain keys from numeric values to meaningful words.
  2. removing unrequired and duplicate keys
  3. updating max decimal points in dump tokenchain from 5 to 3

Link to dump token chain of all kinds of tokens in Rubix : new token chains of all assets

Old Keys

    ```
    TCTokenTypeKey          string = "1"
TCTransTypeKey          string = "2"   // renamed as TCBlockTypeKey
TCTokenOwnerKey         string = "3"
TCGenesisBlockKey       string = "4"
TCTransInfoKey          string = "5"
TCQuorumSignatureKey    string = "7"
TCPledgeDetailsKey      string = "8"
TCBlockHashKey          string = "98"
TCSignatureKey          string = "99"
TCBlockContentKey       string = "1"
TCBlockContentSigKey    string = "2"
TCDataKey               string = "9"
TCTokenValueKey         string = "10"
TCChildTokensKey        string = "11"
TCInitiatorSignatureKey string = "12"

    GBTypeKey string = "1"     // removed : duplicate of TCTransTypeKey
GBInfoKey string = "2"

    GITokenLevelKey         string = "1"    // removed : unrequired
GITokenNumberKey        string = "2"   // removed : unrequired
GIMigratedBlkIDKey      string = "3"    // removed : unrequired
GIPreviousIDKey         string = "4"    // removed : unrequired
GIParentIDKey           string = "5"
GIGrandParentIDKey      string = "6"    // removed : unrequired
GICommitedTokensKey     string = "7"
GISmartContractValueKey string = "8"    // removed : duplicate of TCTokenValueKey
GINetworkIDKey          string = "networkID"

    TISenderDIDKey      string = "1"
TIReceiverDIDKey    string = "2"    // removed : duplicate of TCTokenOwnerKey
TICommentKey        string = "3"
TITIDKey            string = "4"
TIBlockKey          string = "5"
TITokensKey         string = "6"
TIRefIDKey          string = "7"
TIDeployerDIDKey    string = "8"
TIExecutorDIDKey    string = "9"
TICommitedTokensKey string = "10"
TIPinningDIDKey     string = "11"

    TTTokenTypeKey       string = "1"
TTPledgedTokenKey    string = "2" // depreciated not used
TTPledgedDIDKey      string = "3" // depreciated not used
TTBlockNumberKey     string = "4"
TTPreviousBlockIDKey string = "5"
TTUnpledgedIDKey     string = "6"
TTCommitedDIDKey     string = "7"

    PDTokenKey        string = "1"
PDTokenTypeKey    string = "2"
PDTokenBlockIDKey string = "3"


### New Keys
      ```
  TCTokenTypeKey          string = "tokenType"
	TCBlockTypeKey          string = "blockType"
	TCTokenOwnerKey         string = "tokenOwner"
	TCGenesisBlockKey       string = "genesisBlock"
	TCTransInfoKey          string = "transInfo"
	TCQuorumSignatureKey    string = "quorumSignature"
	TCPledgeDetailsKey      string = "pledgeDetails"
	TCBlockHashKey          string = "blockHash"
	TCSignatureKey          string = "signature"
	TCBlockContentKey       string = "blockContent"
	TCBlockContentSigKey    string = "blockContentSig"
	TCDataKey               string = "data"
	TCTokenValueKey         string = "tokenValue"
	TCChildTokensKey        string = "childTokens"
	TCInitiatorSignatureKey string = "initiatorSignature"
	TCEpochKey              string = "epoch"
	TCVersionKey            string = "version"

        GBInfoKey string = "genesisInfo"

        GIParentIDKey       string = "parentID"
	GICommitedTokensKey string = "commitedTokens"
	GINetworkIDKey          string = "networkID"

	TISenderDIDKey      string = "senderDID"
	TICommentKey        string = "comment"
	TITIDKey            string = "txnID"
	TIBlockKey          string = "block"
	TITokensKey         string = "transTokens"
	TIRefIDKey          string = "refID"
	TIDeployerDIDKey    string = "deployerDID"
	TIExecutorDIDKey    string = "executorDID"
	TICommitedTokensKey string = "commitedTokens"
	TIPinningDIDKey     string = "pinningDID"

	TTTokenTypeKey       string = "tokenType"
	TTBlockNumberKey     string = "blockNumber"
	TTPreviousBlockIDKey string = "previousBlockID"
	TTUnpledgedIDKey     string = "unpledgedID"
	TTCommitedDIDKey     string = "commitedDID"

	PDTokenKey        string = "pledgeToken"
	PDTokenTypeKey    string = "tokenType"
	PDTokenBlockIDKey string = "tokenBlockID"

…alue, NFTData; all assets values are stored with the key TCTokenValueKey
… TokenChainBlock struct is renamed as BlockType; removing duplicate genesis block type key GBTypeKey
…okenNumberKey - from genesis block; extracting token level and token number from tokenID (= tokenLevel-tokenNumber) for token validation; removing unused functions which were using token level or token number from genesis block
@maneeSHA-256 maneeSHA-256 self-assigned this Feb 6, 2026
@maneeSHA-256
maneeSHA-256 marked this pull request as ready for review February 6, 2026 11:42
Comment thread command/diagnostic.go
Comment thread core/parts/split.go
Comment thread core/wallet/token.go Outdated
Comment thread core/wallet/token_receiver_optimized.go Outdated
Comment thread core/wallet/token_receiver_parallel.go Outdated
Comment thread core/decode_token_chain.go Outdated
Comment thread core/explorer.go Outdated
Comment thread core/ft.go Outdated
Comment thread core/ft.go Outdated
Comment thread core/migrate.go Outdated
Comment thread core/token_chain_validation.go Outdated
Comment thread core/unpledge.go Outdated

@gklps gklps left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@maneeSHA-256
maneeSHA-256 merged commit 718b001 into development Feb 10, 2026
0 of 3 checks passed
@maneeSHA-256
maneeSHA-256 deleted the maneesha/update-token-chain/block-keys branch February 10, 2026 05:38
gklps pushed a commit that referenced this pull request Mar 24, 2026
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