You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it includes extrinsics signed with authors dat secret key
or a supporter registers for them
could be used by many pinning/hosting service, not only datdot
anyone can collect those hypercores and PUBLISH them (e.g. maybe integrated into BEAKER BROWSER?)
PUBLISHING them adds them to the datdot system, but they aren't necessarily command hypercores
CRDT consensus mechanism
so - currently there's a bit of logic you do on "importing" a block on the network that you use to control how blocks change storage etc. in "blockchain world" that means you keep storage for all prospective forks of the chain until finality or whatever and then prune them. but in CRDT world the logic is slightly different the idea is we could replace the "blockchainy" logic in block importing, and replace it with CRDT logic
would mean there would be no forks, but instead you could have divergent changes and one set of changes gets "forgotten" potentially, but it's useful for certain usecases
everyone has their own currency => hypercores as "blockchains" with single authorities
publish extrinsics/transactions/commands to hypercores
@IDEA:
anyone can follow a HYPERSWARM (=hypercore with somebody as the owner)
and RELAY that owners transactions onto their own TOWER (=transaction hypercore)
don't trust payments in someone's currency, unless
it is verified by them
you trust them
data retrieval
USE CASE: retrieve data from a known hypercore onchain (e.g. to be used in a smart contract pallet)
// retrieve hypercore backed data onchainconstvaultAPI=require('datdot-vault')constserviceAPI=require('datdot-service')constchainAPI=require('datdot-substrate')// ------------// SUPPORTERconstsignature=sign(secretkey,nonce,hypercore_address)chainAPI.requestData(publickey,signature,[[hypercore_address1,range1],[hypercore_address2,range2]],event=>{})// ------------// RETRIEVERconst{account: { publickey, secretkey }, sign }=vaultAPI.account()chainAPI.offerRetrieval(publickey,functiononRetrieval(event){const{ addressranges,author: {publickey: author_pkey}}=eventaddressranges.forEach(({ address, range})=>{serviceAPI.followHypercore(address,range,functiononchunk(chunk){constsignature=sign(secretkey,nonce,chunk)chainAPI.submitData(publickey,signature,chunk)// + Merkle Proof// RETRIEVER needs to pay `transaction fee`// => RETRIEVER get paid for doing it (incentivisation)// => BACKERS pay for it// => FRIENDS are RETRIEVER who pay for it// => or COMPANY (thus not for free)})})})// => datdot has fixed changing set of RETRIEVERSRANDOMRETRIEVERvs.CHOSENRETRIEVER=>RANDOMRETRIEVERgetspaidCHAINandCHAINgetspaidbyBACKERS=>CHOSENRETRIEVERdoesitforfreeorgetspaidbyBACKERSdirectly=>likee.g.offeraservicetoBACKERSandthenchosingoneselftodoitandgetpaid
command cores
SUBMITTING EXTRINSICS (for free) via HYPERCORES - upload info (dats) USE CASE:
User X doesn't want to interact with or run a datdot node
User X is PUBLISHER of a dat/hypercore that is being pinned on datdot
User X is AUTHOR and can append an extrinsic to the hypercore which is parsed and executed onchain.
=> X does not use datdot but publishes dat/hypercore which is hosted/pinned by datdot
=> X can append valid extrinsic to hypercore, which is then: parsed & executed on chain
=> X does not need to touch other rpc endpoints or run a datdot node
=> X can do stuff like:
registerFriends()
registerHypercore()
submitProofsForChallenge()
transferRatio()
...but without having to use anything but **the swarm** and **their pinners**
not SUBSTRATE reacting to DATS
but DATS send information back to SUBSTRATE
=> X has a dat folder as OUTBOX for commands connected to datdot instance
ALTERNATIVE
PEOPLE would just subscribe to CHAIN EVENTS
=> but PEOPLE are interested in ALL the HYPERCORE CHUNKS if they are VALID EXTRINSICS
RELAYERS - way simpler than ppl subscribe to hypercores and register callbacks
HOSTERS (& maybe ATTESTERS) submit chunks to verify on CHAIN
BACKERS pay (in part for EXECUTION of VALID CHUNK EXTRINSICS)
AUTHOR can submit VALID EXTRINSICS (e.g. any call to runtime functions)
USE CASE: especially cool if smart contracts exist submit extrinsics for free via hypercores
0. a PUBLISHER publishes a command hypercore
a RELAYER can monitor and submit found valid extrinsic chunks
a RELAYER gets paid from BACKERS
if CHAIN figures out a hypercore chunk is valid
has a proof
is a valid extrinsic
then CHAIN accepts it as an exstrinsic signed by the authors pubkey
so merkle roots don't really matter in this case
and CHAIN executes it onchain for free???
who pays?
so the datdot chain would be a marketplace where people can requestRelaying
and others could discover and then take on that job
and every time a valid extrinsic properly signed by the author is submitted,
they get paid and the author or any supporter gets charged
constvaultAPI=require('datdot-vault')constserviceAPI=require('datdot-service')constchainAPI=require('datdot-substrate')// ------------// SUPPORTERconstsignature=sign(secretkey,nonce,hypercore_address)chainAPI.requestRelay(publickey,signature,hypercore_address)// ------------// RELAYERconst{account: { publickey, secretkey }, sign }=vaultAPI.account()chainAPI.offerRelay(publickey,functiononRelay(event){const{ address,author: {publickey: author_pkey}}=eventserviceAPI.followHypercore(address,functiononchunk(chunk){if(chainAPI.isValidExtrinsic(chunk)){const{ extrinsic, method }=chunkif(method==='wrap'){constsignature=sign(secretkey,nonce,extrinsic)chainAPI.submit(publickey,signature,extrinsic)// as AGENT// RELAYER needs to pay `transaction fee`// => RELAYERS get paid for doing it (incentivisation)// => BACKERS pay for it// => FRIENDS are RELAYERS who pay for it// => or COMPANY (thus not for free)}elseif(method==='author'){const{ signature, data }=extrinsicchainAPI.submit(author_pkey,signature,data)// as AUTHOR// AUTHOR needs to pay `transaction fee`// => RELAYERS get re-imbursed off-chain by AUTHOR or BACKER}elseif(method==='RELAYER'){const{ signature, data }=extrinsicchainAPI.submit(publickey,new_signature,data)// as RELAYER}})})// => datdot has fixed changing set of RELAYERS// => chain needs to verify the extrinsic based on the public key, because merkleroots don't help hereRANDOMRELAYERvs.CHOSENRELAYER=>RANDOMRELAYERgetspaidCHAINandCHAINgetspaidbyBACKERS=>CHOSENRELAYERdoesitforfreeorgetspaidbyBACKERSdirectly=>likee.g.offeraservicetoBACKERSandthenchosingoneselftodoitandgetpaid
so if some technique can be used so validators can author new blocks (=chunks in that case)
so if the entire code of the chain can be stored in a hyperdrive (=version controlled)
then a change to the code via Pull Request could be made
or a fork of the chains source code hyperdrive
...but that itself is all hypercores so the chain source code hypercores can be pinned by the chain
all this could be client code triggered by watching changes to hyperdrives or hypercores :-)
approach
we can have it mirrored in multiple hypercores, or each block producer could put blocks they produce in a hypercore signed by the same key they use for block production - we know who they are (the validator set) so we can join swarms for them everything else is already part of the chain, unless you are saying we should replace the chain db with hypercores entirely 😅
so the runtime code is already stored onchain - that would be included in storing/distributing blocks as part of hypercores but storing source in a hypercore as well would be really cool
erasure codes for more efficient hypercore duplication?
add smart contract like exchange and/or cross-chain connection standard, so other chains which implement it (e.g. other chains which use datdot (e.g. as a substrate pallet)) can connect and at the bare minimum, exchange ratio across chain and eventually take care of exchange rates and other things, so there is no need to go through a centralised service.
also support if chain B wants to send ratio from chain C to chain A
The text was updated successfully, but these errors were encountered:
@todo
.wellknown
ProposalDEP
.wellknown
Proposaldeclare "wants" for pinning in
.wellknown
extrinsics signed with authors dat secret key
command hypercores
CRDT consensus mechanism
TOWER IDEA
@IDEA:
hypercore
with somebody as theowner
)transaction hypercore
)data retrieval
USE CASE: retrieve data from a known hypercore onchain (e.g. to be used in a smart contract pallet)
command cores
SUBMITTING EXTRINSICS (for free) via HYPERCORES - upload info (dats)
USE CASE:
datdot
but publishesdat/hypercore
which ishosted/pinned
by datdotvalid extrinsic
to hypercore, which is then:parsed & executed on chain
registerFriends()
registerHypercore()
submitProofsForChallenge()
transferRatio()
...but without having to use anything but **the swarm** and **their pinners**
a dat folder as OUTBOX for commands connected to datdot instance
ALTERNATIVE
PEOPLE would just subscribe to CHAIN EVENTS
RELAYERS - way simpler than ppl subscribe to hypercores and register callbacks
EXECUTION
ofVALID CHUNK EXTRINSICS
)VALID EXTRINSICS
(e.g.
any call to runtime functions)USE CASE: especially cool if
smart contracts
existsubmit extrinsics for free via hypercores
0. a
PUBLISHER
publishes acommand hypercore
RELAYER
can monitor and submit foundvalid extrinsic chunks
RELAYER
gets paid fromBACKERS
CHAIN
figures out a hypercorechunk is valid
a proof
valid extrinsic
CHAIN
accepts it as an exstrinsicsigned by the authors pubkey
merkle roots
don't really matter in this caseCHAIN
executes it onchain for free???so the datdot chain would be a marketplace where people can
requestRelaying
and others could discover and then take on that job
and every time a valid extrinsic properly signed by the author is submitted,
they get paid and the author or any supporter gets charged
additional stuff:
service market
Every
market service
makes a separate service economyhosting service market
command RELAYER market
Because it is hard to compare "apples" to "oranges"
put
chain source
andblockchain
intohypercores
datdot allows
BACKERS
andSEEDERS
to keep thechain source
andblockchain
hosted.anyone can
seed
thechain source
andblockchain
themselves if they want to trust themselvesadding blocks to the chain might then need mechanisms like:
so if some technique can be used so validators can author new blocks (=chunks in that case)
so if the entire code of the chain can be stored in a hyperdrive (=version controlled)
then a change to the code via Pull Request could be made
or a fork of the chains source code hyperdrive
...but that itself is all
hypercores
so the chain source code hypercores can be pinned by the chainall this could be client code triggered by watching changes to hyperdrives or hypercores :-)
approach
erasure codes for more efficient hypercore duplication?
modules
theory
"IBC" protocol standard
add smart contract like exchange and/or cross-chain connection standard, so other chains which implement it (e.g. other chains which use
datdot
(e.g. as asubstrate pallet
)) can connect and at the bare minimum, exchangeratio
across chain and eventually take care of exchange rates and other things, so there is no need to go through a centralised service.chain B
wants to sendratio from chain C
tochain A
The text was updated successfully, but these errors were encountered: