mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-08 11:56:46 +01:00
Update Synchronizer (node) implementation
- node:
- Extend config to add initial variables of the smart contracts used as
defaults before they are changed via events.
- In stopped channels, set size 1 so that panics are not witheld until the
node stops completely.
- common:
- In Smart Contract variables, comment:
- `WDelayerVariables.HermezRollupAddress` because it's not needed.
- `RollupVariables.Buckets` because there are no events for it, and for
now it's not used.
- historydb:
- Add functions to get and set smart contract variables.
- db:
- Add `Rollback` function in `utils.go` to reduce boilerplate in sql
transaction rollbacks in defers in db functions.
- Update `rollup_vars` and `auction_vars` (renamed from `consensus_vars`)
table, and add `wdelayer_vars` table.
- synchronizer:
- Synchronize WDelayer
- Handle SC variables properly
- test/ethclient:
- Add essential implementation of WDelayer
This commit is contained in:
@@ -157,8 +157,9 @@ type Bucket struct {
|
||||
|
||||
// RollupVariables are the variables of the Rollup Smart Contract
|
||||
type RollupVariables struct {
|
||||
FeeAddToken *big.Int `json:"feeAddToken" meddler:"fee_addtoken"`
|
||||
ForgeL1L2BatchTimeout int64 `json:"forgeL1L2BatchTimeout" meddler:"forge_l1l2_timeout"`
|
||||
WithdrawalDelay uint64 `json:"withdrawalDelay" meddler:"withdrawal_delay"`
|
||||
Buckets [RollupConstNumBuckets]Bucket `json:"buckets" meddler:"buckets,json"`
|
||||
EthBlockNum int64 `json:"ethereumBlockNum" meddler:"eth_block_num"`
|
||||
FeeAddToken *big.Int `json:"feeAddToken" meddler:"fee_add_token,bigint" validate:"required"`
|
||||
ForgeL1L2BatchTimeout int64 `json:"forgeL1L2BatchTimeout" meddler:"forge_l1_timeout" validate:"required"`
|
||||
WithdrawalDelay uint64 `json:"withdrawalDelay" meddler:"withdrawal_delay" validate:"required"`
|
||||
// Buckets [RollupConstNumBuckets]Bucket `json:"buckets" meddler:"buckets,json"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user