Open shumkov opened 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
andfetch_many
methods work quite well and have_with_settings
variants to allow the client to specify their own request_settings for different retry parameters. ThePut*
interfaces are missing some things. In my system, I prefer aput_to_platform
and await_for_result
method rather than a single method that does both. The reason for this is that I want towait
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 forput_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.
From @QuantumExplorer
Generics for
fetch
andfetch_many
are a bit tricky because you don't know what to pass, and you don't have autocomplete for this.
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!