Skip to content

Conversation

pshenmic
Copy link
Owner

Issue

We need a way to register an identity in the application. It is done via providing a private key from the address with the DASH balance, which will be used to register an identity in Dash Platform and fund initial credit balance.

The command crafts and broadcast signed AssetLock transaction in the Core network, and then uses the InstantLock (ChainLock) proof to create a IdentityCreateStateTransition in the Dash Platform network.

Operation involves creating transactions in two network (Core, Platform)

Things done

  • Serialize & Sign Core AssetLock transaction

@pshenmic pshenmic added the enhancement New feature or request label Oct 31, 2024
@pshenmic pshenmic self-assigned this Oct 31, 2024
@pshenmic pshenmic marked this pull request as draft October 31, 2024 10:00
@pshenmic
Copy link
Owner Author

pshenmic commented Nov 12, 2024

It is not possible to achieve that at this time, because InstantLock / ChainLock data that is needed to create IdentityCreateTransition in Platform only available from the Core ZMQ interface, and it basically blocks implementation, because platform-cli relies on DAPI endpoint.

There is a support of InstantLock messages in the DAPI via subscribeToTransactionWithProofs query, but it work through BloomFilter, which does not have an implementation in the rust-dashcore and thus we can't use that method.

Other indexing services like Insight API, or rpc.digitalcash.dev, also does not provide that information, because Core itself does not have such data in the RPC

The best scenario, if Core could implement instant lock \ chainlock buffer data in one of the RPCs, so we could easily fetch that via HTTP gateways.

Another approach would be to implement a separate, hosted service, that will allow you to subscribe on transactions and return you instantlock data that has access to Core ZMQ, but this gotta be done as a separate project (f.e. https://github.com/maxmanukian/dash-websocket)

@pshenmic
Copy link
Owner Author

pshenmic commented Jan 9, 2025

Dash Core is soon to implement a new RPC called getrawislocks, that returns raw hex InstantSend proofs values for transactions, allowing us to use them for AssetLock proof in platform identity registration.

dashpay/dash#6455

That is going to be released in Dash Core v22.1, and it allows to continue the work on platform registration feature in platform-cli.

I deployed Core test build locally and updated the code to query local RPC instance. After code update and implementing all neccessary identity private keys generation, it resulted in a successful transaction:

https://testnet.platform-explorer.com/transaction/9B45C3C875A26C61691FA3F63F3CD8754FD296745328BDB70A613C346DF3F2BD

Since my application is using DigitalCash RPC, I will have to wait until new Core is released and deployed at the https://rpc.digitalcash.dev nodes.

At the same time, I am going to finish the Pull Request, and leave it until all necessary changes are deployed

@pshenmic pshenmic changed the title Add Register Indentity command Add Register Identity command Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant