Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
jlvandenhout committed Feb 20, 2024
1 parent ac5bd6a commit 87e06ce
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docs/build/isc/v1.0.0-rc.6/docs/how-tos/get-randomness-on-l2.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@ tags:

# Get Randomness on L2

In the ISC protocol, each validator proposes a batch of smart contract requests they would like to process next. They commit to their proposals with a signature, after which a common subset of requests is found and a combined signature is produced. This combined signature is unpredictable, and not only serves as protection against MEV by pseudo-randomly ordering requests, but also provides a source of verifiable entropy for randomness on L2.
ISC introduces a feature not found on many other smart contract protocols: randomness.

In the ISC protocol, for each state update each validator proposes a batch of smart contract requests they would like to process next. They commit to their proposals with a signature, after which a common subset of requests is found and a combined signature is produced.

This combined signature is unpredictable, and not only serves as protection against MEV by pseudo-randomly ordering requests, but also provides a source of verifiable entropy for randomness on L2.

This guide will show ways you can use this entropy to generate random values in your contracts.

:::info A note obout entropy
:::info A note about entropy

While entropy is random for each smart contract request, entropy is constant within a request. This means multiple calls to get entropy within the same request will return the same value.

Expand Down Expand Up @@ -103,7 +107,7 @@ And then cast the digest to an integer:
uint256 value = uint256(digest);
```

### Generating integers
### Generating bytes

Similarly to generating a random integer, you can generate any sequence of random bytes by taking the entropy and a unique nonce and hash them together:

Expand Down

0 comments on commit 87e06ce

Please sign in to comment.