EvernodeXRPL / evernode-sdk

Evernode SDK
Other
41 stars 5 forks source link

Network crawl #22

Closed shortthefomo closed 1 year ago

shortthefomo commented 1 year ago

I know it's not for everyone, but if you would be so kind as to add to the tutorials the ability for that contract to 'walk' the network and deploy on different nodes. Just that is a amazing thing to play with and would love to experiment there a little.

Not the first thing I'll be building but would be grand to have an example there to work from down the line.

Amazing stuff I'm up and building on evernode already 🥳🤯

wojake commented 1 year ago

The way that this would work is, your contract would go through the registry Hook and pick nodes that meet your contract's criteria. If it finds a node that meets your standards, your contract's XRPL account would send X EVR to the host's XRPL account, this way, you're acquiring a lease from the host.

The contract would send a copy of its contract and it files, the node would then sync with all its peers (via the provided UNL) and provide consensus.

Your contract could be hosted on Evernode forever through a crawling protocol, you just need to code it in the contract and fund the contract's XRPL account with enough EVR (so it can pay the nodes).

chalith commented 1 year ago

We are planing to do tutorials for building contracts which their logic integrates with xrpl and evernode in the future. The way @wojake supposed is logical but not secure. Because in that way we need to keep xrpl account secrets within the contract where it's would end up in a host machine. So because of the host machine is unknown and the host owner has the access it's not secure.

wojake commented 1 year ago

Oh I see, I thought It would be secure if the contract's XRPL account is controlled in a decentralized manner through multisig, where each node is a signer in the contract's signer list: No single node controls the contract's XRPL account.

chalith commented 1 year ago

@wojake Yeah you are correct about multisig, controlling XRPL account with multisig is a one secure way which we also currently focusing on.

chalith commented 1 year ago

Closing the issue since we are planing for this in the future