orbitdb / field-manual

The Offical User's Guide to OrbitDB
208 stars 43 forks source link

Replication conditions #70

Open nezzard opened 5 years ago

nezzard commented 5 years ago

Hi, is there any possibilities for make conditions for accepting new entry?

For example if(newEntry != true) { return false } ellse { addNewEntry }

The main idea is, if new entry has incorrect signature, then don't add entry to own copy of public db

m00nwtchr commented 5 years ago

if the db is public you can do something even better: Prevent tampering by fixing/removing the entry. this won't work if your database is a EventStore but it should work in the case of all the others. you can do your checks in the replicated event: https://github.com/orbitdb/orbit-db/blob/master/API.md#replicated

nezzard commented 5 years ago

checks in the replicated event

It's ok, but, how to prevent adding entry inside replicate event? Can i break this entry? If yes how? And after that, will db continue replication?

Or i need to remove wrong entry after replication?

aphelionz commented 4 years ago

Moving this to the Field Manual so we can go into more detail