dashpay / platform

L2 solution for seriously fast decentralized applications for the Dash network
https://dashplatform.readme.io/docs/introduction-what-is-dash-platform
MIT License
71 stars 39 forks source link

Collect feedback about SDK #2281

Open shumkov opened 2 hours ago

shumkov commented 2 hours ago

We want to collect your feedback on using RS SDK / DPP in one place for our upcoming work to improve user experience. Please share your feelings, pain points, places you like, “nice to have” things, and other suggestions. Thank you!

shumkov commented 2 hours ago

From @HashEngineering

Some things were or are missing from rs-sdk:

  • Replace document
  • Delete document
  • Core endpoints such as get_transaction
  • get status endpoint

The API is simple with a common interface for all queries and for submitting state transitions (though the client doesn't need to consider state transitions but instead identities, documents, data contracts and votes) the fetch and fetch_many methods work quite well and have _with_settings variants to allow the client to specify their own request_settings for different retry parameters. The Put* interfaces are missing some things. In my system, I prefer a put_to_platform and a wait_for_result method rather than a single method that does both. The reason for this is that I want to wait on several different EvoNodes to return the state transition result. I found this to ensure that the state transition was propogated during the username creation process which requires putting an identity, then two documents and in some cases, retrieving the vote information on contested domain documents. Even for put_to_platform , I have some extra retry that I have added to handle the cases of bad nodes. Previously on testnet, I encountered EvoNodes that said the dpns contract did not exist. In such cases, I would need to try again with a different EvoNode. The ban features in the Sdk are hidden, so the client cannot ban such nodes. Perhaps this could also be resolved with other checks in the SDK or dapi-cleint to retry. Not sure if this happens anymore; it was first discovered with Platform 1.1 or 1.0 on testnet -- it may not happen anymore.

shumkov commented 2 hours ago

From @QuantumExplorer

Generics for fetch and fetch_many are a bit tricky because you don't know what to pass, and you don't have autocomplete for this.