Bitcoin relies on Proof of Work (hashing) to control the writing to a central repository (the blockchain). It also relies on a set of rules for these updates, and defines what happens if a conflict is found (longest chain wins)
Using that as an example for my question:
What are some architectural examples of different distributed lock and/or update mechanisms suitable for P2P networks? (I'm looking for descriptions of software design suitable to this project, not software products)
What key logic or rules are fundamental to that decentralized "database"?