• Forum has been upgraded, all links, images, etc are as they were. Please see Official Announcements for more information

[Proposal] Enable DAPI on the HPMN nodes

pshenmic

Member
Dash Support Group
Hey guys, I would like to propose a feature that will enable Dash SDK SPV wallet to be enabled in the mainnet. That will unblock further app development and will ease the onboarding of new devs that wants to integrate Dash in their products. I often see how people want to use Dash SDK in the mainnet, but it's only working in the testnet, however we already have all the infrastructure for that. That will also look like a little step towards our eventual Dash Platform release.

Background


Dash Core Group have already developed a wonderful Dash SDK for Javascript and it gives you much much easier access to the Dash network. It includes everything a regular developer would ever need: SPV wallet, HD keys, and many more. It is originally meant to be enabled together with platform, because it relies on the DAPI to receive block headers and other on-chain data.

DAPI stands for Decentralized API and it is a part of the upcoming Dash Platform system. It acts as a GRPC / JSONRPC gateway for applications to send and retrieve data in the both L1 and L2 protocols.

SPV stands for simple payment verification and it works via checking wallet's transactions in the block headers without downloading and storing them locally. Thus, it makes easier to integrate Dash into different products, because you don't need an external server or hard drive, and you still can verify the incoming data. Integrating Dash is easy as just downloading the library.

Not only that, it is a part of the DashPay vision as well, because it will enable further web extensions development. That extensions expected to look like a metamask in the ethereum's web3. But instead of relying on the centralised API (like etherscan), that can easily fool you and be offline, dash extension will only rely on the Dash Network iteself, means you can't just shut it down.
Screenshot 2023-08-16 at 18.23.33.png

Solution

Technically, it is already possible today to start deploying DAPI components on the HPMN hosts. If I'm not mistaken, network has already activated HPMN nodes and they are incentivised to keep services running. They will provide necessary data for Dash SDK in order for correct so called sync. The task itself is not so big, and its more about network agreement. The approximate things to change:

* Disable platform queries in the DAPI software for mainnet
* Enable DAPI service for mainnet in the dashmate, DMT, DMZ, or any other node deployment tool
* Enable DashSDK for mainnet


Work flow

I am eager to prepare and test all the necessary changes if the network agrees to do it. The process includes submitting a PRs and testing the whole integration in the devnet (smoke tests).

About me
I am dip-dived Dash developer working on stuff in the Dash Incubator, I am pretty familiar with the whole system (core + platform) and I am happy to answer any your incoming questions. I am around in the Dash discord as well, if you need more quicker feedback (y)

Links
 
Hey guys, I would like to propose a feature that will enable Dash SDK SPV wallet to be enabled in the mainnet.

I am against the massive usage of SPV wallets. People should be allowed to use an SPV wallet only in case this wallet connects to a server they have full control. And this must be part of the protocol.

We dont need to recruit stupid members into Dash, stupid people who may believe that they hold a crypto wallet, while in reality they have not. This is against the whole crypto idea. SPV wallets is a trojan horse idea that was inflated and overhyped by the agents who want to transform the cryptocurrency servers into bank servers. Their dream is that the majority of people will hold SPV wallets, while the full blockchain servers will belong only to the bankers. So everything will be under their control. Not your keys, not your crypto. Core wallets only! Idiots, go away from crypto!

So my answer is NO. I am against this proposal.
 
Last edited:
I am sorry, but could you elaborate? Is there any serious flaws in the SPV wallet designs?

SPV wallet does not share any of your private keys with any party, all keys stays only under your control. It just request block transactions info from the network and verifies it locally with the Merkle Tree Proofs. This is basically how all dash mobile wallets works. You can consider it as a "light" client implementation.
 
I am sorry, but could you elaborate? Is there any serious flaws in the SPV wallet designs?

SPV wallet does not share any of your private keys with any party, all keys stays only under your control. It just request block transactions info from the network and verifies it locally with the Merkle Tree Proofs. This is basically how all dash mobile wallets works. You can consider it as a "light" client implementation.

I dont know if there is a flaw. What I know is that the easy usage of SPV wallets reduces the number of full blockchain servers. And this is bad. We should discourage people of using SPV wallets, and encourage them to use core wallets. What adds real security to the network and protects it from potential attacks of the agents is the big number of full blockchain servers and core wallets. As you can understand, I am also tottaly against the road of HCMN(EVO) nodes, and one of the many reasons is because EVO reduces the number of Dash servers.

Do you want an SPV wallet? Thats ok. First run a full blockchain Dash server, then you will be allowed to connect some SPV wallets (lets say 5) to the Dash netrwork. This is the right thing to do. So I can agree to your proposal only in case there is a protocol that assures that the SPV wallet holder also fully controls a full blockchain server, or in case the protocol defines a limited number of SPV wallets proportional to the number of full blockchain servers.
 
Last edited:
Is there a minimum number of Evonodes necessary for the Dash SDK SPV wallet to be enabled and working well on mainnet ?

I very much like the idea, but with currently only 64 Evonodes running on Mainnet, i do wonder if we should have a minimum level of Evonodes running on Dash Mainnet ? Something like 100 or 150 Evonodes ? To form a stable Evonodes network, before considering something like this.
Also will this affect the hardware requirements for Evonodes ? (which is currently nothing more then a dashd running, without much additional data). You can even run an Evonenode currently, with the hardware requirements of a normal masternode. I am not sure if this changes, if the Dash SDK SPV wallet runs on Mainnet.

I am a bit surprised that nobody else thought about introducing the Dash SDK SPV wallet on Mainnet, before the release of Dash Platform on Mainnet. It makes perfect sense to me, specially since the SDK SPV wallet has been feauture-complete for such a long time now on Testnet.
 
Last edited:
Is there a minimum number of Evonodes necessary for the Dash SDK SPV wallet to be enabled and working well on mainnet ?
That's a good question. I totally forgot about that part, I feel like the best is to ask core guys like @Pasta or even @QuantumExplorer

I think @Technologov already proposed this, a long time ago.
Yes, I've seen his post. However he proposed to change the default behaviour of the Dash Core application (which you would still need to host it), while my proposal is to enable it on protocol level (HPMNs will be responsible for serving DAPI).

It's going to be rolled out anyway together with the Dash Platform, I just propose not to wait :)
 
The process includes submitting a PRs and testing the whole integration in the devnet (smoke tests).

Will the Dash SDK SPV wallet be tested on both devnet and testnet ? or just devnet ?
Feels to me like we are skipping the testnet testing phase here for DAPI / Dash SDK SPV wallet.

Is DAPI currently at a stage that we can do that ?
 
Last edited:
Yes, I've seen his post. However he proposed to change the default behaviour of the Dash Core application (which you would still need to host it), while my proposal is to enable it on protocol level (HPMNs will be responsible for serving DAPI).

DashCore application (dashd) implements the protocol. So if you change the behavior of dashd, you change the protocol.

I dont understand your claim that your proposal changes the protocol while @Technologov proposal do not.


Technologov said:
Add the necessary RPC calls, so that Electrum software (and other SPV wallets) could connect to any Dash node directly by default (bypassing ElectrumX layer on top).

The above is considered as a change to the protocol, isnt it?
 
Last edited:
Will the Dash SDK SPV wallet be tested on both devnet and testnet ? or just devnet ?
Feels like we are skipping the testnet testing phase here for DAPI / Dash SDK SPV wallet.
I believe it is already in the testnet in the production. For instance, @DashMoney 's DApps is using Dash SDK for the work, I am using Dash SDK in my platform-explorer project, and stuff like that. Plus, there are automated tests that happens in the CI each release that ensures that it works in both Node.JS and Browser environments.

But in my case I will additionally deploy mainnet-like devnet network, and test that Dash SDK is able to connect and sync, and everything works as intended. (y)

Is DAPI currently at a stage that we can do that ?
Absolutely yes (except we need to disable L2 queries)

DashCore application (dashd) defines the protocol. So if you change the behavior of dashd, you change the protocol.
Isn't we already changed it in v19 (with registrations of hpmns)?
 
and with that Demo shows he doesn't understand what the fuss about platform was about this whole time.

Where were you when we were discussing the issue? What was your contribution to the discussion, where are your arguments, and your answers to other people's opposite arguments? Go read the 847 messages, before start talking your bullshit. I think you are the one who dont understand what the fuss about the platform is.

Especially I recommend you to start your reading by reading the below:

We dont need a chief. We need a Dash knowledge tree to vote/pray on it. A tree where all the possible decisions for the dash cryptocurrency are available to be voted in its branches. And we need angels (aka messengers) to inform us and guide us, in order to cast wise votes/prays into this Dash knowledge tree and make it evolve into a tree of life. Dash, as everything in life, has its own tree of knowledge of good and bad, and its own best version of that tree (a tree of life). It is not enough for someone to discover the tree of life of Dash. It has to communicate the message to the other Dash community members, and convince them to vote/pray wisely into the Dash decision tree . So we dont need chiefs, we need angels and comrades. And we need to vote the numbers too.

There are 10 kinds of humans.
These who understand the above, and these who do not.

TLDR;
I believe that the correct vote/pray (for the branch of the Dash knowledge tree we are discussing in this thread) is:

1) Dashplatform should be launched initially by the discovered individualities of mnowatch.org , one node each. <--real decentralization, incentivizes the increase of the voters
2) Let the DashPlatform launch standalone in the free market, without asking any masternode rewards. <--NO to a Dashplatform fed by MN rewards, this is statism.
3) Offer Dashplatform shares to all the masternodes, allowing them to be paid in case the Dashplatform becomes profitable in the free market. <-- unify the dash community, in contrast to the "divide and conquer" method of DCG
4) Turn the Dashplatform profitable by creating an app that will support the creation of a Dash knowledge tree. This decision tree will be replicated everywhere in the platform and people will vote/pray on it, add or delete branches of it, and comment on it (by paying the relevant platform fee). <-- governance without amanda's chief
5) Make the tree an absolute commitment for all the developers of DCG, so that no DCG development is allowed in case there is not a relevant branch of the tree that allows it. <-- accountable developers

Vote/Pray all of the above, and the tree of life will flourish....

HEADER-1.gif



the king saw a watcher (*), a holy one, coming down from heaven and saying: "Chop down the tree and destroy it, but leave the stump of its roots in the earth, bound with a band of iron and bronze and in the tender grass of the field, and let it be wet with the dew of heaven, and let his portion be with the beasts of the field, till seven periods of time pass over him" --- εἶδεν ὁ βασιλεὺς εἲρ καὶ ἅγιον καταβαίνοντα ἀπὸ τοῦ οὐρανοῦ, καὶ εἶπεν·: "ἐκτίλατε τὸ δένδρον καὶ διαφθείρατε αὐτό, πλὴν τὴν φυὴν τῶν ριζῶν αὐτοῦ ἐν τῇ γῇ ἐάσατε καὶ ἐν δεσμῷ σιδηρῷ καὶ ἐν χαλκῷ καὶ ἐν τῇ χλόῃ τῇ ἔξω, καὶ ἐν τῇ δρόσῳ τοῦ οὐρανοῦ αὐλισθήσεται, καὶ μετὰ θηρίων ἀγρίων ἡ μερὶς αὐτοῦ, ἕως οὗ ἑπτὰ καιροὶ ἀλλοιωθῶσιν ἐπ’ αὐτόν" -- Daniel 4:23–25
 
Last edited:
Dash SDK wallet = Dashpay wallet on the Dash Roadmap

Knipsel.JPG


The Dashpay wallet at the start was suppose to be a full fledged dapp, something seperate from the Dash mobile wallets (Android, iOS).
However many years ago the decision was made by devs to upgrade existing mobile wallets to ultimately form the Dashpay wallet, and they released already many updates to the mobile apps to lay the foundation for this.

Saying you are against Dash SPV wallet is saying you are against the Dashpay wallet, which has been on Dash Roadmap like forever.
Saying you are against Dash SPV wallet due to not running the full blockchain, is saying you are against Dash mobile wallets.
It makes very little sense to me.

The reason that we can technically implement the Dashpay wallet on Dash Mainnet already is because it does not necessarily need to have Dash Platform active on Mainnet, before getting released (which is also why i consider the Dashpay wallet not a full fletched dapp, i consider it a semi-dapp).
 
Last edited:
This is such a great idea, @pshenmic. I remember this was the first use case that excited me about DAPI years ago.
Thanks for writing this up, and all of the other work you've been doing for Dash lately 💪
 
Does this require a fully indexed Dash blockchain? Apparently in v20 this will be required to run Evo, however, in v19 there is no incentive to fully index the chain which results in a 2x increase in disk usage and 50% more CPU required to keep up with the TX flow. Also, I noticed the connection is over https, this requires TLS and that means submission to a central authority to get the certs also out of scope until v20. Considering Evonode uptake is sluggish, I don't think we should compound that with putting more pressure on the MNOs at this critical time.
 
Does this require a fully indexed Dash blockchain?
Yes it will
Also, I noticed the connection is over https, this requires TLS and that means submission to a central authority to get the certs also out of scope until v20
Not sure, I thought it there are different independent CAs? Those certs are not domain based, but rather IP-address based, so its easy issue new one in case.
 
Back
Top