You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `RootHash` is calculated as a Merkle hash of Bor block hashes from `StartBlock` to `EndBlock`. The process involves hashing each block's number, time, transaction hash, and receipt hash, then creating a Merkle root of these hashes.
38
38
@@ -83,44 +83,41 @@ rootHash := tree.Root().Hash
83
83
`AccountRootHash` is the hash of the validator account-related information that needs to pass to the Ethereum chain at each checkpoint.
Golang code for the account hash can be found here: [https://github.com/maticnetwork/heimdall/blob/develop/types/dividend-account.go#L91-L101](https://github.com/maticnetwork/heimdall/blob/develop/types/dividend-account.go#L91-L101)
103
+
Golang code for the account hash can be found here: [https://github.com/maticnetwork/heimdall/blob/develop/types/dividend-account.go](https://github.com/maticnetwork/heimdall/blob/develop/types/dividend-account.go)
104
104
105
105
```go
106
-
// DividendAccount contains Fee, Slashed amount
106
+
// DividendAccount contains burned Fee amount
107
107
type DividendAccount struct {
108
-
ID DividendAccountID `json:"ID"`
109
-
FeeAmount string `json:"feeAmount"` // string representation of big.Int
110
-
SlashedAmount string `json:"slashedAmount"` // string representation of big.Int
108
+
User HeimdallAddress `json:"user"`
109
+
FeeAmount string `json:"feeAmount"` // string representation of big.Int
111
110
}
112
111
113
-
// calculate hash for particular account
112
+
// CalculateHash hashes the values of a DividendAccount
Copy file name to clipboardExpand all lines: docs/pos/reference/contracts/stakingmanager.md
+3-11Lines changed: 3 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,20 +25,14 @@ PIP4 introduced the concept of showcasing validator performance for community vi
25
25
26
26
## Methods and variables
27
27
28
-
!!!caution
29
-
Slashing Implementation
30
-
31
-
`jail`, `unJail`, and `slash` functions are not used currently as part of the slashing implementation.
32
-
33
-
34
28
### validatorThreshold
35
29
36
30
It stores the maximum number of validators accepted by the system, also called slots.
37
31
38
32
### AccountStateRoot
39
33
40
34
- For various accounting done on Heimdall for validators and delegator, account root is submitted while submitting the `checkpoint`.
41
-
- accRoot is used while `claimRewards` and `unStakeClaim`.
35
+
-`accRoot` is used while `claimRewards` and `unStakeClaim`.
42
36
43
37
### stake / stakeFor
44
38
@@ -76,9 +70,7 @@ function stakeFor(
76
70
```solidity
77
71
function unstakeClaim(uint256 validatorId) public;
78
72
```
79
-
80
-
- After `unstaking`, validators are put into withdrawal period so that they can be slashed, if any fraud found after `unstaking`, for past frauds.
81
-
- Once `WITHDRAWAL_DELAY` period is served, validators can call this function and do settlement with `stakeManager` (get rewards if any, get staked tokens back, burn NFT, etc).
73
+
Once `WITHDRAWAL_DELAY` period is served, validators can call this function and do settlement with `stakeManager` (get rewards if any, get staked tokens back, burn NFT, etc).
82
74
83
75
### restake
84
76
@@ -127,7 +119,7 @@ function claimFee(
127
119
128
120
This method is used to withdraw fees from Heimdall. `accountStateRoot` is updated on each checkpoint, so that validators can provide proof of inclusion in this root for account on Heimdall and withdraw fee.
129
121
130
-
Note that `accountStateRoot` is re-written to prevent exits on multiple checkpoints (for old root and save accounting on `stakeManager`).`accumSlashedAmount` is unused at the moment and will be used for slashing on Heimdall if needed.
122
+
Note that `accountStateRoot` is re-written to prevent exits on multiple checkpoints (for old root and save accounting on `stakeManager`).
0 commit comments