<p>Hyperledger fabric works in the order of <strong>Execute Order and Validate</strong>.So Execution steps is done in <strong>Endorser</strong> so execution is done with endorsement policy which is defined and it also removes randomization to avoid statelessness. </p>

<p>Next the Ordering of transaction is done with the help of <strong>Orderer</strong>.</p>

<p>Finally Validation is done with the <strong>committer</strong> to avoid double spending.This is basically to check the integrity of the transaction.</p>

CC BY-SA 4.0
2018-10-30T07:56:36.500Z
Can you please give me some more resources, to read up on the topic?
Shocky2
CC BY-SA 4.0
2018-10-31T08:07:49.340Z
https://medium.com/swlh/hyperledger-chapter-6-hyperledger-fabric-components-technical-context-767985f605dd @Shocky2
Read the medium articles to get more insights on this
VforVendetta
CC BY-SA 4.0
2018-10-29T13:00:09.623Z
2018-10-29T13:00:09.623Z
VforVendetta
<p>Given that one can write chaincode in JavaScript or Go and freely call random methods provided by the language libraries, how does the network handle the randomness? </p>

<random><hyperledger>
How does hyperledger fabric handle random number generation?
Shocky2
# How does hyperledger fabric handle random number generation?

(Asked by: username_0 on 2018-09-03)

Given that one can write chaincode in JavaScript or Go and freely call random methods provided by the language libraries, how does the network handle the randomness?

**Tags:** random, hyperledger


---

## 1 answers

### Answer by username_1 on 2018-10-29. Score: 1

Hyperledger fabric works in the order of **Execute Order and Validate**.So Execution steps is done in **Endorser** so execution is done with endorsement policy which is defined and it also removes randomization to avoid statelessness.

Next the Ordering of transaction is done with the help of **Orderer**.

Finally Validation is done with the **committer** to avoid double spending.This is basically to check the integrity of the transaction.

> **Comments:**
> **username_0**: Can you please give me some more resources, to read up on the topic?  
> **username_1**: https://medium.com/swlh/hyperledger-chapter-6-hyperledger-fabric-components-technical-context-767985f605dd @username_0 Read the medium articles to get more insights on this  

---

