-
Notifications
You must be signed in to change notification settings - Fork 17
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
Token Chain Validation #185
Conversation
…atform into maneesha/tokenchain-validation
…atform into maneesha/tokenchain-validation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Maneesha-rubix
While trying to verify a token which was sent from A to B, I am able to verify it successfully on A's end. However, on B's end, I get an error: DID does nto exist: did=bafybmih54d3amspwn7p4cu67wrwutmvppfkzcevabo3p6ionqzayf7lfce
. As discussed, the reason for this is that bafybmih54d3amspwn7p4cu67wrwutmvppfkzcevabo3p6ionqzayf7lfce
is part of Server B.
My suggestion would be make the Logger statement verbose by mentioning that DIDs that tokens for a DID which are part of the server in focus, cannot be verified.
CC: @harirubix
Adding a CLI command as well as an API end point to validate required number of blocks of any (RBT as well as smart contract) token chain. The blocks are validated as per their type-requirement. An user can also validate all it's tokens or all it's smart contract tokens available in it's SQLite3 DB.
Note: Please note that, this PR is only for (RBT / smart contract) token chain validation and does not include any resolutions for failed-validations.
TokenTransferredType:
TokenGeneratedType:
TokenBurntType:
TokenPledgedType:
TokenUnpledgedType:
TokenContractCommited:
TokenDeployedType:
TokenExecutedType:
A few common validation checks for latest block of each token chain are:
The CLI command for token chain validation is:
./rubixgoplatform validatetokenchain -did <user did> -token <token ID> -sctValidation -blockCount <required number of blocks to be validated> -port <port number of user node>
token
flag is provided, then token chain of the token provided with the flagtoken
will be validatedtoken
flag is not provided, then token chain of each token in the tokens table of the user node will be validatedsctValidation
flag must be provided in case of smart contract token chain validation