Skip to content

Commit

Permalink
improve clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
sanity committed Mar 8, 2024
1 parent 8ac4113 commit 7d173b8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions docs/src/components/contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ new state that integrates both. This process ensures the eventual consistency of
contract states in Freenet, a concept similar to [Conflict-free Replicated Data
Types](https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type).

In the language of mathematics, the contract defines a commutative monoid on the
contract's state. For example, if the contract's state is a single number, then
the contract could define the merging of two states as the sum of the two
numbers. However, these basic operations are too simple on their own but can be
combined with others to support the merging of more complex states.
As a very simple example, if the contract's state is a single number, then the
contract could define the merging of two states as the maximum of the two numbers.

In mathematical jargon, a contract defines a [commutative monoid](https://mathworld.wolfram.com/CommutativeMonoid.html) on the contract's state - but you can ignore this if you're not a mathematician.

#### Efficient State Synchronization

Expand Down

0 comments on commit 7d173b8

Please sign in to comment.