Skip to content

Commit 7614a70

Browse files
authored
Update running.md
1 parent af545f4 commit 7614a70

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/running.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ The console can be used to calculate the storage key, in this case for vote key
9696
> web3.sha3(key, {"encoding": "hex"})
9797
"0x29ecdbdf95c7f6ceec92d6150c697aa14abeb0f8595dd58d808842ea237d8494"
9898
```
99+
From the above example, the `<256 bit aligned key value>` is the ethereum account address that should be added to the voting map, ed9d02e382b34818e88b88a309c7fe71e65f419d, padded to 256bits. The `<256 bit variable index>` is the index(3) of the canVote mapping in the solidity [voting smart contract](https://github.com/jpmorganchase/quorum/blob/master/core/quorum/block_voting.sol#L42) padded to 256bits. The index is calculated based on the location of canVote:
100+
101+
* Period[] periods --> index 0
102+
* uint public voteThreshold --> index 1
103+
* uint public voterCount --> index 2
104+
* mapping(address => bool) public canVote --> index 3
99105

100106
The `genesis.json` file can be found in the `7nodes` folder in the `quorum-examples` repository.
101107

0 commit comments

Comments
 (0)