datdotorg / datdot-node-rust

datdot blockchain node in rust
https://playproject.io/datdot-node-rust
GNU General Public License v3.0
48 stars 9 forks source link

Basic Calls Flow #11

Closed ninabreznik closed 4 years ago

ninabreznik commented 4 years ago

(Current Runtime as of 24/12/19) Source code: https://github.com/playproject-io/datdot-substrate/blob/master/bin/node/runtime/src/dat_verify.rs

State:

No Seeders, No registered Dats

As a Dat publisher: call register_data to register the current state of your archive on-chain. As a seeder: call register_seeder to register your intention to seed a dat. watch for the NewPin event, which will tell you which dat archive you should be pinning. You can also query UsersStorage(AccountId) to see all dats you should be pinning simultaneously. Every Block after there are registered seeders with Pinned dats, a Challenge event will be emitted by the chain.

State:

Seeder and Dat registered successfully

As a Dat publisher: no action required. As a seeder: watch for Challenge events to your AccountId