From 667cccb8ee16a16fc413a09755907661ebfe6819 Mon Sep 17 00:00:00 2001 From: piersy Date: Tue, 22 Nov 2022 18:08:07 +0000 Subject: [PATCH 01/18] Piersy/revert downloader and snap sync changes (#1980) * Revert "Enable Snap Sync (#1962)" This reverts commit 7019852b3aae8a59eeb9d5fff86a8f6e3396c511. * Revert "Refactor downloader (#1958)" This reverts commit 81d037facae92afb47b169de96805ecd7c2deec0. --- cmd/utils/flags.go | 22 ++- eth/backend.go | 5 +- eth/downloader/downloader.go | 287 +++++++++++++++++------------ eth/downloader/downloader_test.go | 77 +++----- eth/downloader/modes.go | 20 +-- eth/peerset.go | 10 +- les/downloader/downloader.go | 290 ++++++++++++++++++------------ les/downloader/downloader_test.go | 77 +++----- les/downloader/modes.go | 24 +-- 9 files changed, 435 insertions(+), 377 deletions(-) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 03082e1a49..1fc747c940 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -191,9 +191,10 @@ var ( Value: 0, } defaultSyncMode = ethconfig.Defaults.SyncMode - SyncModeFlag = TextMarshalerFlag{ + // TODO: Check if snap sync is enabled + SyncModeFlag = TextMarshalerFlag{ Name: "syncmode", - Usage: `Blockchain sync mode ("fast", "full", "snap", "light", or "lightest")`, + Usage: `Blockchain sync mode ("fast", "full", "light", or "lightest")`, Value: &defaultSyncMode, } GCModeFlag = cli.StringFlag{ @@ -1732,13 +1733,16 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) { cfg.SnapshotCache = ctx.GlobalInt(CacheFlag.Name) * ctx.GlobalInt(CacheSnapshotFlag.Name) / 100 } if !ctx.GlobalBool(SnapshotFlag.Name) { - // If snap-sync is requested, this flag is also required - if cfg.SyncMode == downloader.SnapSync { - log.Info("Snap sync requested, enabling --snapshot") - } else { - cfg.TrieCleanCache += cfg.SnapshotCache - cfg.SnapshotCache = 0 // Disabled - } + // Snap Dync Disabled. See https://github.com/celo-org/celo-blockchain/issues/1735 + // // If snap-sync is requested, this flag is also required + // if cfg.SyncMode == downloader.SnapSync { + // log.Info("Snap sync requested, enabling --snapshot") + // } else { + // cfg.TrieCleanCache += cfg.SnapshotCache + // cfg.SnapshotCache = 0 // Disabled + // } + cfg.TrieCleanCache += cfg.SnapshotCache + cfg.SnapshotCache = 0 // Disabled } if ctx.GlobalIsSet(DocRootFlag.Name) { cfg.DocRoot = ctx.GlobalString(DocRootFlag.Name) diff --git a/eth/backend.go b/eth/backend.go index 799bc8b040..0aa5924502 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -43,7 +43,8 @@ import ( "github.com/celo-org/celo-blockchain/eth/ethconfig" "github.com/celo-org/celo-blockchain/eth/filters" "github.com/celo-org/celo-blockchain/eth/protocols/eth" - "github.com/celo-org/celo-blockchain/eth/protocols/snap" + + // "github.com/celo-org/celo-blockchain/eth/protocols/snap" "github.com/celo-org/celo-blockchain/ethdb" "github.com/celo-org/celo-blockchain/event" "github.com/celo-org/celo-blockchain/internal/ethapi" @@ -566,7 +567,7 @@ func (s *Ethereum) BloomIndexer() *core.ChainIndexer { return s.bloomIndexer func (s *Ethereum) Protocols() []p2p.Protocol { protos := eth.MakeProtocols((*ethHandler)(s.handler), s.networkID, s.ethDialCandidates) if s.config.SnapshotCache > 0 { - protos = append(protos, snap.MakeProtocols((*snapHandler)(s.handler), s.snapDialCandidates)...) + // protos = append(protos, snap.MakeProtocols((*snapHandler)(s.handler), s.snapDialCandidates)...) } return protos } diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index 7215d92fa3..53a738d7c3 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -49,7 +49,7 @@ var ( MaxReceiptFetch = 256 // Amount of transaction receipts to allow fetching per request MaxStateFetch = 384 // Amount of node state values to allow fetching per request - maxQueuedHeaders = 32 * 1024 // [celo/63|eth/62] Maximum number of headers to queue for import (DOS protection) + maxQueuedHeaders = 32 * 1024 // [eth/62] Maximum number of headers to queue for import (DOS protection) maxHeadersProcess = 2048 // Number of header download results to import at once into the chain maxResultsProcess = 2048 // Number of content download results to import at once into the chain fullMaxForkAncestry uint64 = params.FullImmutabilityThreshold // Maximum chain reorganisation (locally redeclared so tests can reduce it) @@ -58,11 +58,11 @@ var ( reorgProtThreshold = 48 // Threshold number of recent blocks to disable mini reorg protection reorgProtHeaderDelay = 2 // Number of headers to delay delivering to cover mini reorgs - fsHeaderCheckFrequency = 100 // Verification frequency of the downloaded headers during fast sync - fsHeaderSafetyNet = 2048 // Number of headers to discard in case a chain violation is detected - fsHeaderForceVerify = 24 // Number of headers to verify before and after the pivot to accept it - fsHeaderContCheck = 3 * time.Second // Time interval to check for header continuations during state download - fsMinFullBlocks = 64 // Number of blocks to retrieve fully even in fast sync + fsHeaderCheckFrequency = 100 // Verification frequency of the downloaded headers during fast sync + fsHeaderSafetyNet = 2048 // Number of headers to discard in case a chain violation is detected + fsHeaderForceVerify = 24 // Number of headers to verify before and after the pivot to accept it + fsHeaderContCheck = 3 * time.Second // Time interval to check for header continuations during state download + fsMinFullBlocks uint64 = 64 // Number of blocks to retrieve fully even in fast sync ) var ( @@ -149,7 +149,7 @@ type Downloader struct { quitCh chan struct{} // Quit channel to signal termination quitLock sync.Mutex // Lock to prevent double closes - epochSize uint64 // EpochSize value is useful in IBFT consensus + epoch uint64 // Epoch value is useful in IBFT consensus ibftConsensus bool // True if we are in IBFT consensus mode // Testing hooks @@ -167,6 +167,9 @@ type LightChain interface { // GetHeaderByHash retrieves a header from the local chain. GetHeaderByHash(common.Hash) *types.Header + // GetHeaderByHash retrieves a header from the local chain by number. + GetHeaderByNumber(uint64) *types.Header + // CurrentHeader retrieves the head header from the local chain. CurrentHeader() *types.Header @@ -176,9 +179,7 @@ type LightChain interface { // InsertHeaderChain inserts a batch of headers into the local chain. InsertHeaderChain([]*types.Header, int, bool) (int, error) - // Config returns the chain config Config() *params.ChainConfig - // SetHead rewinds the local chain to a new head. SetHead(uint64) error } @@ -211,10 +212,15 @@ type BlockChain interface { // InsertReceiptChain inserts a batch of receipts into the local chain. InsertReceiptChain(types.Blocks, []types.Receipts, uint64) (int, error) + // GetBlockByNumber retrieves a block from the database by number. + GetBlockByNumber(uint64) *types.Block + // Snapshots returns the blockchain snapshot tree to paused it during sync. Snapshots() *snapshot.Tree } +// TODO(tim) previously passing mode here! + // New creates a new downloader to fetch hashes and blocks from remote peers. func New(checkpoint uint64, stateDb ethdb.Database, stateBloom *trie.SyncBloom, mux *event.TypeMux, chain BlockChain, lightchain LightChain, dropPeer peerDropFn) *Downloader { if lightchain == nil { @@ -222,16 +228,16 @@ func New(checkpoint uint64, stateDb ethdb.Database, stateBloom *trie.SyncBloom, } ibftConsensus := false - epochSize := uint64(0) + epoch := uint64(0) if chain != nil && chain.Config() != nil && chain.Config().Istanbul != nil { - epochSize = chain.Config().Istanbul.Epoch + epoch = chain.Config().Istanbul.Epoch ibftConsensus = true } else if lightchain != nil && lightchain.Config() != nil && lightchain.Config().Istanbul != nil { - epochSize = lightchain.Config().Istanbul.Epoch + epoch = lightchain.Config().Istanbul.Epoch ibftConsensus = true } - if epochSize > math.MaxInt32 { - panic(fmt.Sprintf("epochSize is too big(%d), the code to fetch epoch headers casts epochSize to an int to calculate value for skip variable", epochSize)) + if epoch > math.MaxInt32 { + panic(fmt.Sprintf("epoch is too big(%d), the code to fetch epoch headers casts epoch to an int to calculate value for skip variable", epoch)) } dl := &Downloader{ @@ -259,7 +265,7 @@ func New(checkpoint uint64, stateDb ethdb.Database, stateBloom *trie.SyncBloom, }, trackStateReq: make(chan *stateReq), ibftConsensus: ibftConsensus, - epochSize: epochSize, + epoch: epoch, } go dl.stateFetcher() return dl @@ -515,16 +521,14 @@ func (d *Downloader) syncWithPeer(p *peerConnection, hash common.Hash, td *big.I // Ensure our origin point is below any fast sync pivot point if mode == FastSync { - if height <= uint64(fsMinFullBlocks) { + pivotNumber := pivot.Number.Uint64() + // Write out the pivot into the database so a rollback beyond it will + // reenable fast sync + rawdb.WriteLastPivotNumber(d.stateDB, pivotNumber) + if pivotNumber == 0 { origin = 0 - } else { - pivotNumber := pivot.Number.Uint64() - if pivotNumber <= origin { - origin = pivotNumber - 1 - } - // Write out the pivot into the database so a rollback beyond it will - // reenable fast sync - rawdb.WriteLastPivotNumber(d.stateDB, pivotNumber) + } else if pivotNumber <= origin { + origin = pivotNumber - 1 } } d.committed = 1 @@ -675,12 +679,18 @@ func (d *Downloader) fetchHead(p *peerConnection) (head *types.Header, pivot *ty mode := d.getMode() // Request the advertised remote head block and wait for the response - latest, _ := p.peer.Head() + latest, td := p.peer.Head() fetch := 1 if mode == FastSync { fetch = 2 // head + pivot headers } - go p.peer.RequestHeadersByHash(latest, fetch, fsMinFullBlocks-1, true) + height := td.Uint64() - 1 // height == TD - 1 + beginningEpochBlockNumber := d.calcPivot(height) + // NOTE: the beginningEpochBlockNumber is subtracting fsMinFullBlocks to the height, + // so, height and beginningEpochBlockNumber will be the same ONLY if the head is the genesis block + blocksFromHeightToEpochBlock := height - beginningEpochBlockNumber + + go p.peer.RequestHeadersByHash(latest, fetch, int(blocksFromHeightToEpochBlock-1), true) ttl := d.peers.rates.TargetTimeout() timeout := time.After(ttl) @@ -708,7 +718,7 @@ func (d *Downloader) fetchHead(p *peerConnection) (head *types.Header, pivot *ty return nil, nil, fmt.Errorf("%w: remote head %d below checkpoint %d", errUnsyncedPeer, head.Number, d.checkpoint) } if len(headers) == 1 { - if mode == FastSync && head.Number.Uint64() > uint64(fsMinFullBlocks) { + if mode == FastSync && head.Number.Uint64() > blocksFromHeightToEpochBlock { return nil, nil, fmt.Errorf("%w: no pivot included along head header", errBadPeer) } p.log.Debug("Remote head identified, no pivot", "number", head.Number, "hash", head.Hash()) @@ -717,8 +727,8 @@ func (d *Downloader) fetchHead(p *peerConnection) (head *types.Header, pivot *ty // At this point we have 2 headers in total and the first is the // validated head of the chain. Check the pivot number and return, pivot := headers[1] - if pivot.Number.Uint64() != head.Number.Uint64()-uint64(fsMinFullBlocks) { - return nil, nil, fmt.Errorf("%w: remote pivot %d != requested %d", errInvalidChain, pivot.Number, head.Number.Uint64()-uint64(fsMinFullBlocks)) + if pivot.Number.Uint64() != beginningEpochBlockNumber { + return nil, nil, fmt.Errorf("%w: remote pivot %d != requested %d", errInvalidChain, pivot.Number, beginningEpochBlockNumber) } return head, pivot, nil @@ -817,6 +827,9 @@ func (d *Downloader) findAncestor(p *peerConnection, remoteHeader *types.Header) // We're above the max reorg threshold, find the earliest fork point floor = int64(localHeight - maxForkAncestry) } + + // TODO(tim) TODO(ashishb) see https://github.com/celo-org/celo-blockchain/commit/6c312a24b6041385c33eca066ff5604af315a41e + // If we're doing a light sync, ensure the floor doesn't go below the CHT, as // all headers before that point will be missing. if !mode.SyncFullBlockChain() { @@ -1023,46 +1036,6 @@ func (d *Downloader) findAncestorBinarySearch(p *peerConnection, mode SyncMode, return start, nil } -func getEpochHeaders(fromEpochBlock uint64, epochSize uint64, p *peerConnection) { - if fromEpochBlock%epochSize != 0 { - panic(fmt.Sprintf( - "Logic error: getEpochHeaders received a request to fetch non-epoch block %d with epochSize %d", - fromEpochBlock, epochSize)) - } - - // if epochSize is 100 and we fetch from=1000 and skip=100 then we will get - // 1000, 1101, 1202, 1303 ... - // So, skip has to be epochSize - 1 to get the right set of blocks. - skip := int(epochSize - 1) - count := MaxEpochHeaderFetch - log.Trace("getEpochHeaders", "from", fromEpochBlock, "count", count, "skip", skip) - p.log.Trace("Fetching full headers", "count", count, "from", fromEpochBlock) - go p.peer.RequestHeadersByNumber(fromEpochBlock, count, skip, false) -} - -func getNormalHeaders(from uint64, skeleton bool, p *peerConnection) { - if skeleton { - p.log.Trace("Fetching skeleton headers", "count", MaxHeaderFetch, "from", from) - go p.peer.RequestHeadersByNumber(from+uint64(MaxHeaderFetch)-1, MaxSkeletonSize, MaxHeaderFetch-1, false) - } else { - p.log.Trace("Fetching full headers", "count", MaxHeaderFetch, "from", from) - go p.peer.RequestHeadersByNumber(from, MaxHeaderFetch, 0, false) - } -} - -func getEpochOrNormalHeaders(from uint64, epochSize uint64, height uint64, skeleton bool, p *peerConnection) { - // Download the epoch headers including and beyond the current head. - nextEpochBlock := (from-1)/epochSize*epochSize + epochSize - // If we're still not synced up to the latest epoch, sync only epoch headers. - // Otherwise, sync block headers as we would normally in light sync. - log.Trace("Getting headers in lightest sync mode", "from", from, "height", height, "nextEpochBlock", nextEpochBlock, "epochSize", epochSize) - if nextEpochBlock < height { - getEpochHeaders(nextEpochBlock, epochSize, p) - } else if from <= height { - getNormalHeaders(height, skeleton, p) - } -} - // fetchHeaders keeps retrieving headers concurrently from the number // requested, until no more are returned, potentially throttling on the way. To // facilitate concurrency but still protect against malicious nodes sending bad @@ -1083,48 +1056,103 @@ func (d *Downloader) fetchHeaders(p *peerConnection, from uint64, height uint64) timeout := time.NewTimer(0) // timer to dump a non-responsive active peer <-timeout.C // timeout channel should be initially empty defer timeout.Stop() - epochSize := d.epochSize + epoch := d.epoch var ttl time.Duration - mode := d.getMode() - getHeaders := func(from uint64) { request = time.Now() ttl = d.peers.rates.TargetTimeout() timeout.Reset(ttl) - if mode != LightestSync { - getNormalHeaders(from, skeleton, p) + + if skeleton { + p.log.Trace("Fetching skeleton headers", "count", MaxHeaderFetch, "from", from) + go p.peer.RequestHeadersByNumber(from+uint64(MaxHeaderFetch)-1, MaxSkeletonSize, MaxHeaderFetch-1, false) } else { - getEpochOrNormalHeaders(from, epochSize, height, skeleton, p) + count := MaxHeaderFetch + skip := 0 + p.log.Trace("Fetching full headers", "count", count, "from", from) + go p.peer.RequestHeadersByNumber(from, MaxHeaderFetch, skip, false) } } - getNextPivot := func() { - pivoting = true + mode := d.getMode() + getEpochHeaders := func(fromEpochBlock uint64) { + if mode != LightestSync { + panic("This method should be called only in LightestSync mode") + } + if fromEpochBlock%epoch != 0 { + panic(fmt.Sprintf( + "Logic error: getEpochHeaders received a request to fetch non-epoch block %d with epoch %d", + fromEpochBlock, epoch)) + } + request = time.Now() ttl = d.peers.rates.TargetTimeout() timeout.Reset(ttl) - d.pivotLock.RLock() - pivot := d.pivotHeader.Number.Uint64() - d.pivotLock.RUnlock() - - p.log.Trace("Fetching next pivot header", "number", pivot+uint64(fsMinFullBlocks)) - go p.peer.RequestHeadersByNumber(pivot+uint64(fsMinFullBlocks), 2, fsMinFullBlocks-9, false) // move +64 when it's 2x64-8 deep + // if epoch is 100 and we fetch from=1000 and skip=100 then we will get + // 1000, 1101, 1202, 1303 ... + // So, skip has to be epoch - 1 to get the right set of blocks. + skip := int(epoch - 1) + count := MaxEpochHeaderFetch + log.Trace("getEpochHeaders", "from", fromEpochBlock, "count", count, "skip", skip) + p.log.Trace("Fetching full headers", "count", count, "from", fromEpochBlock) + go p.peer.RequestHeadersByNumber(fromEpochBlock, count, skip, false) + } + + // Returns true if a header(s) fetch request was made, false if the syncing is finished. + getEpochOrNormalHeaders := func(from uint64) bool { + // Download the epoch headers including and beyond the current head. + nextEpochBlock := (from-1)/epoch*epoch + epoch + // If we're still not synced up to the latest epoch, sync only epoch headers. + // Otherwise, sync block headers as we would normally in light sync. + log.Trace("Getting headers in lightest sync mode", "from", from, "height", height, "nextEpochBlock", nextEpochBlock, "epoch", epoch) + if nextEpochBlock < height { + getEpochHeaders(nextEpochBlock) + return true + } else if from <= height { + getHeaders(height) + return true + } else { + // During repeated invocations, "from" can be more than height since the blocks could have + // created after this method was invoked and in that case, the from which is one beyond the + // last fetched header number can be more than the height. + // If we have already fetched a block header >= height block header then we declare that the sync + // is finished and stop. + return false + } } + // TODO(ponti): Re add the "moving" pivot, after changing the way we calculate the uptimeScore + // getNextPivot := func() { + // pivoting = true + // request = time.Now() + + // ttl = d.requestTTL() + // timeout.Reset(ttl) + + // d.pivotLock.RLock() + // pivot := d.pivotHeader.Number.Uint64() + // d.pivotLock.RUnlock() + + // p.log.Trace("Fetching next pivot header", "number", pivot+fsMinFullBlocks) + // go p.peer.RequestHeadersByNumber(pivot+fsMinFullBlocks, 2, int(fsMinFullBlocks-9), false) // move +64 when it's 2x64-8 deep + // } // Start pulling the header chain skeleton until all is done ancestor := from if mode == LightestSync { - if epochSize == 0 { - panic("EpochSize cannot be 0 in IBFT + LightestSync") + if epoch == 0 { + panic("Epoch cannot be 0 in IBFT + LightestSync") } // Don't fetch skeleton, only fetch the headers. skeleton = false + getEpochOrNormalHeaders(from) + } else { + log.Trace("getHeaders#initialHeaderDownload", "from", from) + getHeaders(from) } - getHeaders(from) for { select { @@ -1154,11 +1182,11 @@ func (d *Downloader) fetchHeaders(p *peerConnection, from uint64, height uint64) // Retrieve the headers and do some sanity checks, just in case headers := packet.(*headerPack).headers - if have, want := headers[0].Number.Uint64(), pivot+uint64(fsMinFullBlocks); have != want { + if have, want := headers[0].Number.Uint64(), pivot+fsMinFullBlocks; have != want { log.Warn("Peer sent invalid next pivot", "have", have, "want", want) return fmt.Errorf("%w: next pivot number %d != requested %d", errInvalidChain, have, want) } - if have, want := headers[1].Number.Uint64(), pivot+2*uint64(fsMinFullBlocks)-8; have != want { + if have, want := headers[1].Number.Uint64(), pivot+2*fsMinFullBlocks-8; have != want { log.Warn("Peer sent invalid pivot confirmer", "have", have, "want", want) return fmt.Errorf("%w: next pivot confirmer number %d != requested %d", errInvalidChain, have, want) } @@ -1263,17 +1291,11 @@ func (d *Downloader) fetchHeaders(p *peerConnection, from uint64, height uint64) return errCanceled } // In all other sync modes, we fetch the block immediately after the current block. - // In the lightest sync mode, increment the value by epochSize instead. + // In the lightest sync mode, increment the value by epoch instead. if mode == LightestSync { lastFetchedHeaderNumber := headers[len(headers)-1].Number.Uint64() - if lastFetchedHeaderNumber+1 <= height { - getHeaders(lastFetchedHeaderNumber + 1) - } else { - // During repeated invocations, "from" can be more than height since the blocks could have - // created after this method was invoked and in that case, the from which is one beyond the - // last fetched header number can be more than the height. - // If we have already fetched a block header >= height block header then we declare that the sync - // is finished and stop. + moreHeaderFetchesPending := getEpochOrNormalHeaders(lastFetchedHeaderNumber + 1) + if !moreHeaderFetchesPending { p.log.Debug("No more headers available") select { case d.headerProcCh <- nil: @@ -1287,18 +1309,24 @@ func (d *Downloader) fetchHeaders(p *peerConnection, from uint64, height uint64) log.Trace("getHeaders#downloadMoreHeaders", "from", from) // If we're still skeleton filling fast sync, check pivot staleness // before continuing to the next skeleton filling - if skeleton && pivot > 0 { - getNextPivot() - } else { - getHeaders(from) - } + + // TODO(ponti): Re add the "moving" pivot, after changing the way we calculate the uptimeScore + // if skeleton && pivot > 0 { + // getNextPivot() + // } else { + getHeaders(from) + // } } } else { // No headers delivered, or all of them being delayed, sleep a bit and retry p.log.Trace("All headers delayed, waiting") select { case <-time.After(fsHeaderContCheck): - getHeaders(from) + if mode == LightestSync { + getEpochOrNormalHeaders(from) + } else { + getHeaders(from) + } continue case <-d.cancelCh: return errCanceled @@ -1695,7 +1723,7 @@ func (d *Downloader) processHeaders(origin uint64, td *big.Int) error { // This check cannot be executed "as is" for full imports, since blocks may still be // queued for processing when the header download completes. However, as long as the // peer gave us something useful, we're already happy/progressed (above check). - if mode == FastSync || !mode.SyncFullBlockChain() { + if mode == FastSync || mode == LightSync { head := d.lightchain.CurrentHeader() if td.Cmp(d.lightchain.GetTd(head.Hash(), head.Number.Uint64())) > 0 { rollbackErr = errStallingPeer @@ -1849,6 +1877,42 @@ func (d *Downloader) importBlockResults(results []*fetchResult) error { return nil } +func max(a uint64, b uint64) uint64 { + if a < b { + return b + } + return a +} + +func computePivot(height uint64, epochSize uint64) uint64 { + if height <= fsMinFullBlocks { + return 0 + } + target := height - fsMinFullBlocks + targetEpoch := istanbul.GetEpochNumber(target, epochSize) + + // if target is on first epoch start on genesis + if targetEpoch <= 1 { + return 0 + } + + // else start on first block of the epoch + pivot, _ := istanbul.GetEpochFirstBlockNumber(targetEpoch, epochSize) + return pivot + +} + +func (d *Downloader) calcPivot(height uint64) uint64 { + // If epoch is not set (not IBFT) use old logic + if d.epoch == 0 { + if fsMinFullBlocks > height { + return 0 + } + return height - fsMinFullBlocks + } + return computePivot(height, d.epoch) +} + // processFastSyncContent takes fetch results from the queue and writes them to the // database. It also controls the synchronisation of state nodes of the pivot block. func (d *Downloader) processFastSyncContent() error { @@ -1923,22 +1987,17 @@ func (d *Downloader) processFastSyncContent() error { // Note, we have `reorgProtHeaderDelay` number of blocks withheld, Those // need to be taken into account, otherwise we're detecting the pivot move // late and will drop peers due to unavailable state!!! - // BUT we are not expecting chain reorgs in IBFT (so we could assume it as zero) - headerDelay := reorgProtHeaderDelay - if d.ibftConsensus { - headerDelay = 0 - } - if height := latest.Number.Uint64(); height > pivot.Number.Uint64()+2*uint64(fsMinFullBlocks)-uint64(headerDelay) { - log.Warn("Pivot became stale, moving", "old", pivot.Number.Uint64(), "new", height-uint64(fsMinFullBlocks)+uint64(headerDelay)) - pivot = results[len(results)-1-fsMinFullBlocks+headerDelay].Header // must exist as lower old pivot is uncommitted + if height := latest.Number.Uint64(); height > pivot.Number.Uint64()+2*max(d.epoch, fsMinFullBlocks)-uint64(reorgProtHeaderDelay) { + newPivot := d.calcPivot(height) + log.Warn("Pivot became stale, moving", "old", pivot, "new", newPivot) + pivot = d.lightchain.GetHeaderByNumber(newPivot) d.pivotLock.Lock() d.pivotHeader = pivot d.pivotLock.Unlock() - // Write out the pivot into the database so a rollback beyond it will // reenable fast sync - rawdb.WriteLastPivotNumber(d.stateDB, pivot.Number.Uint64()) + rawdb.WriteLastPivotNumber(d.stateDB, newPivot) } } P, beforeP, afterP := splitAroundPivot(pivot.Number.Uint64(), results) diff --git a/eth/downloader/downloader_test.go b/eth/downloader/downloader_test.go index a7a21ab0aa..2515ea8068 100644 --- a/eth/downloader/downloader_test.go +++ b/eth/downloader/downloader_test.go @@ -921,58 +921,6 @@ func testMultiProtoSync(t *testing.T, protocol uint, mode SyncMode) { } } -// Tests that if a block is empty (e.g. header only), no body request should be -// made, and instead the header should be assembled into a whole block in itself. -func TestEmptyShortCircuit67Full(t *testing.T) { testEmptyShortCircuit(t, istanbul.Celo67, FullSync) } -func TestEmptyShortCircuit67Fast(t *testing.T) { testEmptyShortCircuit(t, istanbul.Celo67, FastSync) } -func TestEmptyShortCircuit67Light(t *testing.T) { testEmptyShortCircuit(t, istanbul.Celo67, LightSync) } - -func testEmptyShortCircuit(t *testing.T, protocol uint, mode SyncMode) { - t.Parallel() - - tester := newTester() - defer tester.terminate() - - // Create a block chain to download - chain := testChainBase - tester.newPeer("peer", protocol, chain) - - // Instrument the downloader to signal body requests - bodiesHave, receiptsHave := int32(0), int32(0) - tester.downloader.bodyFetchHook = func(headers []*types.Header) { - atomic.AddInt32(&bodiesHave, int32(len(headers))) - } - tester.downloader.receiptFetchHook = func(headers []*types.Header) { - atomic.AddInt32(&receiptsHave, int32(len(headers))) - } - // Synchronise with the peer and make sure all blocks were retrieved - if err := tester.sync("peer", nil, mode); err != nil { - t.Fatalf("failed to synchronise blocks: %v", err) - } - assertOwnChain(t, tester, chain.len()) - - // Validate the number of block bodies that should have been requested - bodiesNeeded, receiptsNeeded := 0, 0 - for _, block := range chain.blockm { - // As we save info in every block (as for example, randomness), we will - // never have empty blocks - if mode != LightSync && block != tester.genesis { - bodiesNeeded++ - } - } - for _, receipt := range chain.receiptm { - if mode == FastSync && len(receipt) > 0 { - receiptsNeeded++ - } - } - if int(bodiesHave) != bodiesNeeded { - t.Errorf("body retrieval count mismatch: have %v, want %v", bodiesHave, bodiesNeeded) - } - if int(receiptsHave) != receiptsNeeded { - t.Errorf("receipt retrieval count mismatch: have %v, want %v", receiptsHave, receiptsNeeded) - } -} - // Tests that headers are enqueued continuously, preventing malicious nodes from // stalling the downloader by feeding gapped header chains. func TestMissingHeaderAttack67Full(t *testing.T) { @@ -1058,7 +1006,7 @@ func testInvalidHeaderRollback(t *testing.T, protocol uint, mode SyncMode) { tester := newTester() // Create a small enough block chain to download - targetBlocks := 3*fsHeaderSafetyNet + 256 + fsMinFullBlocks + targetBlocks := 3*fsHeaderSafetyNet + 256 + int(fsMinFullBlocks) chain := testChainBase.shorten(targetBlocks) // Attempt to sync with an attacker that feeds junk during the fast sync phase. @@ -1692,7 +1640,7 @@ func testCheckpointEnforcement(t *testing.T, protocol uint, mode SyncMode) { tester := newTester() defer tester.terminate() - tester.downloader.checkpoint = uint64(fsMinFullBlocks) + 256 + tester.downloader.checkpoint = fsMinFullBlocks + 256 chain := testChainBase.shorten(int(tester.downloader.checkpoint) - 1) // Attempt to sync with the peer and validate the result @@ -1711,3 +1659,24 @@ func testCheckpointEnforcement(t *testing.T, protocol uint, mode SyncMode) { assertOwnChain(t, tester, chain.len()) } } + +func TestPivot(t *testing.T) { + testCases := []struct { + height uint64 + epoch uint64 + expected uint64 + }{ + {0, 0, 0}, + {172, 17280, 0}, + {17280, 17280, 0}, + {17280*10 + 1000, 17280, 17280*10 + 1}, + {17280*10 + 10, 17280, 17280*9 + 1}, + {17280 * 10, 17280, 17280*9 + 1}, + {17280*10 - 1000, 17280, 17280*9 + 1}, + } + for _, tt := range testCases { + if res := computePivot(tt.height, tt.epoch); res != tt.expected { + t.Errorf("Got %v expected %v for value %v", res, tt.expected, tt.height) + } + } +} diff --git a/eth/downloader/modes.go b/eth/downloader/modes.go index e61557d621..c952305d20 100644 --- a/eth/downloader/modes.go +++ b/eth/downloader/modes.go @@ -41,8 +41,8 @@ func (mode SyncMode) String() string { return "full" case FastSync: return "fast" - case SnapSync: - return "snap" + // case SnapSync: + // return "snap" case LightSync: return "light" case LightestSync: @@ -58,8 +58,9 @@ func (mode SyncMode) MarshalText() ([]byte, error) { return []byte("full"), nil case FastSync: return []byte("fast"), nil - case SnapSync: - return []byte("snap"), nil + // case SnapSync: + // return []byte("snap"), nil + // TODO: Implement snap sync case LightSync: return []byte("light"), nil case LightestSync: @@ -75,8 +76,9 @@ func (mode *SyncMode) UnmarshalText(text []byte) error { *mode = FullSync case "fast": *mode = FastSync - case "snap": - *mode = SnapSync + // case "snap": + // *mode = SnapSync + // TODO: Implement snap sync case "light": *mode = LightSync case "lightest": @@ -87,6 +89,8 @@ func (mode *SyncMode) UnmarshalText(text []byte) error { return nil } +// TODO: Enable snap sync mode here. (https://github.com/celo-org/celo-blockchain/issues/1735) + // Returns true if the all headers and not just some a small, discontinuous, set of headers are fetched. func (mode SyncMode) SyncFullHeaderChain() bool { switch mode { @@ -94,8 +98,6 @@ func (mode SyncMode) SyncFullHeaderChain() bool { return true case FastSync: return true - case SnapSync: - return true case LightSync: return true case LightestSync: @@ -113,8 +115,6 @@ func (mode SyncMode) SyncFullBlockChain() bool { return true case FastSync: return true - case SnapSync: - return true case LightSync: return false case LightestSync: diff --git a/eth/peerset.go b/eth/peerset.go index c6e9a10252..ac78ce0086 100644 --- a/eth/peerset.go +++ b/eth/peerset.go @@ -68,13 +68,13 @@ func newPeerSet() *peerSet { } } -// registerSnapExtension unblocks an already connected `istanbul` peer waiting for its +// registerSnapExtension unblocks an already connected `eth` peer waiting for its // `snap` extension, or if no such peer exists, tracks the extension for the time -// being until the `istanbul` main protocol starts looking for it. +// being until the `eth` main protocol starts looking for it. func (ps *peerSet) registerSnapExtension(peer *snap.Peer) error { - // Reject the peer if it advertises `snap` without `istanbul` as `snap` is only a - // satellite protocol meaningful with the chain selection of `istanbul` - if !peer.RunningCap(istanbul.ProtocolName, istanbul.ProtocolVersions) { + // Reject the peer if it advertises `snap` without `eth` as `snap` is only a + // satellite protocol meaningful with the chain selection of `eth` + if !peer.RunningCap(eth.ProtocolName, istanbul.ProtocolVersions) { return errSnapWithoutEth } // Ensure nobody can double connect diff --git a/les/downloader/downloader.go b/les/downloader/downloader.go index 73cb24beb7..44fb8450a6 100644 --- a/les/downloader/downloader.go +++ b/les/downloader/downloader.go @@ -14,10 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see . -// This is a temporary package whilst working on the eth/66 blocking refactors. -// After that work is done, les needs to be refactored to use the new package, -// or alternatively use a stripped down version of it. Either way, we need to -// keep the changes scoped so duplicating temporarily seems the sanest. +// Package downloader contains the manual full chain synchronisation. package downloader import ( @@ -61,11 +58,11 @@ var ( reorgProtThreshold = 48 // Threshold number of recent blocks to disable mini reorg protection reorgProtHeaderDelay = 2 // Number of headers to delay delivering to cover mini reorgs - fsHeaderCheckFrequency = 100 // Verification frequency of the downloaded headers during fast sync - fsHeaderSafetyNet = 2048 // Number of headers to discard in case a chain violation is detected - fsHeaderForceVerify = 24 // Number of headers to verify before and after the pivot to accept it - fsHeaderContCheck = 3 * time.Second // Time interval to check for header continuations during state download - fsMinFullBlocks = 64 // Number of blocks to retrieve fully even in fast sync + fsHeaderCheckFrequency = 100 // Verification frequency of the downloaded headers during fast sync + fsHeaderSafetyNet = 2048 // Number of headers to discard in case a chain violation is detected + fsHeaderForceVerify = 24 // Number of headers to verify before and after the pivot to accept it + fsHeaderContCheck = 3 * time.Second // Time interval to check for header continuations during state download + fsMinFullBlocks uint64 = 64 // Number of blocks to retrieve fully even in fast sync ) var ( @@ -152,7 +149,7 @@ type Downloader struct { quitCh chan struct{} // Quit channel to signal termination quitLock sync.Mutex // Lock to prevent double closes - epochSize uint64 // EpochSize value is useful in IBFT consensus + epoch uint64 // Epoch value is useful in IBFT consensus ibftConsensus bool // True if we are in IBFT consensus mode // Testing hooks @@ -170,6 +167,9 @@ type LightChain interface { // GetHeaderByHash retrieves a header from the local chain. GetHeaderByHash(common.Hash) *types.Header + // GetHeaderByHash retrieves a header from the local chain by number. + GetHeaderByNumber(uint64) *types.Header + // CurrentHeader retrieves the head header from the local chain. CurrentHeader() *types.Header @@ -179,9 +179,7 @@ type LightChain interface { // InsertHeaderChain inserts a batch of headers into the local chain. InsertHeaderChain([]*types.Header, int, bool) (int, error) - // Config returns the chain config Config() *params.ChainConfig - // SetHead rewinds the local chain to a new head. SetHead(uint64) error } @@ -214,10 +212,15 @@ type BlockChain interface { // InsertReceiptChain inserts a batch of receipts into the local chain. InsertReceiptChain(types.Blocks, []types.Receipts, uint64) (int, error) + // GetBlockByNumber retrieves a block from the database by number. + GetBlockByNumber(uint64) *types.Block + // Snapshots returns the blockchain snapshot tree to paused it during sync. Snapshots() *snapshot.Tree } +// TODO(tim) previously passing mode here! + // New creates a new downloader to fetch hashes and blocks from remote peers. func New(checkpoint uint64, stateDb ethdb.Database, stateBloom *trie.SyncBloom, mux *event.TypeMux, chain BlockChain, lightchain LightChain, dropPeer peerDropFn) *Downloader { if lightchain == nil { @@ -225,16 +228,16 @@ func New(checkpoint uint64, stateDb ethdb.Database, stateBloom *trie.SyncBloom, } ibftConsensus := false - epochSize := uint64(0) + epoch := uint64(0) if chain != nil && chain.Config() != nil && chain.Config().Istanbul != nil { - epochSize = chain.Config().Istanbul.Epoch + epoch = chain.Config().Istanbul.Epoch ibftConsensus = true } else if lightchain != nil && lightchain.Config() != nil && lightchain.Config().Istanbul != nil { - epochSize = lightchain.Config().Istanbul.Epoch + epoch = lightchain.Config().Istanbul.Epoch ibftConsensus = true } - if epochSize > math.MaxInt32 { - panic(fmt.Sprintf("epochSize is too big(%d), the code to fetch epoch headers casts epochSize to an int to calculate value for skip variable", epochSize)) + if epoch > math.MaxInt32 { + panic(fmt.Sprintf("epoch is too big(%d), the code to fetch epoch headers casts epoch to an int to calculate value for skip variable", epoch)) } dl := &Downloader{ @@ -262,7 +265,7 @@ func New(checkpoint uint64, stateDb ethdb.Database, stateBloom *trie.SyncBloom, }, trackStateReq: make(chan *stateReq), ibftConsensus: ibftConsensus, - epochSize: epochSize, + epoch: epoch, } go dl.stateFetcher() return dl @@ -518,16 +521,14 @@ func (d *Downloader) syncWithPeer(p *peerConnection, hash common.Hash, td *big.I // Ensure our origin point is below any fast sync pivot point if mode == FastSync { - if height <= uint64(fsMinFullBlocks) { + pivotNumber := pivot.Number.Uint64() + // Write out the pivot into the database so a rollback beyond it will + // reenable fast sync + rawdb.WriteLastPivotNumber(d.stateDB, pivotNumber) + if pivotNumber == 0 { origin = 0 - } else { - pivotNumber := pivot.Number.Uint64() - if pivotNumber <= origin { - origin = pivotNumber - 1 - } - // Write out the pivot into the database so a rollback beyond it will - // reenable fast sync - rawdb.WriteLastPivotNumber(d.stateDB, pivotNumber) + } else if pivotNumber <= origin { + origin = pivotNumber - 1 } } d.committed = 1 @@ -678,12 +679,18 @@ func (d *Downloader) fetchHead(p *peerConnection) (head *types.Header, pivot *ty mode := d.getMode() // Request the advertised remote head block and wait for the response - latest, _ := p.peer.Head() + latest, td := p.peer.Head() fetch := 1 if mode == FastSync { fetch = 2 // head + pivot headers } - go p.peer.RequestHeadersByHash(latest, fetch, fsMinFullBlocks-1, true) + height := td.Uint64() - 1 // height == TD - 1 + beginningEpochBlockNumber := d.calcPivot(height) + // NOTE: the beginningEpochBlockNumber is subtracting fsMinFullBlocks to the height, + // so, height and beginningEpochBlockNumber will be the same ONLY if the head is the genesis block + blocksFromHeightToEpochBlock := height - beginningEpochBlockNumber + + go p.peer.RequestHeadersByHash(latest, fetch, int(blocksFromHeightToEpochBlock-1), true) ttl := d.peers.rates.TargetTimeout() timeout := time.After(ttl) @@ -711,7 +718,7 @@ func (d *Downloader) fetchHead(p *peerConnection) (head *types.Header, pivot *ty return nil, nil, fmt.Errorf("%w: remote head %d below checkpoint %d", errUnsyncedPeer, head.Number, d.checkpoint) } if len(headers) == 1 { - if mode == FastSync && head.Number.Uint64() > uint64(fsMinFullBlocks) { + if mode == FastSync && head.Number.Uint64() > blocksFromHeightToEpochBlock { return nil, nil, fmt.Errorf("%w: no pivot included along head header", errBadPeer) } p.log.Debug("Remote head identified, no pivot", "number", head.Number, "hash", head.Hash()) @@ -720,8 +727,8 @@ func (d *Downloader) fetchHead(p *peerConnection) (head *types.Header, pivot *ty // At this point we have 2 headers in total and the first is the // validated head of the chain. Check the pivot number and return, pivot := headers[1] - if pivot.Number.Uint64() != head.Number.Uint64()-uint64(fsMinFullBlocks) { - return nil, nil, fmt.Errorf("%w: remote pivot %d != requested %d", errInvalidChain, pivot.Number, head.Number.Uint64()-uint64(fsMinFullBlocks)) + if pivot.Number.Uint64() != beginningEpochBlockNumber { + return nil, nil, fmt.Errorf("%w: remote pivot %d != requested %d", errInvalidChain, pivot.Number, beginningEpochBlockNumber) } return head, pivot, nil @@ -820,6 +827,9 @@ func (d *Downloader) findAncestor(p *peerConnection, remoteHeader *types.Header) // We're above the max reorg threshold, find the earliest fork point floor = int64(localHeight - maxForkAncestry) } + + // TODO(tim) TODO(ashishb) see https://github.com/celo-org/celo-blockchain/commit/6c312a24b6041385c33eca066ff5604af315a41e + // If we're doing a light sync, ensure the floor doesn't go below the CHT, as // all headers before that point will be missing. if !mode.SyncFullBlockChain() { @@ -1026,46 +1036,6 @@ func (d *Downloader) findAncestorBinarySearch(p *peerConnection, mode SyncMode, return start, nil } -func getEpochHeaders(fromEpochBlock uint64, epochSize uint64, p *peerConnection) { - if fromEpochBlock%epochSize != 0 { - panic(fmt.Sprintf( - "Logic error: getEpochHeaders received a request to fetch non-epoch block %d with epochSize %d", - fromEpochBlock, epochSize)) - } - - // if epochSize is 100 and we fetch from=1000 and skip=100 then we will get - // 1000, 1101, 1202, 1303 ... - // So, skip has to be epochSize - 1 to get the right set of blocks. - skip := int(epochSize - 1) - count := MaxEpochHeaderFetch - log.Trace("getEpochHeaders", "from", fromEpochBlock, "count", count, "skip", skip) - p.log.Trace("Fetching full headers", "count", count, "from", fromEpochBlock) - go p.peer.RequestHeadersByNumber(fromEpochBlock, count, skip, false) -} - -func getNormalHeaders(from uint64, skeleton bool, p *peerConnection) { - if skeleton { - p.log.Trace("Fetching skeleton headers", "count", MaxHeaderFetch, "from", from) - go p.peer.RequestHeadersByNumber(from+uint64(MaxHeaderFetch)-1, MaxSkeletonSize, MaxHeaderFetch-1, false) - } else { - p.log.Trace("Fetching full headers", "count", MaxHeaderFetch, "from", from) - go p.peer.RequestHeadersByNumber(from, MaxHeaderFetch, 0, false) - } -} - -func getEpochOrNormalHeaders(from uint64, epochSize uint64, height uint64, skeleton bool, p *peerConnection) { - // Download the epoch headers including and beyond the current head. - nextEpochBlock := (from-1)/epochSize*epochSize + epochSize - // If we're still not synced up to the latest epoch, sync only epoch headers. - // Otherwise, sync block headers as we would normally in light sync. - log.Trace("Getting headers in lightest sync mode", "from", from, "height", height, "nextEpochBlock", nextEpochBlock, "epochSize", epochSize) - if nextEpochBlock < height { - getEpochHeaders(nextEpochBlock, epochSize, p) - } else if from <= height { - getNormalHeaders(height, skeleton, p) - } -} - // fetchHeaders keeps retrieving headers concurrently from the number // requested, until no more are returned, potentially throttling on the way. To // facilitate concurrency but still protect against malicious nodes sending bad @@ -1086,48 +1056,103 @@ func (d *Downloader) fetchHeaders(p *peerConnection, from uint64, height uint64) timeout := time.NewTimer(0) // timer to dump a non-responsive active peer <-timeout.C // timeout channel should be initially empty defer timeout.Stop() - epochSize := d.epochSize + epoch := d.epoch var ttl time.Duration - mode := d.getMode() - getHeaders := func(from uint64) { request = time.Now() ttl = d.peers.rates.TargetTimeout() timeout.Reset(ttl) - if mode != LightestSync { - getNormalHeaders(from, skeleton, p) + + if skeleton { + p.log.Trace("Fetching skeleton headers", "count", MaxHeaderFetch, "from", from) + go p.peer.RequestHeadersByNumber(from+uint64(MaxHeaderFetch)-1, MaxSkeletonSize, MaxHeaderFetch-1, false) } else { - getEpochOrNormalHeaders(from, epochSize, height, skeleton, p) + count := MaxHeaderFetch + skip := 0 + p.log.Trace("Fetching full headers", "count", count, "from", from) + go p.peer.RequestHeadersByNumber(from, MaxHeaderFetch, skip, false) } } - getNextPivot := func() { - pivoting = true + mode := d.getMode() + getEpochHeaders := func(fromEpochBlock uint64) { + if mode != LightestSync { + panic("This method should be called only in LightestSync mode") + } + if fromEpochBlock%epoch != 0 { + panic(fmt.Sprintf( + "Logic error: getEpochHeaders received a request to fetch non-epoch block %d with epoch %d", + fromEpochBlock, epoch)) + } + request = time.Now() ttl = d.peers.rates.TargetTimeout() timeout.Reset(ttl) - d.pivotLock.RLock() - pivot := d.pivotHeader.Number.Uint64() - d.pivotLock.RUnlock() - - p.log.Trace("Fetching next pivot header", "number", pivot+uint64(fsMinFullBlocks)) - go p.peer.RequestHeadersByNumber(pivot+uint64(fsMinFullBlocks), 2, fsMinFullBlocks-9, false) // move +64 when it's 2x64-8 deep + // if epoch is 100 and we fetch from=1000 and skip=100 then we will get + // 1000, 1101, 1202, 1303 ... + // So, skip has to be epoch - 1 to get the right set of blocks. + skip := int(epoch - 1) + count := MaxEpochHeaderFetch + log.Trace("getEpochHeaders", "from", fromEpochBlock, "count", count, "skip", skip) + p.log.Trace("Fetching full headers", "count", count, "from", fromEpochBlock) + go p.peer.RequestHeadersByNumber(fromEpochBlock, count, skip, false) + } + + // Returns true if a header(s) fetch request was made, false if the syncing is finished. + getEpochOrNormalHeaders := func(from uint64) bool { + // Download the epoch headers including and beyond the current head. + nextEpochBlock := (from-1)/epoch*epoch + epoch + // If we're still not synced up to the latest epoch, sync only epoch headers. + // Otherwise, sync block headers as we would normally in light sync. + log.Trace("Getting headers in lightest sync mode", "from", from, "height", height, "nextEpochBlock", nextEpochBlock, "epoch", epoch) + if nextEpochBlock < height { + getEpochHeaders(nextEpochBlock) + return true + } else if from <= height { + getHeaders(height) + return true + } else { + // During repeated invocations, "from" can be more than height since the blocks could have + // created after this method was invoked and in that case, the from which is one beyond the + // last fetched header number can be more than the height. + // If we have already fetched a block header >= height block header then we declare that the sync + // is finished and stop. + return false + } } + // TODO(ponti): Re add the "moving" pivot, after changing the way we calculate the uptimeScore + // getNextPivot := func() { + // pivoting = true + // request = time.Now() + + // ttl = d.requestTTL() + // timeout.Reset(ttl) + + // d.pivotLock.RLock() + // pivot := d.pivotHeader.Number.Uint64() + // d.pivotLock.RUnlock() + + // p.log.Trace("Fetching next pivot header", "number", pivot+fsMinFullBlocks) + // go p.peer.RequestHeadersByNumber(pivot+fsMinFullBlocks, 2, int(fsMinFullBlocks-9), false) // move +64 when it's 2x64-8 deep + // } // Start pulling the header chain skeleton until all is done ancestor := from if mode == LightestSync { - if epochSize == 0 { - panic("EpochSize cannot be 0 in IBFT + LightestSync") + if epoch == 0 { + panic("Epoch cannot be 0 in IBFT + LightestSync") } // Don't fetch skeleton, only fetch the headers. skeleton = false + getEpochOrNormalHeaders(from) + } else { + log.Trace("getHeaders#initialHeaderDownload", "from", from) + getHeaders(from) } - getHeaders(from) for { select { @@ -1157,11 +1182,11 @@ func (d *Downloader) fetchHeaders(p *peerConnection, from uint64, height uint64) // Retrieve the headers and do some sanity checks, just in case headers := packet.(*headerPack).headers - if have, want := headers[0].Number.Uint64(), pivot+uint64(fsMinFullBlocks); have != want { + if have, want := headers[0].Number.Uint64(), pivot+fsMinFullBlocks; have != want { log.Warn("Peer sent invalid next pivot", "have", have, "want", want) return fmt.Errorf("%w: next pivot number %d != requested %d", errInvalidChain, have, want) } - if have, want := headers[1].Number.Uint64(), pivot+2*uint64(fsMinFullBlocks)-8; have != want { + if have, want := headers[1].Number.Uint64(), pivot+2*fsMinFullBlocks-8; have != want { log.Warn("Peer sent invalid pivot confirmer", "have", have, "want", want) return fmt.Errorf("%w: next pivot confirmer number %d != requested %d", errInvalidChain, have, want) } @@ -1266,17 +1291,11 @@ func (d *Downloader) fetchHeaders(p *peerConnection, from uint64, height uint64) return errCanceled } // In all other sync modes, we fetch the block immediately after the current block. - // In the lightest sync mode, increment the value by epochSize instead. + // In the lightest sync mode, increment the value by epoch instead. if mode == LightestSync { lastFetchedHeaderNumber := headers[len(headers)-1].Number.Uint64() - if lastFetchedHeaderNumber+1 <= height { - getHeaders(lastFetchedHeaderNumber + 1) - } else { - // During repeated invocations, "from" can be more than height since the blocks could have - // created after this method was invoked and in that case, the from which is one beyond the - // last fetched header number can be more than the height. - // If we have already fetched a block header >= height block header then we declare that the sync - // is finished and stop. + moreHeaderFetchesPending := getEpochOrNormalHeaders(lastFetchedHeaderNumber + 1) + if !moreHeaderFetchesPending { p.log.Debug("No more headers available") select { case d.headerProcCh <- nil: @@ -1290,18 +1309,24 @@ func (d *Downloader) fetchHeaders(p *peerConnection, from uint64, height uint64) log.Trace("getHeaders#downloadMoreHeaders", "from", from) // If we're still skeleton filling fast sync, check pivot staleness // before continuing to the next skeleton filling - if skeleton && pivot > 0 { - getNextPivot() - } else { - getHeaders(from) - } + + // TODO(ponti): Re add the "moving" pivot, after changing the way we calculate the uptimeScore + // if skeleton && pivot > 0 { + // getNextPivot() + // } else { + getHeaders(from) + // } } } else { // No headers delivered, or all of them being delayed, sleep a bit and retry p.log.Trace("All headers delayed, waiting") select { case <-time.After(fsHeaderContCheck): - getHeaders(from) + if mode == LightestSync { + getEpochOrNormalHeaders(from) + } else { + getHeaders(from) + } continue case <-d.cancelCh: return errCanceled @@ -1698,7 +1723,7 @@ func (d *Downloader) processHeaders(origin uint64, td *big.Int) error { // This check cannot be executed "as is" for full imports, since blocks may still be // queued for processing when the header download completes. However, as long as the // peer gave us something useful, we're already happy/progressed (above check). - if mode == FastSync || !mode.SyncFullBlockChain() { + if mode == FastSync || mode == LightSync { head := d.lightchain.CurrentHeader() if td.Cmp(d.lightchain.GetTd(head.Hash(), head.Number.Uint64())) > 0 { rollbackErr = errStallingPeer @@ -1852,6 +1877,42 @@ func (d *Downloader) importBlockResults(results []*fetchResult) error { return nil } +func max(a uint64, b uint64) uint64 { + if a < b { + return b + } + return a +} + +func computePivot(height uint64, epochSize uint64) uint64 { + if height <= fsMinFullBlocks { + return 0 + } + target := height - fsMinFullBlocks + targetEpoch := istanbul.GetEpochNumber(target, epochSize) + + // if target is on first epoch start on genesis + if targetEpoch <= 1 { + return 0 + } + + // else start on first block of the epoch + pivot, _ := istanbul.GetEpochFirstBlockNumber(targetEpoch, epochSize) + return pivot + +} + +func (d *Downloader) calcPivot(height uint64) uint64 { + // If epoch is not set (not IBFT) use old logic + if d.epoch == 0 { + if fsMinFullBlocks > height { + return 0 + } + return height - fsMinFullBlocks + } + return computePivot(height, d.epoch) +} + // processFastSyncContent takes fetch results from the queue and writes them to the // database. It also controls the synchronisation of state nodes of the pivot block. func (d *Downloader) processFastSyncContent() error { @@ -1926,22 +1987,17 @@ func (d *Downloader) processFastSyncContent() error { // Note, we have `reorgProtHeaderDelay` number of blocks withheld, Those // need to be taken into account, otherwise we're detecting the pivot move // late and will drop peers due to unavailable state!!! - // BUT we are not expecting chain reorgs in IBFT (so we could assume it as zero) - headerDelay := reorgProtHeaderDelay - if d.ibftConsensus { - headerDelay = 0 - } - if height := latest.Number.Uint64(); height > pivot.Number.Uint64()+2*uint64(fsMinFullBlocks)-uint64(headerDelay) { - log.Warn("Pivot became stale, moving", "old", pivot.Number.Uint64(), "new", height-uint64(fsMinFullBlocks)+uint64(headerDelay)) - pivot = results[len(results)-1-fsMinFullBlocks+headerDelay].Header // must exist as lower old pivot is uncommitted + if height := latest.Number.Uint64(); height > pivot.Number.Uint64()+2*max(d.epoch, fsMinFullBlocks)-uint64(reorgProtHeaderDelay) { + newPivot := d.calcPivot(height) + log.Warn("Pivot became stale, moving", "old", pivot, "new", newPivot) + pivot = d.lightchain.GetHeaderByNumber(newPivot) d.pivotLock.Lock() d.pivotHeader = pivot d.pivotLock.Unlock() - // Write out the pivot into the database so a rollback beyond it will // reenable fast sync - rawdb.WriteLastPivotNumber(d.stateDB, pivot.Number.Uint64()) + rawdb.WriteLastPivotNumber(d.stateDB, newPivot) } } P, beforeP, afterP := splitAroundPivot(pivot.Number.Uint64(), results) diff --git a/les/downloader/downloader_test.go b/les/downloader/downloader_test.go index a7a21ab0aa..2515ea8068 100644 --- a/les/downloader/downloader_test.go +++ b/les/downloader/downloader_test.go @@ -921,58 +921,6 @@ func testMultiProtoSync(t *testing.T, protocol uint, mode SyncMode) { } } -// Tests that if a block is empty (e.g. header only), no body request should be -// made, and instead the header should be assembled into a whole block in itself. -func TestEmptyShortCircuit67Full(t *testing.T) { testEmptyShortCircuit(t, istanbul.Celo67, FullSync) } -func TestEmptyShortCircuit67Fast(t *testing.T) { testEmptyShortCircuit(t, istanbul.Celo67, FastSync) } -func TestEmptyShortCircuit67Light(t *testing.T) { testEmptyShortCircuit(t, istanbul.Celo67, LightSync) } - -func testEmptyShortCircuit(t *testing.T, protocol uint, mode SyncMode) { - t.Parallel() - - tester := newTester() - defer tester.terminate() - - // Create a block chain to download - chain := testChainBase - tester.newPeer("peer", protocol, chain) - - // Instrument the downloader to signal body requests - bodiesHave, receiptsHave := int32(0), int32(0) - tester.downloader.bodyFetchHook = func(headers []*types.Header) { - atomic.AddInt32(&bodiesHave, int32(len(headers))) - } - tester.downloader.receiptFetchHook = func(headers []*types.Header) { - atomic.AddInt32(&receiptsHave, int32(len(headers))) - } - // Synchronise with the peer and make sure all blocks were retrieved - if err := tester.sync("peer", nil, mode); err != nil { - t.Fatalf("failed to synchronise blocks: %v", err) - } - assertOwnChain(t, tester, chain.len()) - - // Validate the number of block bodies that should have been requested - bodiesNeeded, receiptsNeeded := 0, 0 - for _, block := range chain.blockm { - // As we save info in every block (as for example, randomness), we will - // never have empty blocks - if mode != LightSync && block != tester.genesis { - bodiesNeeded++ - } - } - for _, receipt := range chain.receiptm { - if mode == FastSync && len(receipt) > 0 { - receiptsNeeded++ - } - } - if int(bodiesHave) != bodiesNeeded { - t.Errorf("body retrieval count mismatch: have %v, want %v", bodiesHave, bodiesNeeded) - } - if int(receiptsHave) != receiptsNeeded { - t.Errorf("receipt retrieval count mismatch: have %v, want %v", receiptsHave, receiptsNeeded) - } -} - // Tests that headers are enqueued continuously, preventing malicious nodes from // stalling the downloader by feeding gapped header chains. func TestMissingHeaderAttack67Full(t *testing.T) { @@ -1058,7 +1006,7 @@ func testInvalidHeaderRollback(t *testing.T, protocol uint, mode SyncMode) { tester := newTester() // Create a small enough block chain to download - targetBlocks := 3*fsHeaderSafetyNet + 256 + fsMinFullBlocks + targetBlocks := 3*fsHeaderSafetyNet + 256 + int(fsMinFullBlocks) chain := testChainBase.shorten(targetBlocks) // Attempt to sync with an attacker that feeds junk during the fast sync phase. @@ -1692,7 +1640,7 @@ func testCheckpointEnforcement(t *testing.T, protocol uint, mode SyncMode) { tester := newTester() defer tester.terminate() - tester.downloader.checkpoint = uint64(fsMinFullBlocks) + 256 + tester.downloader.checkpoint = fsMinFullBlocks + 256 chain := testChainBase.shorten(int(tester.downloader.checkpoint) - 1) // Attempt to sync with the peer and validate the result @@ -1711,3 +1659,24 @@ func testCheckpointEnforcement(t *testing.T, protocol uint, mode SyncMode) { assertOwnChain(t, tester, chain.len()) } } + +func TestPivot(t *testing.T) { + testCases := []struct { + height uint64 + epoch uint64 + expected uint64 + }{ + {0, 0, 0}, + {172, 17280, 0}, + {17280, 17280, 0}, + {17280*10 + 1000, 17280, 17280*10 + 1}, + {17280*10 + 10, 17280, 17280*9 + 1}, + {17280 * 10, 17280, 17280*9 + 1}, + {17280*10 - 1000, 17280, 17280*9 + 1}, + } + for _, tt := range testCases { + if res := computePivot(tt.height, tt.epoch); res != tt.expected { + t.Errorf("Got %v expected %v for value %v", res, tt.expected, tt.height) + } + } +} diff --git a/les/downloader/modes.go b/les/downloader/modes.go index a4ddc0dcfc..823ce21190 100644 --- a/les/downloader/modes.go +++ b/les/downloader/modes.go @@ -36,8 +36,8 @@ func FromString(syncModeStr string) SyncMode { return FullSync case "fast": return FastSync - case "snap": - return SnapSync + // case "snap": + // return SnapSync case "light": return LightSync case "lightest": @@ -58,8 +58,8 @@ func (mode SyncMode) String() string { return "full" case FastSync: return "fast" - case SnapSync: - return "snap" + // case SnapSync: + // return "snap" case LightSync: return "light" case LightestSync: @@ -75,8 +75,9 @@ func (mode SyncMode) MarshalText() ([]byte, error) { return []byte("full"), nil case FastSync: return []byte("fast"), nil - case SnapSync: - return []byte("snap"), nil + // case SnapSync: + // return []byte("snap"), nil + // TODO: Implement snap sync case LightSync: return []byte("light"), nil case LightestSync: @@ -92,8 +93,9 @@ func (mode *SyncMode) UnmarshalText(text []byte) error { *mode = FullSync case "fast": *mode = FastSync - case "snap": - *mode = SnapSync + // case "snap": + // *mode = SnapSync + // TODO: Implement snap sync case "light": *mode = LightSync case "lightest": @@ -104,6 +106,8 @@ func (mode *SyncMode) UnmarshalText(text []byte) error { return nil } +// TODO: Enable snap sync mode here. (https://github.com/celo-org/celo-blockchain/issues/1735) + // Returns true if the all headers and not just some a small, discontinuous, set of headers are fetched. func (mode SyncMode) SyncFullHeaderChain() bool { switch mode { @@ -111,8 +115,6 @@ func (mode SyncMode) SyncFullHeaderChain() bool { return true case FastSync: return true - case SnapSync: - return true case LightSync: return true case LightestSync: @@ -130,8 +132,6 @@ func (mode SyncMode) SyncFullBlockChain() bool { return true case FastSync: return true - case SnapSync: - return true case LightSync: return false case LightestSync: From 2d2c375e32d68be52b674cf0672ff0bbaa037f20 Mon Sep 17 00:00:00 2001 From: Gaston Ponti Date: Tue, 6 Dec 2022 11:21:49 -0300 Subject: [PATCH 02/18] Fix tracer block context (#1987) * Fix tracer block context * Add comment --- core/sys_context.go | 1 + eth/tracers/api.go | 12 ++++-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/core/sys_context.go b/core/sys_context.go index 6f145de73b..fda76a0810 100644 --- a/core/sys_context.go +++ b/core/sys_context.go @@ -14,6 +14,7 @@ import ( // SysContractCallCtx acts as a cache holding information obtained through // system contract calls to be used during block processing. +// Note: This struct should be a read only one to be safe for concurrent use type SysContractCallCtx struct { whitelistedCurrencies map[common.Address]struct{} // The gas required for a non celo (cUSD, cEUR, ...) transfer. diff --git a/eth/tracers/api.go b/eth/tracers/api.go index 7845bded4a..7e240e6829 100644 --- a/eth/tracers/api.go +++ b/eth/tracers/api.go @@ -599,16 +599,16 @@ func (api *API) traceBlock(ctx context.Context, block *types.Block, config *Trac } blockCtx := core.NewEVMBlockContext(block.Header(), api.chainContext(ctx), nil) blockHash := block.Hash() + var sysCtx *core.SysContractCallCtx + if api.backend.ChainConfig().IsEspresso(block.Number()) { + sysCtx = core.NewSysContractCallCtx(block.Header(), statedb, api.backend) + } for th := 0; th < threads; th++ { pend.Add(1) go func() { defer pend.Done() // Fetch and execute the next transaction trace tasks for task := range jobs { - var sysCtx *core.SysContractCallCtx - if api.backend.ChainConfig().IsEspresso(block.Number()) { - sysCtx = core.NewSysContractCallCtx(block.Header(), task.statedb, api.backend) - } msg, _ := txs[task.index].AsMessage(signer, nil) txctx := &Context{ BlockHash: blockHash, @@ -625,10 +625,6 @@ func (api *API) traceBlock(ctx context.Context, block *types.Block, config *Trac } }() } - var sysCtx *core.SysContractCallCtx - if api.backend.ChainConfig().IsEspresso(block.Number()) { - sysCtx = core.NewSysContractCallCtx(block.Header(), statedb, api.backend) - } vmRunner := api.backend.NewEVMRunner(block.Header(), statedb) // Feed the transactions into the tracers and return var failed error From 49ef8b51a88308a4b4555d43ef69c187b9847a13 Mon Sep 17 00:00:00 2001 From: Pastoh Date: Tue, 6 Dec 2022 12:02:15 -0300 Subject: [PATCH 03/18] Add missing tx.type field in the json marshal of a tx receipt (#1985) (#1988) Cherry pick from 1.7.1 hotfix ( 86eb9876d3473806a7ca47da80ac9c6d59a1d5e9 ) --- internal/ethapi/api.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index c75da22012..b35707a39c 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -2030,6 +2030,7 @@ func generateReceiptResponse(receipt *types.Receipt, signer types.Signer, tx *ty "contractAddress": nil, "logs": receipt.Logs, "logsBloom": receipt.Bloom, + "type": hexutil.Uint(receipt.Type), } // Assign receipt status or post state. From 1cc3de523f7d0756e48ad6439827fbdd47c3ac25 Mon Sep 17 00:00:00 2001 From: Paul Lange Date: Thu, 12 Jan 2023 11:11:49 +0100 Subject: [PATCH 04/18] Remove CI tasks for mobile client/NPM package (#1989) * Remove package.json and mobile publishing script * ci: Remove `publish-mobile-client` task --- .circleci/config.yml | 27 --------------------------- CeloBlockchain.podspec | 16 ---------------- package.json | 20 -------------------- scripts/publish-mobile-client.sh | 29 ----------------------------- 4 files changed, 92 deletions(-) delete mode 100644 CeloBlockchain.podspec delete mode 100644 package.json delete mode 100755 scripts/publish-mobile-client.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index 65b1d3f9b0..a94f4e286b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -525,15 +525,6 @@ jobs: - geth/build/bin/Geth.framework.tgz - geth/libbls_snark_sys.a - publish-mobile-client: - docker: - - image: circleci/node:10 - working_directory: ~/repos/geth - steps: - - attach_workspace: - at: ~/repos - - run: ./scripts/publish-mobile-client.sh ${CIRCLE_SHA1} ${NPM_TOKEN_FOR_CELO_CLIENT} - lightest-sync-test: executor: golang steps: @@ -633,24 +624,6 @@ workflows: - prepare-system-contracts #- android - ios - - publish-mobile-client: - requires: - #- android - - ios - # Makes sure tests are all green before publishing - # Though these are not using the mobile built binaries - # they should be a good indicator - - unit-tests - - lightest-sync-test - - end-to-end-blockchain-parameters-test - - end-to-end-governance-test - - end-to-end-slashing-test - - end-to-end-sync-test - - end-to-end-transfer-test - - end-to-end-validator-order-test - filters: - branches: - only: master - lightest-sync-test: requires: - go-modules diff --git a/CeloBlockchain.podspec b/CeloBlockchain.podspec deleted file mode 100644 index fde459560f..0000000000 --- a/CeloBlockchain.podspec +++ /dev/null @@ -1,16 +0,0 @@ -require 'json' - -package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) - -Pod::Spec.new do |s| - s.name = 'CeloBlockchain' - s.version = package['version'] - s.license = package['license'] - s.homepage = package['homepage'] - s.authors = { 'Connor McEwen' => 'c@celo.org' } - s.summary = package['description'] - s.source = { :git => package['repository']['url'], :tag => s.version } - s.source_files = 'build/bin/Geth.framework/**/*.h', 'Empty.m' - s.vendored_libraries = 'libGeth.a', 'libbls_snark_sys.a' - s.pod_target_xcconfig = { 'OTHER_LDFLAGS' => '-ObjC' } -end diff --git a/package.json b/package.json deleted file mode 100644 index 8978f80344..0000000000 --- a/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "@celo/client", - "version": "0.0.1", - "description": "Celo client for mobile", - "homepage": "https://celo.org", - "repository": { - "type": "git", - "url": "https://github.com/celo-org/celo-blockchain.git" - }, - "license": "LGPL-3.0", - "files": [ - "build/bin/geth.aar", - "build/bin/Geth.framework.tgz", - "CeloBlockchain.podspec", - "libbls_snark_sys.a" - ], - "scripts": { - "postinstall": "rm -rf build/bin/Geth.framework && tar -xvf build/bin/Geth.framework.tgz -C build/bin && touch Empty.m && ln -sf build/bin/Geth.framework/Versions/A/Geth libGeth.a" - } -} diff --git a/scripts/publish-mobile-client.sh b/scripts/publish-mobile-client.sh deleted file mode 100755 index de1cda8d31..0000000000 --- a/scripts/publish-mobile-client.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash -# -# Usage: ./scripts/publish-mobile-client.sh $COMMIT_SHA $NPM_TOKEN - -set -euo pipefail - -# Process args -commit_sha_short="${1:0:7}" -npm_token="${2:-}" - -package_name="$(node -p "require('./package.json').name")" - -version=$(npm show "$package_name" version) -# Bump minor version -a=( ${version//./ } ) -((a[2]++)) -new_version="${a[0]}.${a[1]}.${a[2]}" - -# Add npm token if provided -if [ -n "$npm_token" ]; then - echo "//registry.npmjs.org/:_authToken=$npm_token" > ~/.npmrc -fi - -# TODO: Create an appropriate README for NPM -rm README.md - -npm -f --no-git-tag-version version "$new_version" -npm publish --tag "$commit_sha_short" --access public -timeout=9999999 -npm dist-tag add "$package_name@$new_version" latest From 7cb677f42d278b7604c5acf4d9e6c6515346842b Mon Sep 17 00:00:00 2001 From: Paul Lange Date: Thu, 12 Jan 2023 12:21:51 +0100 Subject: [PATCH 05/18] ci: Set `E2E_TESTS_FORCE_USE_MYCELO` in e2e tests (#1992) --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index a94f4e286b..177fc3045b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -262,6 +262,7 @@ end-to-end-test: &end-to-end-test no_output_timeout: 15m command: | export PATH=${PATH}:~/repos/golang/go/bin + export E2E_TESTS_FORCE_USE_MYCELO=true cd celo-monorepo/packages/celotool ./${TEST_NAME} local ~/repos/geth # Note, all e2e tests call 'make all' in ~/repos/geth, this causes most code From a3b1de1491a6750b28cae682f72ea7e0285f70e9 Mon Sep 17 00:00:00 2001 From: Mohamed Sohail Date: Thu, 12 Jan 2023 15:01:45 +0300 Subject: [PATCH 06/18] docs: update docker registry link (#1986) Co-authored-by: Paul Lange --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0d099c8d88..9c5568be37 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Official golang implementation of the Celo blockchain, based off of the [officia [![Codecov](https://img.shields.io/codecov/c/github/celo-org/celo-blockchain)](https://codecov.io/gh/celo-org/celo-blockchain) [![Discord](https://img.shields.io/badge/discord-join%20chat-blue.svg)](https://chat.celo.org) -Prebuilt [Docker](https://en.wikipedia.org/wiki/Docker_\(software\)) images are available for immediate use: [us.gcr.io/celo-testnet/celo-node](https://us.gcr.io/celo-testnet/celo-node). See [docs.celo.org/getting-started](https://docs.celo.org/getting-started/choosing-a-network) for a guide to the Celo networks and how to get started. +Prebuilt [Docker](https://en.wikipedia.org/wiki/Docker_\(software\)) images are available for immediate use: [us.gcr.io/celo-org/geth](https://us.gcr.io/celo-org/geth). See [docs.celo.org/getting-started](https://docs.celo.org/getting-started/choosing-a-network) for a guide to the Celo networks and how to get started. Documentation for Celo more generally can be found at [docs.celo.org](https://docs.celo.org/) From 3284384ba0e6289ec29c0631c0215a40db3d06e1 Mon Sep 17 00:00:00 2001 From: Paul Lange Date: Mon, 16 Jan 2023 17:33:10 +0100 Subject: [PATCH 07/18] build: Remove `wnode` from xgo archive (#1997) --- build/ci.go | 1 - 1 file changed, 1 deletion(-) diff --git a/build/ci.go b/build/ci.go index 9da0b04e4e..7e71bb631a 100644 --- a/build/ci.go +++ b/build/ci.go @@ -1342,7 +1342,6 @@ func xgoAllToolsArchiveFiles(target string, dir string) []string { executableXgoPath("evm", target, dir), executableXgoPath("geth", target, dir), executableXgoPath("rlpdump", target, dir), - executableXgoPath("wnode", target, dir), executableXgoPath("clef", target, dir), executableXgoPath("blspopchecker", target, dir), } From f92e9239304d91e1a8101cc916e1afe2eea7fbee Mon Sep 17 00:00:00 2001 From: piersy Date: Tue, 17 Jan 2023 14:06:55 +0000 Subject: [PATCH 08/18] Add high level package docs for rawdb & downloader (#1916) * Add high level package docs for rawdb & downloader This documentation is intended to simplify the task of getting a holistic understanding of these packages. * Fix typos * docs: Fix typo Co-authored-by: Paul Lange Co-authored-by: Paul Lange --- core/rawdb/doc.go | 38 ++++++++ eth/downloader/doc.go | 207 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 245 insertions(+) create mode 100644 core/rawdb/doc.go create mode 100644 eth/downloader/doc.go diff --git a/core/rawdb/doc.go b/core/rawdb/doc.go new file mode 100644 index 0000000000..8da8908671 --- /dev/null +++ b/core/rawdb/doc.go @@ -0,0 +1,38 @@ +/* +Package rawdb contains a collection of low level database accessors. + +The rawdb serves as a wrapper around level db and a file based database +providing an ethereum specific interface. + +The rawdb introduces the concept of ancient items, which are stored in the +freezer (a flat file based db) rather than in leveldb, this structure was +chosen to improve performance and reduce memory consumption. See this +PR (https://github.com/ethereum/go-ethereum/pull/19244) for more detail. + +The freezer is split into a number of tables, each holding a different type of data. + +They are: + +* block headers +* canonical block hashes +* block bodies +* receipts +* total difficulty + +Each table contains one entry per block and the data for each table is stored +in a file on disk that is only ever appended to. If a file grows beyond a +certain threshold then subsequent entries for that table are appended into a +new sequentially numbered file. + +Sometimes the tables can get out of sync and in such situations they are all +truncated to match the table with the smallest amount of entries. + +The freezer starts a background routine to periodically collect values written +to leveldb and move them to freezer files. Since data in the freezer cannot be +modified the items added to the freezer must be considered final (I.E, no +chance of a re-org) currently that is ensured by only freezing blocks at least +90000 behind the head block. This 90000 threshold is referred to as the +'FullImmutabilityThreshold'. + +*/ +package rawdb diff --git a/eth/downloader/doc.go b/eth/downloader/doc.go new file mode 100644 index 0000000000..f7baca5112 --- /dev/null +++ b/eth/downloader/doc.go @@ -0,0 +1,207 @@ +/* +Package downloader handles downloading data from other nodes for sync. Sync +refers to the process of catching up with other nodes, once caught up nodes +use a different process to maintain their syncronisation. + +There are a few different modes for syncing + +Full: Get all the blocks and apply them all to build the chain state + +Fast: Get all the blocks and block receipts and insert them in the db without +processing them and at the same time download the state for a block near the +head block. Once the state has been downloaded, process subsequent blocks as a +full sync would in order to reach the tip of the chain. + +Fast sync introduces the concept of the pivot, which is a block at some point +behind the head block for which the node attempts to sync state for. In geth +the pivot was chosen to be 64 blocks behind the head block, the reason for +choosing a point behind the head was to ensure that the block that you are +syncing state for a block which is on the main chain and won't get reorged out. +(see https://github.com/ethereum/go-ethereum/issues/25100), it was called the +pivot because before the pivot the fast sync approach is used but after the +pivot full sync is used, so you could imagine the syncing strategy pivoting +around that point. + +In celo we don't have the problem of reorgs but we still retain the pivot point +because the validator uptime scores historically were required to be calculated +by processing blocks from an epoch boundary. However since +https://github.com/celo-org/celo-blockchain/pull/1833 which removes the +requirement to process blocks from an epoch boundary we could in fact drop the +concept of pivot. + +Snap: Not currently working, but in theory works like fast sync except that +nodes download a flat file to get the state, as opposed to making hundreds of +thousands of individual requests for it. This should significantly speed up +sync. + +Light: Downloads only headers during sync and then downloads other data on +demand in order to service rpc requests. + +Lightest: Like light but downloads only one header per epoch, which on mainnet +means one header out of every 17280 headers. This is particularly fast only +takes 20 seconds or so to get synced. + +Sync process detail + +Syncing is initiated with one peer (see eth.loop), the peer selected to sync +with is the one with the highest total difficulty of all peers (see +eth.nextSyncOp). Syncing may be cancelled and started with a different peer if +a peer with a higher total difficulty becomes available. + +Syncing introduces the concept of a checkpoint (see params.TrustedCheckpoint). +The checkpoint is a hard coded set of trie roots that allow state sync to start +before the whole header chain has been downloaded. + +The pivot point is the point which the fast sync syncs state for, it is +calculated as the first block of the epoch containing the block that is +fsMinFullBlocks behind the current head block of the peer we are syncing +against (fsMinFullBlocks is hardcoded to 64, chosen by the geth team to make +re-orgs of the synced state unlikely). + +The first step in syncing with a peer is to fetch the latest block header and +pivot header. The geth implementation simply calculates the pivot as being 64 +blocks before (fsMinFullBlocks) the head, and so if the head is currently < 64 +then there is no valid pivot, in that case geth code uses the head as the pivot +(they say to avoid nil pointer exceptions, but its not clear what this will do +to the sync). From the celo side there should never be a case without a pivot +block because we instead choose the pivot to be zero if head is currently < 64. + +Next the sync finds the common ancestor (aka origin) between the node and the +peer is syncing against. + +If fast syncing { + + The pivot is written to a file. + + If the origin turns out to be after the pivot then it is set to be just + before the pivot. + + The ancient limit is set on the downloader (it would be much nicer if the + concept of ancient could be encapsulated in the database rather than + leaking here). The ancient defines boundary between freezer blocks and + current blocks. Setting ancient limit here enables "direct-ancient mode" + which I guess bypasses putting stuff into the main chain and then having it + be moved to the freezer later. I guess in full sync mode since all blocks + need to be processed all blocks need to go into the main database first and + only after they have been process can they be moved to the freezer, but + since fast sync does not process all blocks that step can be skipped. + + Then, and I'm not really clear why if the origin is greater than the last + frozen block (IE there is stuff in the current database beyond whats in the + Freezer) the "direct-ancient mode is disabled", maybe because it is only + applicable for nodes that are starting from scratch or have never reached + the pivot. + + If the origin turns out to be lower than the most recent frozen block then + the blockchain is rewound to the origin. + + set the pivotHeader on the downloader as the pivot. + +} + +Then a number of go routines are started to fetch data from the origin to the head. + +fetchHeaders +fetchBodies +fetchReceipts + +And one to process the headers. (processHeaders) + +If fast sync { + start a routine to process the fast sync content (processFastSyncContent) +} +If full syncing { + + start a routine to process the full sync content (processFullSyncContent) +} + + +These goroutines form a pipeline where the downloaded data flows as follows. + + -> fetchBodies -> processFullSyncContent + / \ +fetchHeaders -> processHeaders \ + \ \ + -> fetchReceipts --> processFastSyncContent + + + +fetchHeaders + +fetchHeaders introduces the skeleton concept. The idea is that the node +requests a set of headers from the peer that are spaced out at regular +intervals, and then uses all peers to request headers to fill the gaps. The +header hashes allow the node to easily verify that the received headers match +the chain of the main peer they are syncing against. Whether fetching skeleton +headers or not requests for headers are done in batches of up to 192 +(MaxHeaderFetch) headers. + +If lightest sync { + fetch just epoch headers till current epoch then fetch all subsequent headers. (no skeleton) +} else { + fetch headers using the skeleton approach, until no more skeleton headers + are returned then switch to requesting all subsequent headers from the + peer. +} + + +Wait for headers to be received. + +Pass the received headers to the processHeaders routine. + +If no more headers are returned and the pivot state has been fully synced then +exit. (The pivot being synced is communicated via an atomic from +processFastSyncContent) + +Fetch more headers as done to start with. + +processHeaders + +Waits to receive headers from fetchHeaders inserts the received headers into the header chain. + +If full sync { + request blocks for inserted headers. (fetchBodies) +} +If fast sync { + request blocks and receipts for inserted headers. (fetchBodies & fetchReceipts) +} + +processFastSyncContent + +Reads fetch results (each fetch result has all the data required for a block +(header txs, receipts, randomnes & epochSnarkData)from the downloader queue. + +Updates the pivot block point if it has fallen sufficiently behind head. + +Splits the fetch results around the pivot. + +Results before the pivot are inserted with BlockChain.InsertReceiptChain (which +inserts receipts, because in fast sync most blocks are not processed) and those +after the pivot + +If the pivot has completed syncing { + Inserts the results after the pivot with, BlockChain.InsertChain and exits. +} else { + Start the process again prepending the results after the pivot point to the + newly fetched results. (Note that if the pivot point is subsequently + updated those results will be processed as fast sync results and inserted + via BlockChain.InsertReceiptChain, but there seems to be a problem with our + current implementation that means that the pivot would have to get 2 days + old before it would be updated, so actually it looks like the list of + result s will grow a lot during this time could be an OOM consideration) +} + + +fetchBodies + +A routine that gets notified of bodies to fetch and calls into a beast of a +function (fetchParts) to fetch batches of block bodies from different peers, +those bodies are delivered to the queue that collates them along with other +delivered data into fetch results that are then retrieved by either +processFastSyncContent or processFullSyncContent. + +fetchReceipts + +like fetchBodies but for receipts. +*/ +package downloader From 6e8588c979e9505f68af63d2d1b9d333a9aca7bd Mon Sep 17 00:00:00 2001 From: piersy Date: Tue, 17 Jan 2023 15:43:18 +0000 Subject: [PATCH 09/18] Ensure RoundStateDB is closed when core is stopped (#1996) Prior to this change the RoundStateDB was never closed. This could result in leaked goroutines from its internal leveldb instance. This change caused the TestStartStopValidators e2e test to fail because changing the rsdb open to be in the startup code, slowed down the start method for core this caused the gossiping of the manually added peers (done in the test after starting each previously stopped node )to happen after the validator peer handler had removed all the peers resulting in gossiping certs to no one. Thus leaving the network in a disconnected state. The fix was really hacky, but just to wait 250ms after starting a node and hoping that the validator peer handler will have removed nodes by that point and then add the peers and then wait a little for them to be registered and then finally gossip to them. Co-authored-by: Paul Lange --- consensus/istanbul/core/core.go | 5 ----- consensus/istanbul/core/handler.go | 10 ++++++++-- e2e_test/e2e_test.go | 16 ++++++++++++++++ miner/worker.go | 5 ++++- 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/consensus/istanbul/core/core.go b/consensus/istanbul/core/core.go index a6a02879db..7116763572 100644 --- a/consensus/istanbul/core/core.go +++ b/consensus/istanbul/core/core.go @@ -152,10 +152,6 @@ type core struct { // New creates an Istanbul consensus core func New(backend CoreBackend, config *istanbul.Config) Engine { - rsdb, err := newRoundStateDB(config.RoundStateDBPath, nil) - if err != nil { - log.Crit("Failed to open RoundStateDB", "err", err) - } c := &core{ config: config, @@ -167,7 +163,6 @@ func New(backend CoreBackend, config *istanbul.Config) Engine { pendingRequests: prque.New(nil), pendingRequestsMu: new(sync.Mutex), consensusTimestamp: time.Time{}, - rsdb: rsdb, consensusPrepareTimeGauge: metrics.NewRegisteredGauge("consensus/istanbul/core/consensus_prepare", nil), consensusCommitTimeGauge: metrics.NewRegisteredGauge("consensus/istanbul/core/consensus_commit", nil), verifyGauge: metrics.NewRegisteredGauge("consensus/istanbul/core/verify", nil), diff --git a/consensus/istanbul/core/handler.go b/consensus/istanbul/core/handler.go index ed1ed6b9e1..3482e82e15 100644 --- a/consensus/istanbul/core/handler.go +++ b/consensus/istanbul/core/handler.go @@ -22,11 +22,16 @@ import ( "github.com/celo-org/celo-blockchain/common" "github.com/celo-org/celo-blockchain/common/hexutil" "github.com/celo-org/celo-blockchain/consensus/istanbul" + "github.com/celo-org/celo-blockchain/log" ) // Start implements core.Engine.Start func (c *core) Start() error { - + rsdb, err := newRoundStateDB(c.config.RoundStateDBPath, nil) + if err != nil { + log.Crit("Failed to open RoundStateDB", "err", err) + } + c.rsdb = rsdb roundState, err := c.createRoundState() if err != nil { return err @@ -63,10 +68,11 @@ func (c *core) Stop() error { // Make sure the handler goroutine exits c.handlerWg.Wait() + err := c.rsdb.Close() c.currentMu.Lock() defer c.currentMu.Unlock() c.current = nil - return nil + return err } // ---------------------------------------------------------------------------- diff --git a/e2e_test/e2e_test.go b/e2e_test/e2e_test.go index 2282cd4cdf..5d528b267e 100644 --- a/e2e_test/e2e_test.go +++ b/e2e_test/e2e_test.go @@ -196,6 +196,14 @@ func TestStartStopValidators(t *testing.T) { err = network[2].Start() require.NoError(t, err) + // We need to wait here to allow the call to "Backend.RefreshValPeers" to + // complete before adding peers. This is because "Backend.RefreshValPeers" + // deletes all peers and then re-adds any peers from the cached + // connections, but in the case that peers were recently added there may + // not have been enough time to connect to them and populate the connection + // cache, and in that case "Backend.RefreshValPeers" simply removes all the + // peers. + time.Sleep(250 * time.Millisecond) // Connect last stopped node to running nodes network[2].AddPeers(network[:2]...) time.Sleep(25 * time.Millisecond) @@ -221,6 +229,14 @@ func TestStartStopValidators(t *testing.T) { err = network[3].Start() require.NoError(t, err) + // We need to wait here to allow the call to "Backend.RefreshValPeers" to + // complete before adding peers. This is because "Backend.RefreshValPeers" + // deletes all peers and then re-adds any peers from the cached + // connections, but in the case that peers were recently added there may + // not have been enough time to connect to them and populate the connection + // cache, and in that case "Backend.RefreshValPeers" simply removes all the + // peers. + time.Sleep(250 * time.Millisecond) // Connect final node to rest of network network[3].AddPeers(network[:3]...) time.Sleep(25 * time.Millisecond) diff --git a/miner/worker.go b/miner/worker.go index 1a7180140e..80fd24f62d 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -240,7 +240,10 @@ func (w *worker) stop() { atomic.StoreInt32(&w.running, 0) if istanbul, ok := w.engine.(consensus.Istanbul); ok { - istanbul.StopValidating() + err := istanbul.StopValidating() + if err != nil { + log.Error("Error while calling engine.StopValidating", "err", err) + } } } From 3dbe121a6a1a02f1b84cfebc1e8470f174900d9f Mon Sep 17 00:00:00 2001 From: Paul Lange Date: Thu, 19 Jan 2023 15:57:41 +0100 Subject: [PATCH 10/18] fix #1927: upgrade btcd (#1990) * fix #1927: upgrade btcd * ci: Skip ios build tasks Co-authored-by: Viktor Stanchev --- .circleci/config.yml | 54 +++---- crypto/signature_nocgo.go | 70 ++++++--- go.mod | 5 +- go.sum | 193 +++---------------------- mycelo/hdwallet/hdwallet.go | 4 +- tests/fuzzers/secp256k1/secp_fuzzer.go | 2 +- 6 files changed, 109 insertions(+), 219 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 177fc3045b..30f693c00c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -500,31 +500,31 @@ jobs: # paths: # - geth/build/bin/geth.aar - ios: - macos: - xcode: "12.5.1" - working_directory: ~/repos/geth - steps: - # Note the macos executor does not seem to be able to restore caches. - - *shallow-checkout - - run: - name: Setup Go language - command: | - brew install go@1.16 - brew link go@1.16 - # Check that homebrew installed the expected go version - if [[ "$(go version)" != "go version go1.16"* ]]; then - echo "go1.16 is required" - exit 1 - fi - - run: - name: Compile ios client - command: make ios - - persist_to_workspace: - root: ~/repos - paths: - - geth/build/bin/Geth.framework.tgz - - geth/libbls_snark_sys.a + # ios: + # macos: + # xcode: "12.5.1" + # working_directory: ~/repos/geth + # steps: + # # Note the macos executor does not seem to be able to restore caches. + # - *shallow-checkout + # - run: + # name: Setup Go language + # command: | + # brew install go@1.16 + # brew link go@1.16 + # # Check that homebrew installed the expected go version + # if [[ "$(go version)" != "go version go1.16"* ]]; then + # echo "go1.16 is required" + # exit 1 + # fi + # - run: + # name: Compile ios client + # command: make ios + # - persist_to_workspace: + # root: ~/repos + # paths: + # - geth/build/bin/Geth.framework.tgz + # - geth/libbls_snark_sys.a lightest-sync-test: executor: golang @@ -623,8 +623,8 @@ workflows: requires: - go-modules - prepare-system-contracts - #- android - - ios + # - android + # - ios - lightest-sync-test: requires: - go-modules diff --git a/crypto/signature_nocgo.go b/crypto/signature_nocgo.go index fd1e66c7e6..3e48e51e84 100644 --- a/crypto/signature_nocgo.go +++ b/crypto/signature_nocgo.go @@ -24,37 +24,48 @@ import ( "crypto/elliptic" "errors" "fmt" - "math/big" - "github.com/btcsuite/btcd/btcec" + "github.com/btcsuite/btcd/btcec/v2" + btc_ecdsa "github.com/btcsuite/btcd/btcec/v2/ecdsa" ) // Ecrecover returns the uncompressed public key that created the given signature. func Ecrecover(hash, sig []byte) ([]byte, error) { - pub, err := SigToPub(hash, sig) + pub, err := sigToPub(hash, sig) if err != nil { return nil, err } - bytes := (*btcec.PublicKey)(pub).SerializeUncompressed() + bytes := pub.SerializeUncompressed() return bytes, err } -// SigToPub returns the public key that created the given signature. -func SigToPub(hash, sig []byte) (*ecdsa.PublicKey, error) { +func sigToPub(hash, sig []byte) (*btcec.PublicKey, error) { + if len(sig) != SignatureLength { + return nil, errors.New("invalid signature") + } // Convert to btcec input format with 'recovery id' v at the beginning. btcsig := make([]byte, SignatureLength) - btcsig[0] = sig[64] + 27 + btcsig[0] = sig[RecoveryIDOffset] + 27 copy(btcsig[1:], sig) - pub, _, err := btcec.RecoverCompact(btcec.S256(), btcsig, hash) - return (*ecdsa.PublicKey)(pub), err + pub, _, err := btc_ecdsa.RecoverCompact(btcsig, hash) + return pub, err +} + +// SigToPub returns the public key that created the given signature. +func SigToPub(hash, sig []byte) (*ecdsa.PublicKey, error) { + pub, err := sigToPub(hash, sig) + if err != nil { + return nil, err + } + return pub.ToECDSA(), nil } // Sign calculates an ECDSA signature. // // This function is susceptible to chosen plaintext attacks that can leak // information about the private key that is used for signing. Callers must -// be aware that the given hash cannot be chosen by an adversery. Common +// be aware that the given hash cannot be chosen by an adversary. Common // solution is to hash any input before calculating the signature. // // The produced signature is in the [R || S || V] format where V is 0 or 1. @@ -65,14 +76,20 @@ func Sign(hash []byte, prv *ecdsa.PrivateKey) ([]byte, error) { if prv.Curve != btcec.S256() { return nil, fmt.Errorf("private key curve is not secp256k1") } - sig, err := btcec.SignCompact(btcec.S256(), (*btcec.PrivateKey)(prv), hash, false) + // ecdsa.PrivateKey -> btcec.PrivateKey + var priv btcec.PrivateKey + if overflow := priv.Key.SetByteSlice(prv.D.Bytes()); overflow || priv.Key.IsZero() { + return nil, fmt.Errorf("invalid private key") + } + defer priv.Zero() + sig, err := btc_ecdsa.SignCompact(&priv, hash, false) // ref uncompressed pubkey if err != nil { return nil, err } // Convert to Ethereum signature format with 'recovery id' v at the end. v := sig[0] - 27 copy(sig, sig[1:]) - sig[64] = v + sig[RecoveryIDOffset] = v return sig, nil } @@ -83,13 +100,20 @@ func VerifySignature(pubkey, hash, signature []byte) bool { if len(signature) != 64 { return false } - sig := &btcec.Signature{R: new(big.Int).SetBytes(signature[:32]), S: new(big.Int).SetBytes(signature[32:])} - key, err := btcec.ParsePubKey(pubkey, btcec.S256()) + var r, s btcec.ModNScalar + if r.SetByteSlice(signature[:32]) { + return false // overflow + } + if s.SetByteSlice(signature[32:]) { + return false + } + sig := btc_ecdsa.NewSignature(&r, &s) + key, err := btcec.ParsePubKey(pubkey) if err != nil { return false } // Reject malleable signatures. libsecp256k1 does this check but btcec doesn't. - if sig.S.Cmp(secp256k1halfN) > 0 { + if s.IsOverHalfOrder() { return false } return sig.Verify(hash, key) @@ -100,16 +124,26 @@ func DecompressPubkey(pubkey []byte) (*ecdsa.PublicKey, error) { if len(pubkey) != 33 { return nil, errors.New("invalid compressed public key length") } - key, err := btcec.ParsePubKey(pubkey, btcec.S256()) + key, err := btcec.ParsePubKey(pubkey) if err != nil { return nil, err } return key.ToECDSA(), nil } -// CompressPubkey encodes a public key to the 33-byte compressed format. +// CompressPubkey encodes a public key to the 33-byte compressed format. The +// provided PublicKey must be valid. Namely, the coordinates must not be larger +// than 32 bytes each, they must be less than the field prime, and it must be a +// point on the secp256k1 curve. This is the case for a PublicKey constructed by +// elliptic.Unmarshal (see UnmarshalPubkey), or by ToECDSA and ecdsa.GenerateKey +// when constructing a PrivateKey. func CompressPubkey(pubkey *ecdsa.PublicKey) []byte { - return (*btcec.PublicKey)(pubkey).SerializeCompressed() + // NOTE: the coordinates may be validated with + // btcec.ParsePubKey(FromECDSAPub(pubkey)) + var x, y btcec.FieldVal + x.SetByteSlice(pubkey.X.Bytes()) + y.SetByteSlice(pubkey.Y.Bytes()) + return btcec.NewPublicKey(&x, &y).SerializeCompressed() } // S256 returns an instance of the secp256k1 curve. diff --git a/go.mod b/go.mod index 420b7fa275..f5a5ba0304 100644 --- a/go.mod +++ b/go.mod @@ -12,8 +12,9 @@ require ( github.com/aws/aws-sdk-go-v2/config v1.1.1 github.com/aws/aws-sdk-go-v2/credentials v1.1.1 github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1 - github.com/btcsuite/btcd v0.20.1-beta - github.com/btcsuite/btcutil v1.0.2 + github.com/btcsuite/btcd v0.23.1 + github.com/btcsuite/btcd/btcec/v2 v2.1.3 + github.com/btcsuite/btcd/btcutil v1.1.1 github.com/buraksezer/consistent v0.0.0-20191006190839-693edf70fd72 github.com/celo-org/celo-bls-go v0.3.3 github.com/cespare/cp v0.1.0 diff --git a/go.sum b/go.sum index 26881272b7..8446e89223 100644 --- a/go.sum +++ b/go.sum @@ -7,24 +7,16 @@ cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxK cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.51.0 h1:PvKAVQWCtlGUSlZkGW3QLelKaWq7KYv/MW1EboG8bfM= cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0 h1:sAbMqjY1PEQKZBWfbu6Y6bsupJ9c4QdHnzg/VvYTLcE= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigtable v1.2.0 h1:F4cCmA4nuV84V5zYQ3MKY+M1Cw1avHDuf3S/LcZPA9c= cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= -cloud.google.com/go/datastore v1.0.0 h1:Kt+gOPPp2LEPWp8CSfxhsM8ik9CcyE/gYu+0r+RnZvM= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0 h1:9/vpR43S4aJaROxqQHQ3nH9lfyKKV0dC3vOmnw8ebQQ= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0 h1:RPUcBvDeYgQFMfQu1eBMq6piD1SXmLH+vK3qjewZPus= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -collectd.org v0.3.0 h1:iNBHGw1VvPJxH2B6RiFWFZ+vsjo1lCdRszBeOuwGi00= collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0-alpha.2 h1:EWbZLqGEPSIj2W69gx04KtNVkyPIfe3uj0DhDQJonbQ= filippo.io/edwards25519 v1.0.0-alpha.2/go.mod h1:X+pm78QAUPtFLi1z9PYIlS/bdDnvbCOGKtZ+ACWEf7o= @@ -49,31 +41,21 @@ github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1Gn github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DATA-DOG/go-sqlmock v1.3.3 h1:CWUqKXe0s8A2z6qCgkP4Kru7wC11YoAnoupUKFDnH08= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= -github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= -github.com/aead/siphash v1.0.1 h1:FwHfE/T45KPKYuuSAKyyvE+oPWcaQ+CUmFW0bPlM+kg= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= -github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af h1:wVe6/Ea46ZMeNkQjjBW6xcqyQA/j5e0D6GytH95g0gQ= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc h1:cAKDfWh5VpdgMhJosfJnn5/FoN2SRZ4p7fJNX58YPaU= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf h1:qet1QNfXsQxTZqLG4oE62mJzwPIB8+Tee4RNCL9ulrY= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db h1:nxAtV4VajJDhKysp2kdcJZsq8Ss1xSA0vZTkVHHJd0E= github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= github.com/aws/aws-sdk-go-v2 v1.2.0 h1:BS+UYpbsElC82gB+2E2jiCBg36i8HlubTB/dO/moQ9c= github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= @@ -94,32 +76,35 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxq github.com/aws/smithy-go v1.1.0 h1:D6CSsM3gdxaGaqXnPgOBCeL6Mophqzu7KJOu7zW78sU= github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40 h1:y4B3+GPxKlrigF1ha5FFErxK+sr6sWxQovRMzwMhejo= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= -github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= -github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo= +github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M= +github.com/btcsuite/btcd v0.23.1 h1:IB8cVQcC2X5mHbnfirLG5IZnkWYNTPlLZVrxUYSotbE= +github.com/btcsuite/btcd v0.23.1/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY= +github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v56E48Vt0Y/umPgA= +github.com/btcsuite/btcd/btcec/v2 v2.1.1/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= +github.com/btcsuite/btcd/btcec/v2 v2.1.3 h1:xM/n3yIhHAhHy04z4i43C8p4ehixJZMsnrVJkgl+MTE= +github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= +github.com/btcsuite/btcd/btcutil v1.0.0/go.mod h1:Uoxwv0pqYWhD//tfTiipkxNfdhG9UrLwaeswfjfdF0A= +github.com/btcsuite/btcd/btcutil v1.1.0/go.mod h1:5OapHB7A2hBBWLm48mmw4MOHNJCcUBTwmWH/0Jn8VHE= +github.com/btcsuite/btcd/btcutil v1.1.1 h1:hDcDaXiP0uEzR8Biqo2weECKqEw0uHDZ9ixIWevVQqY= +github.com/btcsuite/btcd/btcutil v1.1.1/go.mod h1:nbKlBMNm9FGsdvKvu0essceubPiAcI57pYBNnsLAa34= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts= -github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= -github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd h1:R/opQEbFEy9JGkIguV40SvRY1uliPX8ifOvi6ICsFCw= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= -github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd h1:qdGvebPBDuYDPGi1WCPjy1tGyMpmDK8IEapSsszn7HE= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= -github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723 h1:ZA/jbKoGcVAnER6pCHPEkGdZOV7U1oLUedErBHCUMs0= +github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= -github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 h1:R8vQdOQdZ9Y3SkEwmHoWBmX1DNXhXZqlTpq6s4tyJGc= +github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= -github.com/btcsuite/winsvc v1.0.0 h1:J9B4L7e3oqhXOcm+2IuNApwzQec85lE+QaikUcCs+dk= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/buraksezer/consistent v0.0.0-20191006190839-693edf70fd72 h1:fUmDBbSvv1uOzo/t8WaxZMVb7BxJ8JECo5lGoR9c5bA= github.com/buraksezer/consistent v0.0.0-20191006190839-693edf70fd72/go.mod h1:OEE5igu/CDjGegM1Jn6ZMo7R6LlV/JChAkjfQQIRLpg= -github.com/c-bata/go-prompt v0.2.2 h1:uyKRz6Z6DUyj49QVijyM339UJV9yhbr70gESwbNU3e0= github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= github.com/celo-org/celo-bls-go v0.3.3 h1:kOkm/BeM0YwHWUTwSLprxhk1IFq/ZjaWVtW6jTZ0+ys= github.com/celo-org/celo-bls-go v0.3.3/go.mod h1:eoMAORYWgZ5HOo3Z0bIAv/nbPtj/eArIO0nh7XFx7rk= @@ -135,9 +120,7 @@ github.com/celo-org/celo-bls-go-other v0.3.2 h1:Onbcv1FkNl/1TfBI/AfedzTCGAlChOOP github.com/celo-org/celo-bls-go-other v0.3.2/go.mod h1:tNxZNfekzyT7TdYQbyNPhkfpcYtA3KCU/IKX5FNxM/U= github.com/celo-org/celo-bls-go-windows v0.3.2 h1:HpauxEhxeGedvsfZC4aBo8ADlNstihm1gKnVQMmdxuY= github.com/celo-org/celo-bls-go-windows v0.3.2/go.mod h1:82GC5iJA9Qw5gynhYqR8ht3J+l/MO8eSNzgSTMI8UdA= -github.com/celo-org/mobile v0.0.0-20210324213558-66ac87d7fb95 h1:X0tWCNjfHVI3NkXhfHPXdQA/Hdi4XexGDER9QPh3V9A= github.com/celo-org/mobile v0.0.0-20210324213558-66ac87d7fb95/go.mod h1:skQtrUTUwhdJvXM/2KKJzY8pDgNr9I/FOMqDVRPBUS4= -github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= @@ -145,25 +128,17 @@ github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cloudflare-go v0.14.0 h1:gFqGlGl/5f9UGXAaKapCGUfaTCgRKKnzu2VvzMZlOFA= github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= -github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572 h1:+R8G1+Ftumd0DaveLgMIjrFPcAS4G8MsVXWXiyZL5BY= github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f h1:C43yEtQ6NIf4ftFXD/V55gnGFgPbMQobd//YlnLjUJ8= github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c h1:/ovYnF02fwL0kvspmy9AuyKg1JhdTRUgPw4nUxd9oZM= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= -github.com/dave/jennifer v1.2.0 h1:S15ZkFMRoJ36mGAQgWL1tnr0NQJh9rZ8qatseX/VbBc= github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -171,14 +146,17 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea h1:j4317fAZh7X6GqbFowYdYdI0L9bwxL07jyPZIdepyZ0= github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= +github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= +github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= +github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= github.com/deepmap/oapi-codegen v1.8.2 h1:SegyeYGcdi0jLLrpbCMoJxnUUn8GBXHsvr4rbzjuhfU= github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8 h1:akOQj8IVgoeFfBTzGOEQakCYshWD6RNo1M5pivFXt70= github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954 h1:RMLoZVzv4GliuWafOuPuQDKSm1SJph7uCRnnS61JAn4= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dlclark/regexp2 v1.2.0 h1:8sAhBGEM0dRWogWqWyQeIJnxjWO6oIjl8FKqREDsGfk= github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= @@ -186,35 +164,24 @@ github.com/docker/docker v1.6.1 h1:4xYASHy5cScPkLD7PO0uTmnVc860m9NarPN1X8zeMe8= github.com/docker/docker v1.6.1/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/dop251/goja v0.0.0-20200721192441-a695b0cdd498 h1:Y9vTBSsV4hSwPSj4bacAU/eSnV3dAxVpepaghAdhGoQ= github.com/dop251/goja v0.0.0-20200721192441-a695b0cdd498/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= -github.com/eclipse/paho.mqtt.golang v1.2.0 h1:1F8mhG9+aO5/xpdtFkW4SxOJB67ukuDC3t2y2qayIX0= github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473 h1:4cmBvAEBNJaGARUEs3/suWRyfyBfhf7I60WBZq+bv2w= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= -github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90 h1:WXb3TSNmHp2vHoCroCIB1foO/yQ36swABL8aOVeDpgg= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= -github.com/getkin/kin-openapi v0.61.0 h1:6awGqF5nG5zkVpMsAih1QH4VgzS8phTxECUWIFo7zko= github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd h1:r04MMPyLHj/QwZuMJ5+7tJcBr1AQjpiAK/rZWRrQT7o= github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= -github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31 h1:gclg6gY70GLy3PbkQ1AERPfmLMMagS60DKF78eWwLn8= github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= -github.com/go-chi/chi/v5 v5.0.0 h1:DBPx88FjZJH3FsICfDAfIfnb7XxKIYVGG6lOPlhENAg= github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72 h1:b+9H1GAsx5RsjvDFLoS5zkNBzIQMuVKUYQDmxU3N5XE= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0 h1:Wz+5lgoB0kkuqLEc6NVmwRknTKP6dTGbSqvhZtBI/j0= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= @@ -223,33 +190,23 @@ github.com/go-logfmt/logfmt v0.4.0 h1:MP4Eh7ZCb31lleYCFuwm0oe4/YGak+5l1vA2NOE80n github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-ole/go-ole v1.2.5 h1:t4MGB5xEDZvXI+0rMjjsfBsD7yAgp/s9ZDkL1JndXwY= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-sourcemap/sourcemap v2.1.2+incompatible h1:0b/xya7BKGhXuqFESKM4oIiRo9WOt2ebz7KxfreD6ug= github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= -github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gofrs/uuid v3.3.0+incompatible h1:8K4tyRfvU1CYPgJsveYFQMhpFd/wXNM7iK6rR7UHz84= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= -github.com/golang/geo v0.0.0-20190916061304-5b978397cfec h1:lJwO/92dFXWeXOZdoGXgptLmNLwynMSHUmU6besqtiw= github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 h1:5ZkaAPbicIKTF2I64qf5Fh8Aa83Q/dnOafMYV0OMwjA= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1 h1:qGJ6qTW+x6xX/my+8YUVl4WNpX9B7+/l2tRsHGZ7f2s= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -266,12 +223,9 @@ github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8l github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219 h1:utua3L2IbQJmauC5IXdEA547bcoU5dozgQAfc8Onsg4= github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/flatbuffers v1.11.0 h1:O7CEyB8Cb3/DmtxODGtLHcEvpr81Jm5qLg/hsHnxA2A= github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -282,22 +236,16 @@ github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa h1:Q75Upo5UN4JbPFURXZ8nLKYUvF85dyFRop/vQ0Rv+64= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc h1:DLpL8pWq0v4JYoRpEhDfsJhhJyGKCcQM2WPW2TJs31c= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.5 h1:kxhtnfFVi+rYdOALN0B3k9UT86zVJKfBimRaciULW4I= github.com/google/uuid v1.1.5/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -315,105 +263,72 @@ github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZ github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM= github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huin/goupnp v1.0.2 h1:RfGLP+h3mvisuWEyybxNq5Eft3NWhHLPeUN72kpKZoI= github.com/huin/goupnp v1.0.2/go.mod h1:0dxJBVBHqTMjIUMkESDTNgOOx/Mw5wYIfyFmdzSamkM= -github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150 h1:vlNjIqmUZ9CMAWsbURYl3a6wZbw7q5RHVvlXTNS/Bs8= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6 h1:UDMh68UUwekSh5iP2OMhRRZJiiBccgV7axzUG8vi56c= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/flux v0.65.1 h1:77BcVUCzvN5HMm8+j9PRBQ4iZcu98Dl4Y9rf+J5vhnc= github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY= github.com/influxdata/influxdb v1.8.3 h1:WEypI1BQFTT4teLM+1qkEcvUi0dAvopAI/ir0vAiBg8= github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= github.com/influxdata/influxdb-client-go/v2 v2.4.0 h1:HGBfZYStlx3Kqvsv1h2pJixbCl/jhnFtxpKFAv9Tu5k= github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= -github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385 h1:ED4e5Cc3z5vSN2Tz2GkOHN7vs4Sxe2yds6CXvDnvZFE= github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097 h1:vilfsDSy7TDxedi9gyBkMvAirat/oRcL0lFdJBf6tdM= github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= -github.com/influxdata/promql/v2 v2.12.0 h1:kXn3p0D7zPw16rOtfDR+wo6aaiH8tSMfhPwONTxrlEc= github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8= -github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6 h1:UzJnB7VRL4PSkUJHwsyzseGOmrO/r4yA+AuxGJxiZmA= github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= -github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9 h1:MHTrDWmQpHq/hkq+7cw9oYAt2PqUw52TZazRA0N7PGE= github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= -github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368 h1:+TUUmaFa4YD1Q+7bH9o5NCHQGPMqZCYJiNW6lIIS9z4= github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458 h1:6OvNmYgJyexcZ3pYbTI9jWx5tHo1Dee/tWbLMfPe2TA= github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e h1:UvSe12bq+Uj2hWd8aOlwPmoZ+CITRFrdit+sDGfAg8U= github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= -github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89 h1:12K8AlpT0/6QUXSfV0yi4Q0jkbq8NDtIKFtF61AoqV0= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jrick/logrotate v1.0.0 h1:lQ1bL/n9mBNeIXoTUoYRlK4dHuNJVofX9oWqBtPnSzI= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= -github.com/json-iterator/go v1.1.6 h1:MrUvLMLTMxbqFJ9kzlvat/rYZqZnW3u4wkLzWTaFwKs= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jsternberg/zap-logfmt v1.0.0 h1:0Dz2s/eturmdUS34GM82JwNEdQ9hPoJgqptcEKcbpzY= github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0 h1:TDTW5Yz1mjftljbcKqRcrYhd4XeOoI98t+9HbQbYf7g= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5 h1:PJr+ZMXIecYc1Ey2zucXdR73SMBtgjPgwa31099IMv0= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef h1:2jNeR4YUziVtswNP9sEFAI913cVrzH85T+8Q6LpYbT0= github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356 h1:I/yrLt2WilKxlQKCM52clh5rGzTKpVctGT1lH4Dc8Jw= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= -github.com/kisielk/errcheck v1.2.0 h1:reN85Pxc5larApoH1keMBiu2GWtPqXQ1nc9gx+jOU+E= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= -github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23 h1:FOOIBWrEkLgmlgGfMuZT83xIwfPDxEI2OHu6xUmJMFE= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= -github.com/klauspost/compress v1.4.0 h1:8nsMz3tWa9SWWPL60G1V6CUsf4lLjWLTNEtibhe8gh8= github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5 h1:2U0HzY8BJ8hVwDKIzp7y4voR9CX/nvcfymLmg2UiOio= github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6 h1:KAZ1BW2TCmT6PRihDPpocIy1QTtsAsrx6TneU/4+CMg= github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= -github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada h1:3L+neHp83cTjegPdCiOxVOJtRIy7/8RldvMTsyPYH10= github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= -github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/labstack/echo/v4 v4.2.1 h1:LF5Iq7t/jrtUuSutNuiEWtB5eiHfZ5gSe2pcu5exjQw= github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= -github.com/labstack/gommon v0.3.0 h1:JEeO0bvc78PKdyHxloTKiF8BD5iGrH8T6MSeGvSgob0= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= -github.com/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczGlG91VSDkswnjF5A8= github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd h1:HvFwW+cm9bCbZ/+vuGNq7CRWXql8c0y8nGeYpqmpvmk= github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -431,23 +346,16 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-sqlite3 v1.11.0 h1:LDdKkqtYlom37fkvqs8rMPFKAMe8+SgjbwZ6ex1/A/Q= github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104 h1:d8RFOZ2IiFtFWBcKEHAFYJcPTf0wY5q0exFNJZVWa1U= github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae h1:VeRdUYdCw49yizlSbMEn2SZ+gT+3IUKx8BqxyQdz+BY= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223 h1:F9x/1yl3T2AeKLr2AMdilSD8+f9bvMnNN8VS5iDtovc= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= @@ -455,7 +363,6 @@ github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 h1:shk/vn9oCoOTmwcou github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= @@ -464,6 +371,7 @@ github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= @@ -472,76 +380,54 @@ github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFSt github.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/paulbellamy/ratecounter v0.2.0 h1:2L/RhJq+HA8gBQImDXtLPrDXK5qAj6ozWVK/zFXVJGs= github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 h1:oYW+YCJ1pachXTQmzR3rNLYGGz4g/UgFcjb28p/viDM= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= -github.com/philhofer/fwd v1.0.0 h1:UbZqGr5Y38ApvM/V/jEljVxwocdweyH+vmYvRPBnbqQ= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5 h1:tFwafIEMf0B7NlcxV/zJ6leBIa81D3hgGSgsE5hCkOQ= github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.6.0 h1:kRhiuYSXR3+uv2IbVbZhUxK5zVD/2pp3Gd2PpvPkpEo= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNGfs= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52 h1:RnWNS9Hlm8BIkjr6wx8li5abe0fr73jljLycdfemTp0= github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= github.com/rjeczalik/notify v0.9.1 h1:CLCKso/QK1snAlnhNR/CNvNiFU2saUtjV0bx3EwNeCE= github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= -github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= -github.com/segmentio/kafka-go v0.2.0 h1:HtCSf6B4gN/87yc5qTl7WsxPKQIIGXLPPM1bMCPOsoY= github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= -github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0 h1:juTguoYk5qI21pwyTXY3B3Y5cOTH3ZUyZCg1v/mihuo= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -552,7 +438,6 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= -github.com/tinylib/msgp v1.0.2 h1:DfdQrzQa7Yh2es9SuLkixqxuXS2SxsdYn0KbdrOGWD8= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tklauser/go-sysconf v0.3.5 h1:uu3Xl4nkLzQfXNsWn15rPc/HQCJKObbt1dKJeWp3vU4= github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= @@ -560,28 +445,18 @@ github.com/tklauser/numcpus v0.2.2 h1:oyhllyrScuYI6g+h/zUvNXNp1wy7x8qQy3t/piefld github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef h1:wHSqTBrZW24CsNJDfeh9Ex6Pm0Rcpc7qrgKBiL44vF4= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= -github.com/urfave/cli/v2 v2.3.0 h1:qph92Y649prgesehzOrQjdWyxFOp/QVM+6imKHad91M= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= -github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52WA1u4= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/willf/bitset v1.1.3 h1:ekJIKh6+YbUIVt9DfNbkR5d6aFcFTLDRyJNAACURBg8= github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= -github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6 h1:YdYsPAZ2pC6Tow/nPZOPQ96O3hm/ToAkGsPLzedXERk= github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= -github.com/yuin/goldmark v1.2.1 h1:ruQGxdhGHe7FWOJPT0mKs5+pD2Xs1Bm/kdGlHO04FmM= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.9.1 h1:XCJQEf3W6eZaVwhRBof6ImoYGJSITeKWsyeh3HFu/5o= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -590,7 +465,6 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= @@ -605,11 +479,9 @@ golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9t golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299 h1:zQpM52jfKHG6II1ISZY1ZcpygvuSFZpLwfluuF89XOg= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -618,15 +490,14 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f h1:J5lckAjkw6qYlOZNj90mLYNTEKDvWeuc1yieZ8qUzUE= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191209134235-331c550502dd/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -655,7 +526,6 @@ golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAG golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -707,7 +577,6 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912 h1:uCLL3g5wH2xjxVREVuAbP9JM5PPKjRbXKRa6IBjkzmU= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -749,7 +618,6 @@ golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117012304-6edc0a871e69/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.1.0 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -758,12 +626,9 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1N golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.6.0 h1:DJy6UzXbahnGUf1ujUNkh/NEtK14qMo2nvlBPs4U5yw= gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0 h1:OE9mWmgKkjJyEmDAAtGMPjXu+YNeGvK9VTSHY6+Qihc= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b h1:Qh4dB5D/WpoUUp3lSod7qgoyEHbDGPUWjIbnqdqqe1k= gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -771,13 +636,11 @@ google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEn google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0 h1:yzlyyDW/J0w8yNFJIhiAJy4kq74S+1DOLdawELNxFMA= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -792,13 +655,11 @@ google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvx google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f h1:2wh8dWY8959cBGQvk1RD+/eQBgRYYDaZ+hT0/zsARoA= google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -807,14 +668,11 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= @@ -841,9 +699,6 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.1.3 h1:qTakTkI6ni6LFD5sBwwsdSO+AQqbSIxOauHTTQKZ/7o= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= -rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/pdf v0.1.1 h1:k1MczvYDUvJBe93bYd7wrZLLUEcLZAuF824/I4e5Xr4= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/mycelo/hdwallet/hdwallet.go b/mycelo/hdwallet/hdwallet.go index 7e83fd4867..bd4f707a23 100644 --- a/mycelo/hdwallet/hdwallet.go +++ b/mycelo/hdwallet/hdwallet.go @@ -10,8 +10,8 @@ import ( "math/big" "sync" + "github.com/btcsuite/btcd/btcutil/hdkeychain" "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcutil/hdkeychain" ethereum "github.com/celo-org/celo-blockchain" "github.com/celo-org/celo-blockchain/accounts" "github.com/celo-org/celo-blockchain/common" @@ -493,7 +493,7 @@ func (w *Wallet) derivePrivateKey(path accounts.DerivationPath) (*ecdsa.PrivateK var err error key := w.masterKey for _, n := range path { - key, err = key.Child(n) + key, err = key.Derive(n) if err != nil { return nil, err } diff --git a/tests/fuzzers/secp256k1/secp_fuzzer.go b/tests/fuzzers/secp256k1/secp_fuzzer.go index ab9b54c69e..d41f2258a0 100644 --- a/tests/fuzzers/secp256k1/secp_fuzzer.go +++ b/tests/fuzzers/secp256k1/secp_fuzzer.go @@ -21,7 +21,7 @@ package secp256k1 import ( "fmt" - "github.com/btcsuite/btcd/btcec" + "github.com/btcsuite/btcd/btcec/v2" "github.com/celo-org/celo-blockchain/crypto/secp256k1" fuzz "github.com/google/gofuzz" ) From bfc3f8334150295e1d20a81ef37f06acd0f9dd30 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Jan 2023 16:09:57 +0100 Subject: [PATCH 11/18] Bump github.com/btcsuite/btcd from 0.20.1-beta to 0.23.2 (#1994) Bumps [github.com/btcsuite/btcd](https://github.com/btcsuite/btcd) from 0.20.1-beta to 0.23.2. - [Release notes](https://github.com/btcsuite/btcd/releases) - [Changelog](https://github.com/btcsuite/btcd/blob/master/CHANGES) - [Commits](https://github.com/btcsuite/btcd/compare/v0.20.1-beta...v0.23.2) --- updated-dependencies: - dependency-name: github.com/btcsuite/btcd dependency-type: direct:production ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f5a5ba0304..4acc91466b 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/aws/aws-sdk-go-v2/config v1.1.1 github.com/aws/aws-sdk-go-v2/credentials v1.1.1 github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1 - github.com/btcsuite/btcd v0.23.1 + github.com/btcsuite/btcd v0.23.2 github.com/btcsuite/btcd/btcec/v2 v2.1.3 github.com/btcsuite/btcd/btcutil v1.1.1 github.com/buraksezer/consistent v0.0.0-20191006190839-693edf70fd72 diff --git a/go.sum b/go.sum index 8446e89223..b27c70c1e2 100644 --- a/go.sum +++ b/go.sum @@ -81,8 +81,8 @@ github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+Wji github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M= -github.com/btcsuite/btcd v0.23.1 h1:IB8cVQcC2X5mHbnfirLG5IZnkWYNTPlLZVrxUYSotbE= -github.com/btcsuite/btcd v0.23.1/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY= +github.com/btcsuite/btcd v0.23.2 h1:/YOgUp25sdCnP5ho6Hl3s0E438zlX+Kak7E6TgBgoT0= +github.com/btcsuite/btcd v0.23.2/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY= github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v56E48Vt0Y/umPgA= github.com/btcsuite/btcd/btcec/v2 v2.1.1/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= github.com/btcsuite/btcd/btcec/v2 v2.1.3 h1:xM/n3yIhHAhHy04z4i43C8p4ehixJZMsnrVJkgl+MTE= From 1c196fef8c5679f8c1cb1cee115afe6037691bf9 Mon Sep 17 00:00:00 2001 From: piersy Date: Mon, 6 Feb 2023 07:56:41 +0000 Subject: [PATCH 12/18] Add clarifying note to ibft spec (#2001) The note explains why the protocol needs round change certificates and prepared certificates. --- consensus/istanbul/celo-ibft-spec.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/consensus/istanbul/celo-ibft-spec.md b/consensus/istanbul/celo-ibft-spec.md index 97b44c73d7..75b67fcaf4 100644 --- a/consensus/istanbul/celo-ibft-spec.md +++ b/consensus/istanbul/celo-ibft-spec.md @@ -448,3 +448,29 @@ function call to occur after the given duration. // to Hc and value equal to V is greater than 1 and less than 10. 1 < |{ m ∈ M : Rm = Hc && Vm = V }| < 10 ``` + +## Appendix 2: Notes + +### What do the prepared certificate and round change certificate do? + +They enforce that if it’s possible that a node could have confirmed a block in +a round, then all remaining nodes in future rounds can only confirm the same +block. + +- A node could have confirmed a block if 2f+1 nodes send commit messages for a + block. +- If a node sends a commit message for a block then it must have seen 2f+1 + prepares or commits for that block and therefore must have a prepared + certificate. +- Therefore there must be at least 2f+1 nodes with prepared certificates for a + block if 2f+1 nodes have sent commit messages for a block. +- When the proposer proposes in the next round they must provide a round change + certificate with 2f+1 round change messages. +- When nodes send round change messages they should include the prepared + certificate if they have one. +- So if 2f+1 nodes have prepared certificates then f nodes do not. +- If the proposer of the next round includes the f round change messages from + the nodes that do not have prepared certificates, and if there are a further + f byzantine nodes that do not include their prepared certificate even if they + had one, there still remains one round change message that must come from a + non byzantine node and must include a prepared certificate. From 967d0c15640efe78b1d8549915d5bd1e59c28257 Mon Sep 17 00:00:00 2001 From: Valentin Rodygin Date: Thu, 9 Feb 2023 17:27:38 +0100 Subject: [PATCH 13/18] Auto apply triage label (#2006) The 'triage' label is automatically applied to all incoming issues so that we can use workflow automation. --- .github/ISSUE_TEMPLATE/chore.md | 2 +- .github/ISSUE_TEMPLATE/design_task.md | 2 +- .github/ISSUE_TEMPLATE/feature.md | 4 ++-- .github/ISSUE_TEMPLATE/issue.md | 2 +- .github/ISSUE_TEMPLATE/question.md | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/chore.md b/.github/ISSUE_TEMPLATE/chore.md index 87722d277d..b189ecaa04 100644 --- a/.github/ISSUE_TEMPLATE/chore.md +++ b/.github/ISSUE_TEMPLATE/chore.md @@ -2,7 +2,7 @@ name: Simple Task about: Simple Actionable Task title: '' -labels: blockchain +labels: triage assignees: '' --- diff --git a/.github/ISSUE_TEMPLATE/design_task.md b/.github/ISSUE_TEMPLATE/design_task.md index d3e81e8106..a9b792efb3 100644 --- a/.github/ISSUE_TEMPLATE/design_task.md +++ b/.github/ISSUE_TEMPLATE/design_task.md @@ -2,7 +2,7 @@ name: Research/Design Task about: Research of design task title: '' -labels: blockchain, needs-research +labels: triage, needs-research assignees: '' --- diff --git a/.github/ISSUE_TEMPLATE/feature.md b/.github/ISSUE_TEMPLATE/feature.md index aacd885f9e..25d1177066 100644 --- a/.github/ISSUE_TEMPLATE/feature.md +++ b/.github/ISSUE_TEMPLATE/feature.md @@ -2,7 +2,7 @@ name: Request a feature about: Report a missing feature - e.g. as a step before submitting a PR title: '' -labels: 'type:feature' +labels: triage, 'type:feature' assignees: '' --- @@ -14,4 +14,4 @@ What are the use-cases? # Implementation Do you have ideas regarding the implementation of this feature? -Are you willing to implement this feature? \ No newline at end of file +Are you willing to implement this feature? diff --git a/.github/ISSUE_TEMPLATE/issue.md b/.github/ISSUE_TEMPLATE/issue.md index 9e19310049..0a1b43c79b 100644 --- a/.github/ISSUE_TEMPLATE/issue.md +++ b/.github/ISSUE_TEMPLATE/issue.md @@ -2,7 +2,7 @@ name: Issue about: Feature/Need/Problem complete template title: '' -labels: blockchain, needs-research +labels: triage, needs-research assignees: '' --- diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md index 8f460ab558..968b14bc81 100644 --- a/.github/ISSUE_TEMPLATE/question.md +++ b/.github/ISSUE_TEMPLATE/question.md @@ -2,7 +2,7 @@ name: Ask a question about: Something is unclear title: '' -labels: 'type:docs' +labels: triage, 'type:docs' assignees: '' --- From b39219192e6501737098b80678570d1bd95ebd5d Mon Sep 17 00:00:00 2001 From: Paul Lange Date: Thu, 9 Feb 2023 19:28:43 +0100 Subject: [PATCH 14/18] ci: Fix typo in sync test script (#2003) --- scripts/sync_test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/sync_test.sh b/scripts/sync_test.sh index bf4c6cb175..f0ebb0c9df 100755 --- a/scripts/sync_test.sh +++ b/scripts/sync_test.sh @@ -19,9 +19,9 @@ echo "Running geth sync" echo "-----------------" build/bin/geth --datadir $DATADIR --syncmode $MODE --exitwhensynced -echo "-------------------------------" -echo "Geth exited cheking sync status" -echo "-------------------------------" +echo "------------------------------------" +echo "Geth exited, checking sync status..." +echo "------------------------------------" # Now check what the latest block is ATTEMPTS=10 From dfa1abb90d7dd767e838125c7e7ebf44d045ce37 Mon Sep 17 00:00:00 2001 From: Karl Bartel Date: Mon, 13 Feb 2023 07:30:32 +0100 Subject: [PATCH 15/18] Update error msg when contracts are not made yet There is no `compiled-system-contracts` make target, but `make prepare-system-contracts` creates the necessary files. --- test/node.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/node.go b/test/node.go index 82c9a312e2..1a1aa4f060 100644 --- a/test/node.go +++ b/test/node.go @@ -365,7 +365,7 @@ func GenerateGenesis(accounts *env.AccountsConfig, gc *genesis.Config, contracts if err != nil { panic(fmt.Sprintf("failed to get abs path for %s, error: %v", contractsBuildPath, err)) } - return nil, fmt.Errorf("Could not find dir %s, try running 'make compiled-system-contracts' and then re-running the test", abs) + return nil, fmt.Errorf("Could not find dir %s, try running 'make prepare-system-contracts' and then re-running the test", abs) } return genesis.GenerateGenesis(accounts, gc, contractsBuildPath) From 78983db1a4eda44802fb857e9dad93bf62942c84 Mon Sep 17 00:00:00 2001 From: Gaston Ponti Date: Wed, 15 Feb 2023 12:00:14 -0300 Subject: [PATCH 16/18] Update core-contracts.v8 (#2010) Description Update the branch that we use to track the last deployed core contracts on Mainnet Other changes Fix mycelo to handle all the changes. Add GrandaMento contract that was added before but we missed --- monorepo_commit | 2 +- mycelo/contract/README.md | 6 + mycelo/contract/gen_abis.go | 6390 +++++++++++------ mycelo/env/core_contracts.go | 6 + mycelo/genesis/README.md | 5 + mycelo/genesis/base_config.go | 22 + mycelo/genesis/config.go | 27 + .../genesis/gen_governance_parameters_json.go | 32 +- .../gen_stable_token_exchange_limit_json.go | 49 + mycelo/genesis/genesis_state.go | 108 +- mycelo/internal/scripts/generate/main.go | 3 + 11 files changed, 4379 insertions(+), 2271 deletions(-) create mode 100644 mycelo/genesis/README.md create mode 100644 mycelo/genesis/gen_stable_token_exchange_limit_json.go diff --git a/monorepo_commit b/monorepo_commit index 3651e36397..f202f8e3ed 100644 --- a/monorepo_commit +++ b/monorepo_commit @@ -1 +1 @@ -gastonponti/core-contracts.v7-fix-v2 +gastonponti/core-contracts.v8-fix diff --git a/mycelo/contract/README.md b/mycelo/contract/README.md index 3720eadbf6..2c678b9559 100644 --- a/mycelo/contract/README.md +++ b/mycelo/contract/README.md @@ -1,6 +1,12 @@ To generate gen_abis.go run +Using the monorepo_commit file: +``` +go run ./mycelo/internal/scripts/generate -buildpath ./compiled-system-contracts +``` + +For a custom one: ``` go run ./mycelo/internal/scripts/generate -buildpath $CELO_MONOREPO/packages/protocol/build/contracts ``` \ No newline at end of file diff --git a/mycelo/contract/gen_abis.go b/mycelo/contract/gen_abis.go index f73ad2d7b1..2188aa4756 100644 --- a/mycelo/contract/gen_abis.go +++ b/mycelo/contract/gen_abis.go @@ -1,5 +1,5 @@ // Code generated by go generate; DO NOT EDIT. -// 2022-08-19 00:12:00.139851 -0300 -03 m=+0.320554251 +// 2023-02-14 09:28:52.792897 -0300 -03 m=+0.298628811 package contract import "github.com/celo-org/celo-blockchain/accounts/abi" @@ -1007,15 +1007,6 @@ func init() { "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "deletePaymentDelegation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [ @@ -8884,17 +8875,24 @@ func init() { { "indexed": true, "internalType": "address", - "name": "previousOwner", + "name": "trustedIssuer", "type": "address" - }, + } + ], + "name": "DefaultTrustedIssuerAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "trustedIssuer", "type": "address" } ], - "name": "OwnershipTransferred", + "name": "DefaultTrustedIssuerRemoved", "type": "event" }, { @@ -8903,11 +8901,17 @@ func init() { { "indexed": true, "internalType": "address", - "name": "registryAddress", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", "type": "address" } ], - "name": "RegistrySet", + "name": "OwnershipTransferred", "type": "event" }, { @@ -8990,6 +8994,38 @@ func init() { "name": "Transfer", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "paymentId", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "trustedIssuers", + "type": "address[]" + } + ], + "name": "TrustedIssuersSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "paymentId", + "type": "address" + } + ], + "name": "TrustedIssuersUnset", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -9027,6 +9063,42 @@ func init() { "name": "Withdrawal", "type": "event" }, + { + "constant": true, + "inputs": [], + "name": "MAX_TRUSTED_ISSUERS_PER_PAYMENT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "defaultTrustedIssuers", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [ @@ -9174,6 +9246,21 @@ func init() { "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IRegistry", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [], @@ -9214,29 +9301,40 @@ func init() { "inputs": [ { "internalType": "address", - "name": "registryAddress", + "name": "newOwner", "type": "address" } ], - "name": "setRegistry", + "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { "internalType": "address", - "name": "newOwner", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "trustedIssuersPerPayment", + "outputs": [ + { + "internalType": "address", + "name": "", "type": "address" } ], - "name": "transferOwnership", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -9269,16 +9367,45 @@ func init() { "stateMutability": "pure", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "address", - "name": "registryAddress", + "name": "trustedIssuer", "type": "address" } ], - "name": "initialize", + "name": "addDefaultTrustedIssuer", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "trustedIssuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "removeDefaultTrustedIssuer", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -9330,6 +9457,57 @@ func init() { "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes32", + "name": "identifier", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expirySeconds", + "type": "uint256" + }, + { + "internalType": "address", + "name": "paymentId", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minAttestations", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "trustedIssuers", + "type": "address[]" + } + ], + "name": "transferWithTrustedIssuers", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -9428,6 +9606,42 @@ func init() { "payable": false, "stateMutability": "view", "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "paymentId", + "type": "address" + } + ], + "name": "getTrustedIssuersPerPayment", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getDefaultTrustedIssuers", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" } ]`)// Exchange ABI abis["Exchange"] = mustParseABI(`[ @@ -11589,8 +11803,8 @@ func init() { "stateMutability": "pure", "type": "function" } - ]`)// FeeCurrencyWhitelist ABI - abis["FeeCurrencyWhitelist"] = mustParseABI(`[ + ]`)// FederatedAttestations ABI + abis["FederatedAttestations"] = mustParseABI(`[ { "inputs": [ { @@ -11606,31 +11820,130 @@ func init() { { "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "identifier", + "type": "bytes32" + }, { "indexed": true, "internalType": "address", - "name": "previousOwner", + "name": "issuer", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "account", "type": "address" - } - ], + }, + { + "indexed": false, + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "issuedOn", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "publishedOn", + "type": "uint64" + } + ], + "name": "AttestationRegistered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "identifier", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "issuedOn", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "publishedOn", + "type": "uint64" + } + ], + "name": "AttestationRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "eip712DomainSeparator", + "type": "bytes32" + } + ], + "name": "EIP712DomainSeparatorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], "name": "OwnershipTransferred", "type": "event" }, { "constant": true, "inputs": [], - "name": "initialized", + "name": "EIP712_OWNERSHIP_ATTESTATION_TYPEHASH", "outputs": [ { - "internalType": "bool", + "internalType": "bytes32", "name": "", - "type": "bool" + "type": "bytes32" } ], "payable": false, @@ -11640,12 +11953,12 @@ func init() { { "constant": true, "inputs": [], - "name": "isOwner", + "name": "MAX_ATTESTATIONS_PER_IDENTIFIER", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "payable": false, @@ -11655,12 +11968,12 @@ func init() { { "constant": true, "inputs": [], - "name": "owner", + "name": "MAX_IDENTIFIERS_PER_ADDRESS", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -11668,121 +11981,96 @@ func init() { "type": "function" }, { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, + "constant": true, "inputs": [ { "internalType": "address", - "name": "newOwner", + "name": "", "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, { "internalType": "uint256", "name": "", "type": "uint256" } ], - "name": "whitelist", + "name": "addressToIdentifiers", "outputs": [ { - "internalType": "address", + "internalType": "bytes32", "name": "", - "type": "address" + "type": "bytes32" } ], "payable": false, "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - } - ], - "name": "addToken", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], - "name": "getWhitelist", + "name": "eip712DomainSeparator", "outputs": [ { - "internalType": "address[]", + "internalType": "bytes32", "name": "", - "type": "address[]" + "type": "bytes32" } ], "payable": false, "stateMutability": "view", "type": "function" - } - ]`)// Freezer ABI - abis["Freezer"] = mustParseABI(`[ + }, { + "constant": true, "inputs": [ { - "internalType": "bool", - "name": "test", - "type": "bool" + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ + "name": "identifierToAttestations", + "outputs": [ { - "indexed": true, "internalType": "address", - "name": "previousOwner", + "name": "account", "type": "address" }, { - "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "signer", "type": "address" + }, + { + "internalType": "uint64", + "name": "issuedOn", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "publishedOn", + "type": "uint64" } ], - "name": "OwnershipTransferred", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { "constant": true, @@ -11801,14 +12089,8 @@ func init() { }, { "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "isFrozen", + "inputs": [], + "name": "isOwner", "outputs": [ { "internalType": "bool", @@ -11823,12 +12105,12 @@ func init() { { "constant": true, "inputs": [], - "name": "isOwner", + "name": "owner", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], "payable": false, @@ -11838,10 +12120,10 @@ func init() { { "constant": true, "inputs": [], - "name": "owner", + "name": "registryContract", "outputs": [ { - "internalType": "address", + "internalType": "contract IRegistry", "name": "", "type": "address" } @@ -11860,27 +12142,24 @@ func init() { "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "address", - "name": "newOwner", - "type": "address" + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "revokedAttestations", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "initialize", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -11888,101 +12167,1699 @@ func init() { "inputs": [ { "internalType": "address", - "name": "target", + "name": "newOwner", "type": "address" } ], - "name": "freeze", + "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "getVersionNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes32", + "name": "identifier", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint64", + "name": "issuedOn", + "type": "uint64" + } + ], + "name": "registerAttestationAsIssuer", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes32", + "name": "identifier", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "internalType": "uint64", + "name": "issuedOn", + "type": "uint64" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "registerAttestation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes32", + "name": "identifier", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeAttestation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "bytes32[]", + "name": "identifiers", + "type": "bytes32[]" + }, + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + } + ], + "name": "batchRevokeAttestations", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes32", + "name": "identifier", + "type": "bytes32" + }, + { + "internalType": "address[]", + "name": "trustedIssuers", + "type": "address[]" + } + ], + "name": "lookupAttestations", + "outputs": [ + { + "internalType": "uint256[]", + "name": "countsPerIssuer", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "signers", + "type": "address[]" + }, + { + "internalType": "uint64[]", + "name": "issuedOns", + "type": "uint64[]" + }, + { + "internalType": "uint64[]", + "name": "publishedOns", + "type": "uint64[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address[]", + "name": "trustedIssuers", + "type": "address[]" + } + ], + "name": "lookupIdentifiers", + "outputs": [ + { + "internalType": "uint256[]", + "name": "countsPerIssuer", + "type": "uint256[]" + }, + { + "internalType": "bytes32[]", + "name": "identifiers", + "type": "bytes32[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes32", + "name": "identifier", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "internalType": "uint64", + "name": "issuedOn", + "type": "uint64" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "validateAttestationSig", + "outputs": [], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes32", + "name": "identifier", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "internalType": "uint64", + "name": "issuedOn", + "type": "uint64" + } + ], + "name": "getUniqueAttestationHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + } + ]`)// FeeCurrencyWhitelist ABI + abis["FeeCurrencyWhitelist"] = mustParseABI(`[ + { + "inputs": [ + { + "internalType": "bool", + "name": "test", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "initialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isOwner", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "whitelist", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + } + ], + "name": "addToken", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getWhitelist", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ]`)// Freezer ABI + abis["Freezer"] = mustParseABI(`[ + { + "inputs": [ + { + "internalType": "bool", + "name": "test", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "initialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isFrozen", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isOwner", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "freeze", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "unfreeze", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ]`)// GasPriceMinimum ABI + abis["GasPriceMinimum"] = mustParseABI(`[ + { + "inputs": [ + { + "internalType": "bool", + "name": "test", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "adjustmentSpeed", + "type": "uint256" + } + ], + "name": "AdjustmentSpeedSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "gasPriceMinimumFloor", + "type": "uint256" + } + ], + "name": "GasPriceMinimumFloorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "gasPriceMinimum", + "type": "uint256" + } + ], + "name": "GasPriceMinimumUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "registryAddress", + "type": "address" + } + ], + "name": "RegistrySet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "targetDensity", + "type": "uint256" + } + ], + "name": "TargetDensitySet", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "adjustmentSpeed", + "outputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "gasPriceMinimum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "gasPriceMinimumFloor", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "initialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isOwner", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "contract IRegistry", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "registryAddress", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "targetDensity", + "outputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getVersionNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_registryAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_gasPriceMinimumFloor", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_targetDensity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_adjustmentSpeed", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "_adjustmentSpeed", + "type": "uint256" + } + ], + "name": "setAdjustmentSpeed", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "_targetDensity", + "type": "uint256" + } + ], + "name": "setTargetDensity", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "_gasPriceMinimumFloor", + "type": "uint256" + } + ], + "name": "setGasPriceMinimumFloor", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + } + ], + "name": "getGasPriceMinimum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "blockGasTotal", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockGasLimit", + "type": "uint256" + } + ], + "name": "updateGasPriceMinimum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "blockGasTotal", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockGasLimit", + "type": "uint256" + } + ], + "name": "getUpdatedGasPriceMinimum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ]`)// GoldToken ABI + abis["GoldToken"] = mustParseABI(`[ + { + "inputs": [ + { + "internalType": "bool", + "name": "test", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "registryAddress", + "type": "address" + } + ], + "name": "RegistrySet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "comment", + "type": "string" + } + ], + "name": "TransferComment", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "initialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isOwner", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "contract IRegistry", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "registryAddress", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getVersionNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "registryAddress", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "string", + "name": "comment", + "type": "string" + } + ], + "name": "transferWithComment", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ { "internalType": "address", - "name": "target", + "name": "spender", "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "unfreeze", - "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" - } - ]`)// GasPriceMinimum ABI - abis["GasPriceMinimum"] = mustParseABI(`[ + }, { + "constant": false, "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ { "internalType": "bool", - "name": "test", + "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", - "type": "constructor" + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": false, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { "internalType": "uint256", - "name": "adjustmentSpeed", + "name": "value", "type": "uint256" } ], - "name": "AdjustmentSpeedSet", - "type": "event" + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": false, + "internalType": "address", + "name": "to", + "type": "address" + }, + { "internalType": "uint256", - "name": "gasPriceMinimumFloor", + "name": "value", "type": "uint256" } ], - "name": "GasPriceMinimumFloorSet", - "type": "event" + "name": "mint", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "gasPriceMinimum", + "name": "", "type": "uint256" } ], - "name": "GasPriceMinimumUpdated", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "previousOwner", + "name": "owner", "type": "address" }, { - "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "spender", "type": "address" } ], - "name": "OwnershipTransferred", + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "increaseSupply", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ]`)// Governance ABI + abis["Governance"] = mustParseABI(`[ + { + "inputs": [ + { + "internalType": "bool", + "name": "test", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "approvalStageDuration", + "type": "uint256" + } + ], + "name": "ApprovalStageDurationSet", "type": "event" }, { @@ -11991,11 +13868,11 @@ func init() { { "indexed": true, "internalType": "address", - "name": "registryAddress", + "name": "approver", "type": "address" } ], - "name": "RegistrySet", + "name": "ApproverSet", "type": "event" }, { @@ -12004,387 +13881,330 @@ func init() { { "indexed": false, "internalType": "uint256", - "name": "targetDensity", + "name": "concurrentProposals", "type": "uint256" } ], - "name": "TargetDensitySet", + "name": "ConcurrentProposalsSet", "type": "event" }, { - "constant": true, - "inputs": [], - "name": "adjustmentSpeed", - "outputs": [ + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "destination", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes4", + "name": "functionId", + "type": "bytes4" + }, { + "indexed": false, "internalType": "uint256", - "name": "value", + "name": "threshold", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "ConstitutionSet", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "gasPriceMinimum", - "outputs": [ + "anonymous": false, + "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "dequeueFrequency", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "DequeueFrequencySet", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "gasPriceMinimumFloor", - "outputs": [ + "anonymous": false, + "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "executionStageDuration", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "ExecutionStageDurationSet", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "initialized", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": true, + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "HotfixApproved", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "isOwner", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": true, + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "HotfixExecuted", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "registry", - "outputs": [ + "indexed": true, + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, { - "internalType": "contract IRegistry", - "name": "", - "type": "address" + "indexed": true, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "HotfixPrepared", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": true, + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "indexed": false, "internalType": "address", - "name": "registryAddress", + "name": "whitelister", "type": "address" } ], - "name": "setRegistry", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "HotfixWhitelisted", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "targetDensity", - "outputs": [ + "anonymous": false, + "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "value", + "name": "minDeposit", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "MinDepositSet", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "OwnershipTransferred", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "getVersionNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, + "anonymous": false, + "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "baselineQuorumFactor", "type": "uint256" } ], - "payable": false, - "stateMutability": "pure", - "type": "function" + "name": "ParticipationBaselineQuorumFactorSet", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "_registryAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_gasPriceMinimumFloor", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_targetDensity", - "type": "uint256" - }, - { + "indexed": false, "internalType": "uint256", - "name": "_adjustmentSpeed", + "name": "baselineUpdateFactor", "type": "uint256" } ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "ParticipationBaselineUpdateFactorSet", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "_adjustmentSpeed", + "name": "participationBaseline", "type": "uint256" } ], - "name": "setAdjustmentSpeed", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "ParticipationBaselineUpdated", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "_targetDensity", + "name": "participationFloor", "type": "uint256" } ], - "name": "setTargetDensity", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "ParticipationFloorSet", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "uint256", - "name": "_gasPriceMinimumFloor", + "name": "proposalId", "type": "uint256" } ], - "name": "setGasPriceMinimumFloor", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "ProposalApproved", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - } - ], - "name": "getGasPriceMinimum", - "outputs": [ + "indexed": true, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "timestamp", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "ProposalDequeued", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "uint256", - "name": "blockGasTotal", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "blockGasLimit", + "name": "proposalId", "type": "uint256" } ], - "name": "updateGasPriceMinimum", - "outputs": [ + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { + "indexed": true, "internalType": "uint256", - "name": "", + "name": "proposalId", "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "ProposalExpired", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "uint256", - "name": "blockGasTotal", + "name": "proposalId", "type": "uint256" }, { + "indexed": true, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, "internalType": "uint256", - "name": "blockGasLimit", + "name": "transactionCount", "type": "uint256" - } - ], - "name": "getUpdatedGasPriceMinimum", - "outputs": [ + }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "deposit", "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ]`)// GoldToken ABI - abis["GoldToken"] = mustParseABI(`[ - { - "inputs": [ + }, { - "internalType": "bool", - "name": "test", - "type": "bool" + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" + "name": "ProposalQueued", + "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" }, { "indexed": true, "internalType": "address", - "name": "spender", + "name": "account", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "value", + "name": "revokedUpvotes", "type": "uint256" } ], - "name": "Approval", + "name": "ProposalUpvoteRevoked", "type": "event" }, { @@ -12392,31 +14212,55 @@ func init() { "inputs": [ { "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" }, { "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "account", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "upvotes", + "type": "uint256" } ], - "name": "OwnershipTransferred", + "name": "ProposalUpvoted", "type": "event" }, { "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, { "indexed": true, "internalType": "address", - "name": "registryAddress", + "name": "account", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" } ], - "name": "RegistrySet", + "name": "ProposalVoteRevoked", "type": "event" }, { @@ -12424,14 +14268,14 @@ func init() { "inputs": [ { "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" }, { "indexed": true, "internalType": "address", - "name": "to", + "name": "account", "type": "address" }, { @@ -12439,9 +14283,15 @@ func init() { "internalType": "uint256", "name": "value", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" } ], - "name": "Transfer", + "name": "ProposalVoted", "type": "event" }, { @@ -12449,23 +14299,54 @@ func init() { "inputs": [ { "indexed": false, - "internalType": "string", - "name": "comment", - "type": "string" + "internalType": "uint256", + "name": "queueExpiry", + "type": "uint256" } ], - "name": "TransferComment", + "name": "QueueExpirySet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "referendumStageDuration", + "type": "uint256" + } + ], + "name": "ReferendumStageDurationSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "registryAddress", + "type": "address" + } + ], + "name": "RegistrySet", "type": "event" }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, { "constant": true, "inputs": [], - "name": "initialized", + "name": "approver", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], "payable": false, @@ -12474,8 +14355,24 @@ func init() { }, { "constant": true, - "inputs": [], - "name": "isOwner", + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "bytes", + "name": "blsKey", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "blsPop", + "type": "bytes" + } + ], + "name": "checkProofOfPossession", "outputs": [ { "internalType": "bool", @@ -12490,12 +14387,12 @@ func init() { { "constant": true, "inputs": [], - "name": "owner", + "name": "concurrentProposals", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -12505,12 +14402,12 @@ func init() { { "constant": true, "inputs": [], - "name": "registry", + "name": "dequeueFrequency", "outputs": [ { - "internalType": "contract IRegistry", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -12518,59 +14415,83 @@ func init() { "type": "function" }, { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "address", - "name": "registryAddress", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "dequeued", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "setRegistry", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "address", - "name": "newOwner", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "emptyIndices", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "transferOwnership", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [], - "name": "getVersionNumber", - "outputs": [ + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "aNumerator", "type": "uint256" }, { "internalType": "uint256", - "name": "", + "name": "aDenominator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "bNumerator", "type": "uint256" }, + { + "internalType": "uint256", + "name": "bDenominator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "exponent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_decimals", + "type": "uint256" + } + ], + "name": "fractionMulExp", + "outputs": [ { "internalType": "uint256", "name": "", @@ -12583,225 +14504,184 @@ func init() { } ], "payable": false, - "stateMutability": "pure", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "address", - "name": "registryAddress", - "type": "address" + "internalType": "bytes", + "name": "header", + "type": "bytes" } ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, + "name": "getBlockNumberFromHeader", + "outputs": [ { "internalType": "uint256", - "name": "value", + "name": "", "type": "uint256" } ], - "name": "transfer", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getEpochNumber", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, { "internalType": "uint256", - "name": "value", + "name": "blockNumber", "type": "uint256" - }, - { - "internalType": "string", - "name": "comment", - "type": "string" } ], - "name": "transferWithComment", + "name": "getEpochNumberOfBlock", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approve", + "constant": true, + "inputs": [], + "name": "getEpochSize", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, { "internalType": "uint256", - "name": "value", + "name": "blockNumber", "type": "uint256" } ], - "name": "increaseAllowance", + "name": "getParentSealBitmap", "outputs": [ { - "internalType": "bool", + "internalType": "bytes32", "name": "", - "type": "bool" + "type": "bytes32" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" + "internalType": "bytes", + "name": "header", + "type": "bytes" } ], - "name": "decreaseAllowance", + "name": "getVerifiedSealBitmapFromHeader", "outputs": [ { - "internalType": "bool", + "internalType": "bytes32", "name": "", - "type": "bool" + "type": "bytes32" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" + "internalType": "bytes", + "name": "header", + "type": "bytes" } ], - "name": "transferFrom", + "name": "hashHeader", "outputs": [ { - "internalType": "bool", + "internalType": "bytes32", "name": "", - "type": "bool" + "type": "bytes32" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" + "internalType": "bytes32", + "name": "", + "type": "bytes32" } ], - "name": "mint", + "name": "hotfixes", "outputs": [ { "internalType": "bool", - "name": "", + "name": "executed", + "type": "bool" + }, + { + "internalType": "bool", + "name": "approved", "type": "bool" + }, + { + "internalType": "uint256", + "name": "preparedEpoch", + "type": "uint256" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "name", + "name": "initialized", "outputs": [ { - "internalType": "string", + "internalType": "bool", "name": "", - "type": "string" + "type": "bool" } ], "payable": false, @@ -12811,12 +14691,12 @@ func init() { { "constant": true, "inputs": [], - "name": "symbol", + "name": "isOwner", "outputs": [ { - "internalType": "string", + "internalType": "bool", "name": "", - "type": "string" + "type": "bool" } ], "payable": false, @@ -12826,12 +14706,12 @@ func init() { { "constant": true, "inputs": [], - "name": "decimals", + "name": "lastDequeue", "outputs": [ { - "internalType": "uint8", + "internalType": "uint256", "name": "", - "type": "uint8" + "type": "uint256" } ], "payable": false, @@ -12841,7 +14721,7 @@ func init() { { "constant": true, "inputs": [], - "name": "totalSupply", + "name": "minDeposit", "outputs": [ { "internalType": "uint256", @@ -12857,17 +14737,12 @@ func init() { "constant": true, "inputs": [ { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" } ], - "name": "allowance", + "name": "minQuorumSize", "outputs": [ { "internalType": "uint256", @@ -12880,30 +14755,24 @@ func init() { "type": "function" }, { - "constant": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "minQuorumSizeInCurrentSet", + "outputs": [ { "internalType": "uint256", - "name": "amount", + "name": "", "type": "uint256" } ], - "name": "increaseSupply", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", + "inputs": [], + "name": "numberValidatorsInCurrentSet", "outputs": [ { "internalType": "uint256", @@ -12914,689 +14783,560 @@ func init() { "payable": false, "stateMutability": "view", "type": "function" - } - ]`)// Governance ABI - abis["Governance"] = mustParseABI(`[ - { - "inputs": [ - { - "internalType": "bool", - "name": "test", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": false, "internalType": "uint256", - "name": "approvalStageDuration", + "name": "blockNumber", "type": "uint256" } ], - "name": "ApprovalStageDurationSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "approver", - "type": "address" - } - ], - "name": "ApproverSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "name": "numberValidatorsInSet", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "concurrentProposals", + "name": "", "type": "uint256" } ], - "name": "ConcurrentProposalsSet", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ { - "indexed": true, "internalType": "address", - "name": "destination", + "name": "", "type": "address" - }, - { - "indexed": true, - "internalType": "bytes4", - "name": "functionId", - "type": "bytes4" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "threshold", - "type": "uint256" } ], - "name": "ConstitutionSet", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "proposalCount", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "dequeueFrequency", + "name": "", "type": "uint256" } ], - "name": "DequeueFrequencySet", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "queueExpiry", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "executionStageDuration", + "name": "", "type": "uint256" } ], - "name": "ExecutionStageDurationSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" - } - ], - "name": "HotfixApproved", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": true, - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "HotfixExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" - }, + "name": "refundedDeposits", + "outputs": [ { - "indexed": true, "internalType": "uint256", - "name": "epoch", + "name": "", "type": "uint256" } ], - "name": "HotfixPrepared", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" - }, + "constant": true, + "inputs": [], + "name": "registry", + "outputs": [ { - "indexed": false, - "internalType": "address", - "name": "whitelister", + "internalType": "contract IRegistry", + "name": "", "type": "address" } ], - "name": "HotfixWhitelisted", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "minDeposit", - "type": "uint256" - } - ], - "name": "MinDepositSet", - "type": "event" + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "registryAddress", "type": "address" } ], - "name": "OwnershipTransferred", - "type": "event" + "name": "setRegistry", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "stageDurations", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "baselineQuorumFactor", + "name": "approval", "type": "uint256" - } - ], - "name": "ParticipationBaselineQuorumFactorSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + }, { - "indexed": false, "internalType": "uint256", - "name": "baselineUpdateFactor", + "name": "referendum", "type": "uint256" - } - ], - "name": "ParticipationBaselineUpdateFactorSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + }, { - "indexed": false, "internalType": "uint256", - "name": "participationBaseline", + "name": "execution", "type": "uint256" } ], - "name": "ParticipationBaselineUpdated", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "participationFloor", - "type": "uint256" + "internalType": "address", + "name": "newOwner", + "type": "address" } ], - "name": "ParticipationFloorSet", - "type": "event" + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": true, "internalType": "uint256", - "name": "proposalId", + "name": "index", "type": "uint256" } ], - "name": "ProposalApproved", - "type": "event" + "name": "validatorSignerAddressFromCurrentSet", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": true, "internalType": "uint256", - "name": "proposalId", + "name": "index", "type": "uint256" }, { - "indexed": false, - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - } - ], - "name": "ProposalDequeued", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, "internalType": "uint256", - "name": "proposalId", + "name": "blockNumber", "type": "uint256" } ], - "name": "ProposalExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "name": "validatorSignerAddressFromSet", + "outputs": [ { - "indexed": true, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "ProposalExpired", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "getVersionNumber", + "outputs": [ { - "indexed": true, "internalType": "uint256", - "name": "proposalId", + "name": "", "type": "uint256" }, { - "indexed": true, - "internalType": "address", - "name": "proposer", - "type": "address" - }, - { - "indexed": false, "internalType": "uint256", - "name": "transactionCount", + "name": "", "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "deposit", + "name": "", "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "timestamp", + "name": "", "type": "uint256" } ], - "name": "ProposalQueued", - "type": "event" + "payable": false, + "stateMutability": "pure", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": true, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" + "internalType": "address", + "name": "registryAddress", + "type": "address" }, { - "indexed": true, "internalType": "address", - "name": "account", + "name": "_approver", "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "revokedUpvotes", + "name": "_concurrentProposals", "type": "uint256" - } - ], - "name": "ProposalUpvoteRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + }, { - "indexed": true, "internalType": "uint256", - "name": "proposalId", + "name": "_minDeposit", "type": "uint256" }, { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, "internalType": "uint256", - "name": "upvotes", + "name": "_queueExpiry", "type": "uint256" - } - ], - "name": "ProposalUpvoted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + }, { - "indexed": true, "internalType": "uint256", - "name": "proposalId", + "name": "_dequeueFrequency", "type": "uint256" }, { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" + "internalType": "uint256", + "name": "approvalStageDuration", + "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "value", + "name": "referendumStageDuration", "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "weight", + "name": "executionStageDuration", "type": "uint256" - } - ], - "name": "ProposalVoteRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + }, { - "indexed": true, "internalType": "uint256", - "name": "proposalId", + "name": "participationBaseline", "type": "uint256" }, { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" + "internalType": "uint256", + "name": "participationFloor", + "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "value", + "name": "baselineUpdateFactor", "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "weight", + "name": "baselineQuorumFactor", "type": "uint256" } ], - "name": "ProposalVoted", - "type": "event" + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_approver", + "type": "address" + } + ], + "name": "setApprover", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": false, "internalType": "uint256", - "name": "queueExpiry", + "name": "_concurrentProposals", "type": "uint256" } ], - "name": "QueueExpirySet", - "type": "event" + "name": "setConcurrentProposals", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": false, "internalType": "uint256", - "name": "referendumStageDuration", + "name": "_minDeposit", "type": "uint256" } ], - "name": "ReferendumStageDurationSet", - "type": "event" + "name": "setMinDeposit", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "registryAddress", - "type": "address" + "internalType": "uint256", + "name": "_queueExpiry", + "type": "uint256" } ], - "name": "RegistrySet", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" + "name": "setQueueExpiry", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "constant": true, - "inputs": [], - "name": "approver", - "outputs": [ + "constant": false, + "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "internalType": "uint256", + "name": "_dequeueFrequency", + "type": "uint256" } ], + "name": "setDequeueFrequency", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "bytes", - "name": "blsKey", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "blsPop", - "type": "bytes" - } - ], - "name": "checkProofOfPossession", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "uint256", + "name": "approvalStageDuration", + "type": "uint256" } ], + "name": "setApprovalStageDuration", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "concurrentProposals", - "outputs": [ + "constant": false, + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "referendumStageDuration", "type": "uint256" } ], + "name": "setReferendumStageDuration", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "dequeueFrequency", - "outputs": [ + "constant": false, + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "executionStageDuration", "type": "uint256" } ], + "name": "setExecutionStageDuration", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { "internalType": "uint256", - "name": "", + "name": "participationBaseline", "type": "uint256" } ], - "name": "dequeued", - "outputs": [ + "name": "setParticipationBaseline", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "participationFloor", "type": "uint256" } ], + "name": "setParticipationFloor", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { "internalType": "uint256", - "name": "", + "name": "baselineUpdateFactor", "type": "uint256" } ], - "name": "emptyIndices", - "outputs": [ + "name": "setBaselineUpdateFactor", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "baselineQuorumFactor", "type": "uint256" } ], + "name": "setBaselineQuorumFactor", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "aNumerator", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "aDenominator", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "bNumerator", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "bDenominator", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "exponent", - "type": "uint256" + "internalType": "address", + "name": "destination", + "type": "address" }, { - "internalType": "uint256", - "name": "_decimals", - "type": "uint256" - } - ], - "name": "fractionMulExp", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "bytes4", + "name": "functionId", + "type": "bytes4" }, { "internalType": "uint256", - "name": "", + "name": "threshold", "type": "uint256" } ], + "name": "setConstitution", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "destinations", + "type": "address[]" + }, { "internalType": "bytes", - "name": "header", + "name": "data", "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "dataLengths", + "type": "uint256[]" + }, + { + "internalType": "string", + "name": "descriptionUrl", + "type": "string" } ], - "name": "getBlockNumberFromHeader", + "name": "propose", "outputs": [ { "internalType": "uint256", @@ -13604,59 +15344,39 @@ func init() { "type": "uint256" } ], - "payable": false, - "stateMutability": "view", + "payable": true, + "stateMutability": "payable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "getEpochNumber", - "outputs": [ + "constant": false, + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "proposalId", "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ + }, { "internalType": "uint256", - "name": "blockNumber", + "name": "lesser", "type": "uint256" - } - ], - "name": "getEpochNumberOfBlock", - "outputs": [ + }, { "internalType": "uint256", - "name": "", + "name": "greater", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getEpochSize", + "name": "upvote", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { @@ -13664,16 +15384,16 @@ func init() { "inputs": [ { "internalType": "uint256", - "name": "blockNumber", + "name": "proposalId", "type": "uint256" } ], - "name": "getParentSealBitmap", + "name": "getProposalStage", "outputs": [ { - "internalType": "bytes32", + "internalType": "enum Proposals.Stage", "name": "", - "type": "bytes32" + "type": "uint8" } ], "payable": false, @@ -13681,82 +15401,92 @@ func init() { "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { - "internalType": "bytes", - "name": "header", - "type": "bytes" + "internalType": "uint256", + "name": "lesser", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "greater", + "type": "uint256" } ], - "name": "getVerifiedSealBitmapFromHeader", + "name": "revokeUpvote", "outputs": [ { - "internalType": "bytes32", + "internalType": "bool", "name": "", - "type": "bytes32" + "type": "bool" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { - "internalType": "bytes", - "name": "header", - "type": "bytes" + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" } ], - "name": "hashHeader", + "name": "approve", "outputs": [ { - "internalType": "bytes32", + "internalType": "bool", "name": "", - "type": "bytes32" + "type": "bool" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { - "internalType": "bytes32", - "name": "", - "type": "bytes32" + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "enum Proposals.VoteValue", + "name": "value", + "type": "uint8" } ], - "name": "hotfixes", + "name": "vote", "outputs": [ { "internalType": "bool", - "name": "executed", - "type": "bool" - }, - { - "internalType": "bool", - "name": "approved", + "name": "", "type": "bool" - }, - { - "internalType": "uint256", - "name": "preparedEpoch", - "type": "uint256" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [], - "name": "initialized", + "name": "revokeVotes", "outputs": [ { "internalType": "bool", @@ -13765,13 +15495,24 @@ func init() { } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "isOwner", + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "execute", "outputs": [ { "internalType": "bool", @@ -13780,33 +15521,44 @@ func init() { } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "lastDequeue", - "outputs": [ + "constant": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" } ], + "name": "approveHotfix", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, - "inputs": [], - "name": "minDeposit", + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "whitelister", + "type": "address" + } + ], + "name": "isHotfixWhitelistedBy", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, @@ -13814,71 +15566,100 @@ func init() { "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" } ], - "name": "minQuorumSize", - "outputs": [ + "name": "whitelistHotfix", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" } ], + "name": "prepareHotfix", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "minQuorumSizeInCurrentSet", - "outputs": [ + "constant": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "destinations", + "type": "address[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "dataLengths", + "type": "uint256[]" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" } ], + "name": "executeHotfix", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [], - "name": "numberValidatorsInCurrentSet", + "name": "withdraw", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" + "internalType": "address", + "name": "account", + "type": "address" } ], - "name": "numberValidatorsInSet", + "name": "isVoting", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, @@ -13888,12 +15669,12 @@ func init() { { "constant": true, "inputs": [], - "name": "owner", + "name": "getApprovalStageDuration", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -13903,7 +15684,7 @@ func init() { { "constant": true, "inputs": [], - "name": "proposalCount", + "name": "getReferendumStageDuration", "outputs": [ { "internalType": "uint256", @@ -13918,7 +15699,7 @@ func init() { { "constant": true, "inputs": [], - "name": "queueExpiry", + "name": "getExecutionStageDuration", "outputs": [ { "internalType": "uint256", @@ -13932,15 +15713,24 @@ func init() { }, { "constant": true, - "inputs": [ + "inputs": [], + "name": "getParticipationParameters", + "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" - } - ], - "name": "refundedDeposits", - "outputs": [ + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, { "internalType": "uint256", "name": "", @@ -13953,13 +15743,19 @@ func init() { }, { "constant": true, - "inputs": [], - "name": "registry", + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalExists", "outputs": [ { - "internalType": "contract IRegistry", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "payable": false, @@ -13967,84 +15763,76 @@ func init() { "type": "function" }, { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "address", - "name": "registryAddress", - "type": "address" + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" } ], - "name": "setRegistry", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "stageDurations", + "name": "getProposal", "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, { "internalType": "uint256", - "name": "approval", + "name": "", "type": "uint256" }, { "internalType": "uint256", - "name": "referendum", + "name": "", "type": "uint256" }, { "internalType": "uint256", - "name": "execution", + "name": "", "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ + }, { - "internalType": "address", - "name": "newOwner", - "type": "address" + "internalType": "string", + "name": "", + "type": "string" } ], - "name": "transferOwnership", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, { "internalType": "uint256", "name": "index", "type": "uint256" } ], - "name": "validatorSignerAddressFromCurrentSet", + "name": "getProposalTransaction", "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, { "internalType": "address", "name": "", "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" } ], "payable": false, @@ -14056,21 +15844,16 @@ func init() { "inputs": [ { "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "blockNumber", + "name": "proposalId", "type": "uint256" } ], - "name": "validatorSignerAddressFromSet", + "name": "isApproved", "outputs": [ { - "internalType": "address", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "payable": false, @@ -14079,14 +15862,15 @@ func init() { }, { "constant": true, - "inputs": [], - "name": "getVersionNumber", - "outputs": [ + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "proposalId", "type": "uint256" - }, + } + ], + "name": "getVoteTotals", + "outputs": [ { "internalType": "uint256", "name": "", @@ -14104,350 +15888,323 @@ func init() { } ], "payable": false, - "stateMutability": "pure", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { "internalType": "address", - "name": "registryAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "_approver", + "name": "account", "type": "address" }, { "internalType": "uint256", - "name": "_concurrentProposals", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_minDeposit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_queueExpiry", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_dequeueFrequency", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "approvalStageDuration", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "referendumStageDuration", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "executionStageDuration", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "participationBaseline", + "name": "index", "type": "uint256" - }, + } + ], + "name": "getVoteRecord", + "outputs": [ { "internalType": "uint256", - "name": "participationFloor", + "name": "", "type": "uint256" }, { "internalType": "uint256", - "name": "baselineUpdateFactor", + "name": "", "type": "uint256" }, { "internalType": "uint256", - "name": "baselineQuorumFactor", + "name": "", "type": "uint256" } ], - "name": "initialize", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "getQueueLength", + "outputs": [ { - "internalType": "address", - "name": "_approver", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "setApprover", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { "internalType": "uint256", - "name": "_concurrentProposals", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "getUpvotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", "type": "uint256" } ], - "name": "setConcurrentProposals", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "getQueue", + "outputs": [ { - "internalType": "uint256", - "name": "_minDeposit", - "type": "uint256" + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" } ], - "name": "setMinDeposit", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "getDequeue", + "outputs": [ { - "internalType": "uint256", - "name": "_queueExpiry", - "type": "uint256" + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" } ], - "name": "setQueueExpiry", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "uint256", - "name": "_dequeueFrequency", - "type": "uint256" + "internalType": "address", + "name": "account", + "type": "address" } ], - "name": "setDequeueFrequency", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ + "name": "getUpvoteRecord", + "outputs": [ { "internalType": "uint256", - "name": "approvalStageDuration", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", "type": "uint256" } ], - "name": "setApprovalStageDuration", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getMostRecentReferendumProposal", + "outputs": [ { "internalType": "uint256", - "name": "referendumStageDuration", + "name": "", "type": "uint256" } ], - "name": "setReferendumStageDuration", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "hotfixWhitelistValidatorTally", + "outputs": [ { "internalType": "uint256", - "name": "executionStageDuration", + "name": "", "type": "uint256" } ], - "name": "setExecutionStageDuration", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "uint256", - "name": "participationBaseline", - "type": "uint256" + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "isHotfixPassing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "setParticipationBaseline", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "getHotfixRecord", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + }, { "internalType": "uint256", - "name": "participationFloor", + "name": "", "type": "uint256" } ], - "name": "setParticipationFloor", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "baselineUpdateFactor", - "type": "uint256" - } - ], - "name": "setBaselineUpdateFactor", + "inputs": [], + "name": "dequeueProposalsIfReady", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { "internalType": "uint256", - "name": "baselineQuorumFactor", + "name": "proposalId", "type": "uint256" } ], - "name": "setBaselineQuorumFactor", - "outputs": [], + "name": "isQueued", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ - { - "internalType": "address", - "name": "destination", - "type": "address" - }, - { - "internalType": "bytes4", - "name": "functionId", - "type": "bytes4" - }, { "internalType": "uint256", - "name": "threshold", + "name": "proposalId", "type": "uint256" } ], - "name": "setConstitution", - "outputs": [], + "name": "isProposalPassing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "address[]", - "name": "destinations", - "type": "address[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "uint256[]", - "name": "dataLengths", - "type": "uint256[]" + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" }, { - "internalType": "string", - "name": "descriptionUrl", - "type": "string" + "internalType": "uint256", + "name": "index", + "type": "uint256" } ], - "name": "propose", + "name": "isDequeuedProposal", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], - "payable": true, - "stateMutability": "payable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { "internalType": "uint256", "name": "proposalId", "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lesser", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "greater", - "type": "uint256" } ], - "name": "upvote", + "name": "isDequeuedProposalExpired", "outputs": [ { "internalType": "bool", @@ -14456,7 +16213,7 @@ func init() { } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -14468,12 +16225,12 @@ func init() { "type": "uint256" } ], - "name": "getProposalStage", + "name": "isQueuedProposalExpired", "outputs": [ { - "internalType": "enum Proposals.Stage", + "internalType": "bool", "name": "", - "type": "uint8" + "type": "bool" } ], "payable": false, @@ -14481,180 +16238,246 @@ func init() { "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "uint256", - "name": "lesser", - "type": "uint256" + "internalType": "address", + "name": "destination", + "type": "address" }, + { + "internalType": "bytes4", + "name": "functionId", + "type": "bytes4" + } + ], + "name": "getConstitution", + "outputs": [ { "internalType": "uint256", - "name": "greater", + "name": "", "type": "uint256" } ], - "name": "revokeUpvote", - "outputs": [ + "payable": false, + "stateMutability": "view", + "type": "function" + } + ]`)// GovernanceApproverMultiSig ABI + abis["GovernanceApproverMultiSig"] = mustParseABI(`[ + { + "inputs": [ { "internalType": "bool", - "name": "", + "name": "test", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", - "type": "function" + "type": "constructor" }, { - "constant": false, + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" }, { + "indexed": true, "internalType": "uint256", - "name": "index", + "name": "transactionId", "type": "uint256" } ], - "name": "approve", - "outputs": [ + "name": "Confirmation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "Deposit", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "uint256", - "name": "proposalId", + "name": "transactionId", "type": "uint256" }, { + "indexed": false, + "internalType": "bytes", + "name": "returnData", + "type": "bytes" + } + ], + "name": "Execution", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, "internalType": "uint256", - "name": "index", + "name": "internalRequired", "type": "uint256" - }, - { - "internalType": "enum Proposals.VoteValue", - "name": "value", - "type": "uint8" } ], - "name": "vote", - "outputs": [ + "name": "InternalRequirementChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "OwnerAddition", + "type": "event" }, { - "constant": false, - "inputs": [], - "name": "revokeVotes", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "OwnerRemoval", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "proposalId", + "name": "required", "type": "uint256" + } + ], + "name": "RequirementChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" }, { + "indexed": true, "internalType": "uint256", - "name": "index", + "name": "transactionId", "type": "uint256" } ], - "name": "execute", + "name": "Revocation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "transactionId", + "type": "uint256" + } + ], + "name": "Submission", + "type": "event" + }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_OWNER_COUNT", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" + "internalType": "address", + "name": "owner", + "type": "address" } ], - "name": "approveHotfix", + "name": "addOwner", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "whitelister", - "type": "address" - } - ], - "name": "isHotfixWhitelistedBy", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "uint256", + "name": "_internalRequired", + "type": "uint256" } ], + "name": "changeInternalRequirement", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" + "internalType": "uint256", + "name": "_required", + "type": "uint256" } ], - "name": "whitelistHotfix", + "name": "changeRequirement", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -14664,63 +16487,54 @@ func init() { "constant": false, "inputs": [ { - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" + "internalType": "uint256", + "name": "transactionId", + "type": "uint256" } ], - "name": "prepareHotfix", + "name": "confirmTransaction", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "address[]", - "name": "destinations", - "type": "address[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "uint256", + "name": "", + "type": "uint256" }, { - "internalType": "uint256[]", - "name": "dataLengths", - "type": "uint256[]" - }, + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "confirmations", + "outputs": [ { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "executeHotfix", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": false, - "inputs": [], - "name": "withdraw", - "outputs": [ + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "uint256", + "name": "transactionId", + "type": "uint256" } ], + "name": "executeTransaction", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -14729,17 +16543,17 @@ func init() { "constant": true, "inputs": [ { - "internalType": "address", - "name": "account", - "type": "address" + "internalType": "uint256", + "name": "transactionId", + "type": "uint256" } ], - "name": "isVoting", + "name": "getConfirmationCount", "outputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "uint256", + "name": "count", + "type": "uint256" } ], "payable": false, @@ -14748,15 +16562,21 @@ func init() { }, { "constant": true, - "inputs": [], - "name": "getApprovalStageDuration", - "outputs": [ + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "transactionId", "type": "uint256" } ], + "name": "getConfirmations", + "outputs": [ + { + "internalType": "address[]", + "name": "_confirmations", + "type": "address[]" + } + ], "payable": false, "stateMutability": "view", "type": "function" @@ -14764,12 +16584,12 @@ func init() { { "constant": true, "inputs": [], - "name": "getReferendumStageDuration", + "name": "getOwners", "outputs": [ { - "internalType": "uint256", + "internalType": "address[]", "name": "", - "type": "uint256" + "type": "address[]" } ], "payable": false, @@ -14778,12 +16598,23 @@ func init() { }, { "constant": true, - "inputs": [], - "name": "getExecutionStageDuration", + "inputs": [ + { + "internalType": "bool", + "name": "pending", + "type": "bool" + }, + { + "internalType": "bool", + "name": "executed", + "type": "bool" + } + ], + "name": "getTransactionCount", "outputs": [ { "internalType": "uint256", - "name": "", + "name": "count", "type": "uint256" } ], @@ -14793,28 +16624,34 @@ func init() { }, { "constant": true, - "inputs": [], - "name": "getParticipationParameters", - "outputs": [ + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "from", "type": "uint256" }, { "internalType": "uint256", - "name": "", + "name": "to", "type": "uint256" }, { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "bool", + "name": "pending", + "type": "bool" }, { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "bool", + "name": "executed", + "type": "bool" + } + ], + "name": "getTransactionIds", + "outputs": [ + { + "internalType": "uint256[]", + "name": "_transactionIds", + "type": "uint256[]" } ], "payable": false, @@ -14822,15 +16659,34 @@ func init() { "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ + { + "internalType": "address[]", + "name": "_owners", + "type": "address[]" + }, { "internalType": "uint256", - "name": "proposalId", + "name": "_required", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_internalRequired", "type": "uint256" } ], - "name": "proposalExists", + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "initialized", "outputs": [ { "internalType": "bool", @@ -14844,39 +16700,13 @@ func init() { }, { "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "getProposal", + "inputs": [], + "name": "internalRequired", "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, { "internalType": "uint256", "name": "", "type": "uint256" - }, - { - "internalType": "string", - "name": "", - "type": "string" } ], "payable": false, @@ -14888,31 +16718,37 @@ func init() { "inputs": [ { "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "index", + "name": "transactionId", "type": "uint256" } ], - "name": "getProposalTransaction", + "name": "isConfirmed", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" - }, + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ { "internalType": "address", "name": "", "type": "address" - }, + } + ], + "name": "isOwner", + "outputs": [ { - "internalType": "bytes", + "internalType": "bool", "name": "", - "type": "bytes" + "type": "bool" } ], "payable": false, @@ -14924,16 +16760,16 @@ func init() { "inputs": [ { "internalType": "uint256", - "name": "proposalId", + "name": "", "type": "uint256" } ], - "name": "isApproved", + "name": "owners", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], "payable": false, @@ -14941,26 +16777,45 @@ func init() { "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" + "internalType": "address", + "name": "owner", + "type": "address" } ], - "name": "getVoteTotals", - "outputs": [ + "name": "removeOwner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "owner", + "type": "address" }, { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "replaceOwner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "required", + "outputs": [ { "internalType": "uint256", "name": "", @@ -14972,45 +16827,55 @@ func init() { "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, { "internalType": "uint256", - "name": "index", + "name": "transactionId", "type": "uint256" } ], - "name": "getVoteRecord", - "outputs": [ + "name": "revokeConfirmation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "destination", + "type": "address" }, { "internalType": "uint256", - "name": "", + "name": "value", "type": "uint256" }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "submitTransaction", + "outputs": [ { "internalType": "uint256", - "name": "", + "name": "transactionId", "type": "uint256" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "getQueueLength", + "name": "transactionCount", "outputs": [ { "internalType": "uint256", @@ -15027,135 +16892,125 @@ func init() { "inputs": [ { "internalType": "uint256", - "name": "proposalId", + "name": "", "type": "uint256" } ], - "name": "getUpvotes", + "name": "transactions", "outputs": [ + { + "internalType": "address", + "name": "destination", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "value", "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getQueue", - "outputs": [ + }, { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" + "internalType": "bytes", + "name": "data", + "type": "bytes" }, { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" + "internalType": "bool", + "name": "executed", + "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" - }, + } + ]`)// GovernanceSlasher ABI + abis["GovernanceSlasher"] = mustParseABI(`[ { - "constant": true, - "inputs": [], - "name": "getDequeue", - "outputs": [ + "inputs": [ { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" + "internalType": "bool", + "name": "test", + "type": "bool" } ], "payable": false, - "stateMutability": "view", - "type": "function" + "stateMutability": "nonpayable", + "type": "constructor" }, { - "constant": true, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", "name": "account", "type": "address" - } - ], - "name": "getUpvoteRecord", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "amount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "GovernanceSlashPerformed", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "account", + "name": "previousOwner", "type": "address" - } - ], - "name": "getMostRecentReferendumProposal", - "outputs": [ + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "OwnershipTransferred", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" + "indexed": true, + "internalType": "address", + "name": "registryAddress", + "type": "address" } ], - "name": "hotfixWhitelistValidatorTally", - "outputs": [ + "name": "RegistrySet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "amount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "SlashingApproved", + "type": "event" }, { "constant": true, - "inputs": [ - { - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" - } - ], - "name": "isHotfixPassing", + "inputs": [], + "name": "initialized", "outputs": [ { "internalType": "bool", @@ -15169,29 +17024,13 @@ func init() { }, { "constant": true, - "inputs": [ - { - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" - } - ], - "name": "getHotfixRecord", + "inputs": [], + "name": "isOwner", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" - }, - { - "internalType": "bool", - "name": "", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" } ], "payable": false, @@ -15199,29 +17038,29 @@ func init() { "type": "function" }, { - "constant": false, + "constant": true, "inputs": [], - "name": "dequeueProposalsIfReady", - "outputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "isQueued", + "inputs": [], + "name": "registry", "outputs": [ { - "internalType": "bool", + "internalType": "contract IRegistry", "name": "", - "type": "bool" + "type": "address" } ], "payable": false, @@ -15229,88 +17068,94 @@ func init() { "type": "function" }, { - "constant": true, + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "isProposalPassing", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "address", + "name": "registryAddress", + "type": "address" } ], + "name": "setRegistry", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" + "internalType": "address", + "name": "newOwner", + "type": "address" } ], - "name": "isDequeuedProposal", - "outputs": [ + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "address", + "name": "registryAddress", + "type": "address" } ], + "name": "initialize", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, { "internalType": "uint256", - "name": "proposalId", + "name": "penalty", "type": "uint256" } ], - "name": "isDequeuedProposalExpired", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], + "name": "approveSlashing", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" + "internalType": "address", + "name": "account", + "type": "address" } ], - "name": "isQueuedProposalExpired", + "name": "getApprovedSlashing", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "payable": false, @@ -15318,33 +17163,43 @@ func init() { "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { "internalType": "address", - "name": "destination", + "name": "account", "type": "address" }, { - "internalType": "bytes4", - "name": "functionId", - "type": "bytes4" + "internalType": "address[]", + "name": "electionLessers", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "electionGreaters", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "electionIndices", + "type": "uint256[]" } ], - "name": "getConstitution", + "name": "slash", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" } - ]`)// GovernanceApproverMultiSig ABI - abis["GovernanceApproverMultiSig"] = mustParseABI(`[ + ]`)// GrandaMento ABI + abis["GrandaMento"] = mustParseABI(`[ { "inputs": [ { @@ -15361,19 +17216,13 @@ func init() { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "sender", + "name": "approver", "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "transactionId", - "type": "uint256" } ], - "name": "Confirmation", + "name": "ApproverSet", "type": "event" }, { @@ -15381,18 +17230,12 @@ func init() { "inputs": [ { "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": false, "internalType": "uint256", - "name": "value", + "name": "proposalId", "type": "uint256" } ], - "name": "Deposit", + "name": "ExchangeProposalApproved", "type": "event" }, { @@ -15401,88 +17244,54 @@ func init() { { "indexed": true, "internalType": "uint256", - "name": "transactionId", + "name": "proposalId", "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "returnData", - "type": "bytes" } ], - "name": "Execution", + "name": "ExchangeProposalCancelled", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "uint256", - "name": "internalRequired", + "name": "proposalId", "type": "uint256" - } - ], - "name": "InternalRequirementChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + }, { "indexed": true, "internalType": "address", - "name": "owner", + "name": "exchanger", "type": "address" - } - ], - "name": "OwnerAddition", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + }, { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "OwnerRemoval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "indexed": false, + "internalType": "string", + "name": "stableTokenRegistryId", + "type": "string" + }, { "indexed": false, "internalType": "uint256", - "name": "required", + "name": "sellAmount", "type": "uint256" - } - ], - "name": "RequirementChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" }, { - "indexed": true, + "indexed": false, "internalType": "uint256", - "name": "transactionId", + "name": "buyAmount", "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "sellCelo", + "type": "bool" } ], - "name": "Revocation", + "name": "ExchangeProposalCreated", "type": "event" }, { @@ -15491,170 +17300,124 @@ func init() { { "indexed": true, "internalType": "uint256", - "name": "transactionId", + "name": "proposalId", "type": "uint256" } ], - "name": "Submission", + "name": "ExchangeProposalExecuted", "type": "event" }, { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": true, - "inputs": [], - "name": "MAX_OWNER_COUNT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "addOwner", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "_internalRequired", - "type": "uint256" - } - ], - "name": "changeInternalRequirement", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "_required", - "type": "uint256" - } - ], - "name": "changeRequirement", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "transactionId", + "name": "maxApprovalExchangeRateChange", "type": "uint256" } ], - "name": "confirmTransaction", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "MaxApprovalExchangeRateChangeSet", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" }, { + "indexed": true, "internalType": "address", - "name": "", + "name": "newOwner", "type": "address" } ], - "name": "confirmations", - "outputs": [ + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": true, + "internalType": "address", + "name": "registryAddress", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "RegistrySet", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "transactionId", + "name": "spread", "type": "uint256" } ], - "name": "executeTransaction", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "SpreadSet", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { + "indexed": false, + "internalType": "string", + "name": "stableTokenRegistryId", + "type": "string" + }, + { + "indexed": false, "internalType": "uint256", - "name": "transactionId", + "name": "minExchangeAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "maxExchangeAmount", "type": "uint256" } ], - "name": "getConfirmationCount", - "outputs": [ + "name": "StableTokenExchangeLimitsSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "count", + "name": "vetoPeriodSeconds", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "VetoPeriodSecondsSet", + "type": "event" }, { "constant": true, "inputs": [ { "internalType": "uint256", - "name": "transactionId", + "name": "", "type": "uint256" } ], - "name": "getConfirmations", + "name": "activeProposalIdsSuperset", "outputs": [ { - "internalType": "address[]", - "name": "_confirmations", - "type": "address[]" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], "payable": false, @@ -15664,12 +17427,12 @@ func init() { { "constant": true, "inputs": [], - "name": "getOwners", + "name": "approver", "outputs": [ { - "internalType": "address[]", + "internalType": "address", "name": "", - "type": "address[]" + "type": "address" } ], "payable": false, @@ -15678,23 +17441,12 @@ func init() { }, { "constant": true, - "inputs": [ - { - "internalType": "bool", - "name": "pending", - "type": "bool" - }, - { - "internalType": "bool", - "name": "executed", - "type": "bool" - } - ], - "name": "getTransactionCount", + "inputs": [], + "name": "exchangeProposalCount", "outputs": [ { "internalType": "uint256", - "name": "count", + "name": "", "type": "uint256" } ], @@ -15707,60 +17459,60 @@ func init() { "inputs": [ { "internalType": "uint256", - "name": "from", + "name": "", "type": "uint256" + } + ], + "name": "exchangeProposals", + "outputs": [ + { + "internalType": "address payable", + "name": "exchanger", + "type": "address" }, { - "internalType": "uint256", - "name": "to", - "type": "uint256" + "internalType": "address", + "name": "stableToken", + "type": "address" }, { - "internalType": "bool", - "name": "pending", - "type": "bool" + "internalType": "enum GrandaMento.ExchangeProposalState", + "name": "state", + "type": "uint8" }, { "internalType": "bool", - "name": "executed", + "name": "sellCelo", "type": "bool" - } - ], - "name": "getTransactionIds", - "outputs": [ + }, { - "internalType": "uint256[]", - "name": "_transactionIds", - "type": "uint256[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ + "internalType": "uint256", + "name": "sellAmount", + "type": "uint256" + }, { - "internalType": "address[]", - "name": "_owners", - "type": "address[]" + "internalType": "uint256", + "name": "buyAmount", + "type": "uint256" }, { "internalType": "uint256", - "name": "_required", + "name": "celoStableTokenExchangeRate", "type": "uint256" }, { "internalType": "uint256", - "name": "_internalRequired", + "name": "vetoPeriodSeconds", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "approvalTimestamp", "type": "uint256" } ], - "name": "initialize", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -15781,12 +17533,12 @@ func init() { { "constant": true, "inputs": [], - "name": "internalRequired", + "name": "isOwner", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, @@ -15795,59 +17547,41 @@ func init() { }, { "constant": true, - "inputs": [ + "inputs": [], + "name": "maxApprovalExchangeRateChange", + "outputs": [ { "internalType": "uint256", - "name": "transactionId", + "name": "value", "type": "uint256" } ], - "name": "isConfirmed", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ + "inputs": [], + "name": "owner", + "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], - "name": "isOwner", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "owners", + "inputs": [], + "name": "registry", "outputs": [ { - "internalType": "address", + "internalType": "contract IRegistry", "name": "", "type": "address" } @@ -15858,14 +17592,8 @@ func init() { }, { "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "removeOwner", + "inputs": [], + "name": "renounceOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -15876,16 +17604,11 @@ func init() { "inputs": [ { "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "newOwner", + "name": "registryAddress", "type": "address" } ], - "name": "replaceOwner", + "name": "setRegistry", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -15894,11 +17617,11 @@ func init() { { "constant": true, "inputs": [], - "name": "required", + "name": "spread", "outputs": [ { "internalType": "uint256", - "name": "", + "name": "value", "type": "uint256" } ], @@ -15907,47 +17630,42 @@ func init() { "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "uint256", - "name": "transactionId", - "type": "uint256" + "internalType": "string", + "name": "", + "type": "string" } ], - "name": "revokeConfirmation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "destination", - "type": "address" - }, + "name": "stableTokenExchangeLimits", + "outputs": [ { "internalType": "uint256", - "name": "value", + "name": "minExchangeAmount", "type": "uint256" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "uint256", + "name": "maxExchangeAmount", + "type": "uint256" } ], - "name": "submitTransaction", - "outputs": [ + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ { - "internalType": "uint256", - "name": "transactionId", - "type": "uint256" + "internalType": "address", + "name": "newOwner", + "type": "address" } ], + "name": "transferOwnership", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -15955,7 +17673,7 @@ func init() { { "constant": true, "inputs": [], - "name": "transactionCount", + "name": "vetoPeriodSeconds", "outputs": [ { "internalType": "uint256", @@ -15969,148 +17687,170 @@ func init() { }, { "constant": true, - "inputs": [ + "inputs": [], + "name": "getVersionNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, { "internalType": "uint256", "name": "", "type": "uint256" } ], - "name": "transactions", - "outputs": [ + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": false, + "inputs": [ { "internalType": "address", - "name": "destination", + "name": "_registry", + "type": "address" + }, + { + "internalType": "address", + "name": "_approver", "type": "address" }, { "internalType": "uint256", - "name": "value", + "name": "_maxApprovalExchangeRateChange", "type": "uint256" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "uint256", + "name": "_spread", + "type": "uint256" }, { - "internalType": "bool", - "name": "executed", - "type": "bool" + "internalType": "uint256", + "name": "_vetoPeriodSeconds", + "type": "uint256" } ], + "name": "initialize", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" - } - ]`)// GovernanceSlasher ABI - abis["GovernanceSlasher"] = mustParseABI(`[ + }, { + "constant": false, "inputs": [ + { + "internalType": "string", + "name": "stableTokenRegistryId", + "type": "string" + }, + { + "internalType": "uint256", + "name": "sellAmount", + "type": "uint256" + }, { "internalType": "bool", - "name": "test", + "name": "sellCelo", "type": "bool" } ], + "name": "createExchangeProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "payable": false, "stateMutability": "nonpayable", - "type": "constructor" + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "proposalId", "type": "uint256" } ], - "name": "GovernanceSlashPerformed", - "type": "event" + "name": "approveExchangeProposal", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" } ], - "name": "OwnershipTransferred", - "type": "event" + "name": "cancelExchangeProposal", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "registryAddress", - "type": "address" + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" } ], - "name": "RegistrySet", - "type": "event" + "name": "executeExchangeProposal", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" + "internalType": "uint256", + "name": "celoStableTokenExchangeRate", + "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "sellAmount", "type": "uint256" - } - ], - "name": "SlashingApproved", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "initialized", - "outputs": [ + }, { "internalType": "bool", - "name": "", + "name": "sellCelo", "type": "bool" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isOwner", + "name": "getBuyAmount", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "payable": false, @@ -16118,29 +17858,29 @@ func init() { "type": "function" }, { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ + "constant": false, + "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "internalType": "uint256", + "name": "index", + "type": "uint256" } ], + "name": "removeFromActiveProposalIdsSuperset", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "registry", + "name": "getActiveProposalIds", "outputs": [ { - "internalType": "contract IRegistry", + "internalType": "uint256[]", "name": "", - "type": "address" + "type": "uint256[]" } ], "payable": false, @@ -16148,42 +17888,29 @@ func init() { "type": "function" }, { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "address", - "name": "registryAddress", - "type": "address" + "internalType": "string", + "name": "stableTokenRegistryId", + "type": "string" } ], - "name": "setRegistry", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ + "name": "getStableTokenExchangeLimits", + "outputs": [ { - "internalType": "address", - "name": "newOwner", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "transferOwnership", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -16191,11 +17918,11 @@ func init() { "inputs": [ { "internalType": "address", - "name": "registryAddress", + "name": "newApprover", "type": "address" } ], - "name": "initialize", + "name": "setApprover", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -16204,76 +17931,69 @@ func init() { { "constant": false, "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, { "internalType": "uint256", - "name": "penalty", + "name": "newMaxApprovalExchangeRateChange", "type": "uint256" } ], - "name": "approveSlashing", + "name": "setMaxApprovalExchangeRateChange", "outputs": [], "payable": false, "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getApprovedSlashing", - "outputs": [ + "type": "function" + }, + { + "constant": false, + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "newSpread", "type": "uint256" } ], + "name": "setSpread", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address[]", - "name": "electionLessers", - "type": "address[]" + "internalType": "string", + "name": "stableTokenRegistryId", + "type": "string" }, { - "internalType": "address[]", - "name": "electionGreaters", - "type": "address[]" + "internalType": "uint256", + "name": "minExchangeAmount", + "type": "uint256" }, { - "internalType": "uint256[]", - "name": "electionIndices", - "type": "uint256[]" + "internalType": "uint256", + "name": "maxExchangeAmount", + "type": "uint256" } ], - "name": "slash", - "outputs": [ + "name": "setStableTokenExchangeLimits", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "uint256", + "name": "newVetoPeriodSeconds", + "type": "uint256" } ], + "name": "setVetoPeriodSeconds", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -17056,6 +18776,222 @@ func init() { "stateMutability": "nonpayable", "type": "function" } + ]`)// OdisPayments ABI + abis["OdisPayments"] = mustParseABI(`[ + { + "inputs": [ + { + "internalType": "bool", + "name": "test", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "valueInCUSD", + "type": "uint256" + } + ], + "name": "PaymentMade", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "initialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isOwner", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "registryContract", + "outputs": [ + { + "internalType": "contract IRegistry", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "totalPaidCUSD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getVersionNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "payInCUSD", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } ]`)// Proxy ABI abis["Proxy"] = mustParseABI(`[ { diff --git a/mycelo/env/core_contracts.go b/mycelo/env/core_contracts.go index d3cfe14495..30475cd840 100644 --- a/mycelo/env/core_contracts.go +++ b/mycelo/env/core_contracts.go @@ -51,6 +51,9 @@ var genesisAddresses = map[string]common.Address{ "ExchangeEUR": addr("0xf025"), "StableTokenBRL": addr("0xf026"), "ExchangeBRL": addr("0xf027"), + "GrandaMento": addr("0xf028"), + "FederatedAttestations": addr("0xf029"), + "OdisPayments": addr("0xf030"), // Contract Proxies "RegistryProxy": addr("0xce10"), @@ -81,6 +84,9 @@ var genesisAddresses = map[string]common.Address{ "ExchangeEURProxy": addr("0xd025"), "StableTokenBRLProxy": addr("0xd026"), "ExchangeBRLProxy": addr("0xd027"), + "GrandaMentoProxy": addr("0xd028"), + "FederatedAttestationsProxy": addr("0xd029"), + "OdisPaymentsProxy": addr("0xd030"), } var libraries = []string{ diff --git a/mycelo/genesis/README.md b/mycelo/genesis/README.md new file mode 100644 index 0000000000..137ca15a24 --- /dev/null +++ b/mycelo/genesis/README.md @@ -0,0 +1,5 @@ +To generate the *_parameters_json files: + +``` +go generate mycelo/genesis/config.g +``` diff --git a/mycelo/genesis/base_config.go b/mycelo/genesis/base_config.go index 87848f7cfc..37d2a2bd1c 100644 --- a/mycelo/genesis/base_config.go +++ b/mycelo/genesis/base_config.go @@ -178,5 +178,27 @@ func BaseConfig() *Config { BaselineUpdateFactor: fixed("0.2"), BaselineQuorumFactor: fixed("1"), }, + GrandaMento: GrandaMentoParameters{ + MaxApprovalExchangeRateChange: fixed("0.3"), + Spread: fixed("0.005"), + VetoPeriodSeconds: 10, + StableTokenExchangeLimits: []StableTokenExchangeLimit{ + { + StableToken: "StableToken", + MinExchangeAmount: bigIntStr("50000000000000000000000"), + MaxExchangeAmount: bigIntStr("50000000000000000000000000"), + }, + { + StableToken: "StableTokenEUR", + MinExchangeAmount: bigIntStr("40000000000000000000000"), + MaxExchangeAmount: bigIntStr("40000000000000000000000000"), + }, + { + StableToken: "StableTokenBRL", + MinExchangeAmount: bigIntStr("40000000000000000000000"), + MaxExchangeAmount: bigIntStr("40000000000000000000000000"), + }, + }, + }, } } diff --git a/mycelo/genesis/config.go b/mycelo/genesis/config.go index 3980c4e997..2e7bb6f77d 100644 --- a/mycelo/genesis/config.go +++ b/mycelo/genesis/config.go @@ -51,6 +51,7 @@ type Config struct { DoubleSigningSlasher DoubleSigningSlasherParameters DowntimeSlasher DowntimeSlasherParameters Governance GovernanceParameters + GrandaMento GrandaMentoParameters } // Save will write config into a json file @@ -278,6 +279,32 @@ type GasPriceMinimumParametersMarshaling struct { MinimumFloor *bigintstr.BigIntStr `json:"minimumFloor"` } +// GrandaMentoParameters are the initial configuration parameters for GrandaMento +type GrandaMentoParameters struct { + Approver common.Address `json:"approver"` + MaxApprovalExchangeRateChange *fixed.Fixed `json:"maxApprovalExchangeRateChange"` + Spread *fixed.Fixed `json:"spread"` + VetoPeriodSeconds uint64 `json:"vetoPeriodSeconds"` + StableTokenExchangeLimits StableTokenExchangeLimitsList `json:"stableTokenExchangeLimits"` +} + +//go:generate gencodec -type StableTokenExchangeLimit -field-override StableTokenExchangeLimitsMarshaling -out gen_stable_token_exchange_limit_json.go + +// StableTokenExchangeLimit represents the granda mento's exchange limit for a specific stable +type StableTokenExchangeLimit struct { + StableToken string `json:"stableToken"` + MinExchangeAmount *big.Int `json:"minExchangeAmount"` + MaxExchangeAmount *big.Int `json:"maxExchangeAmount"` +} + +type StableTokenExchangeLimitsMarshaling struct { + MinExchangeAmount *bigintstr.BigIntStr `json:"minExchangeAmount"` + MaxExchangeAmount *bigintstr.BigIntStr `json:"maxExchangeAmount"` +} + +// BalanceList list of balances +type StableTokenExchangeLimitsList []StableTokenExchangeLimit + //go:generate gencodec -type ReserveParameters -field-override ReserveParametersMarshaling -out gen_reserve_parameters_json.go // ReserveParameters are the initial configuration parameters for Reserve diff --git a/mycelo/genesis/gen_governance_parameters_json.go b/mycelo/genesis/gen_governance_parameters_json.go index 8a6e35b724..9b753c8a74 100644 --- a/mycelo/genesis/gen_governance_parameters_json.go +++ b/mycelo/genesis/gen_governance_parameters_json.go @@ -17,16 +17,16 @@ func (g GovernanceParameters) MarshalJSON() ([]byte, error) { type GovernanceParameters struct { UseMultiSig bool `json:"useMultiSig"` ConcurrentProposals uint64 `json:"concurrentProposals"` - MinDeposit *bigintstr.BigIntStr `json:"MinDeposit"` - QueueExpiry uint64 `json:"QueueExpiry"` - DequeueFrequency uint64 `json:"DequeueFrequency"` - ApprovalStageDuration uint64 `json:"ApprovalStageDuration"` - ReferendumStageDuration uint64 `json:"ReferendumStageDuration"` - ExecutionStageDuration uint64 `json:"ExecutionStageDuration"` + MinDeposit *bigintstr.BigIntStr `json:"minDeposit"` + QueueExpiry uint64 `json:"queueExpiry"` + DequeueFrequency uint64 `json:"dequeueFrequency"` + ApprovalStageDuration uint64 `json:"approvalStageDuration"` + ReferendumStageDuration uint64 `json:"referendumStageDuration"` + ExecutionStageDuration uint64 `json:"executionStageDuration"` ParticipationBaseline *fixed.Fixed `json:"participationBaseline"` ParticipationFloor *fixed.Fixed `json:"participationFloor"` - BaselineUpdateFactor *fixed.Fixed `json:"BaselineUpdateFactor"` - BaselineQuorumFactor *fixed.Fixed `json:"BaselineQuorumFactor"` + BaselineUpdateFactor *fixed.Fixed `json:"baselineUpdateFactor"` + BaselineQuorumFactor *fixed.Fixed `json:"baselineQuorumFactor"` } var enc GovernanceParameters enc.UseMultiSig = g.UseMultiSig @@ -49,16 +49,16 @@ func (g *GovernanceParameters) UnmarshalJSON(input []byte) error { type GovernanceParameters struct { UseMultiSig *bool `json:"useMultiSig"` ConcurrentProposals *uint64 `json:"concurrentProposals"` - MinDeposit *bigintstr.BigIntStr `json:"MinDeposit"` - QueueExpiry *uint64 `json:"QueueExpiry"` - DequeueFrequency *uint64 `json:"DequeueFrequency"` - ApprovalStageDuration *uint64 `json:"ApprovalStageDuration"` - ReferendumStageDuration *uint64 `json:"ReferendumStageDuration"` - ExecutionStageDuration *uint64 `json:"ExecutionStageDuration"` + MinDeposit *bigintstr.BigIntStr `json:"minDeposit"` + QueueExpiry *uint64 `json:"queueExpiry"` + DequeueFrequency *uint64 `json:"dequeueFrequency"` + ApprovalStageDuration *uint64 `json:"approvalStageDuration"` + ReferendumStageDuration *uint64 `json:"referendumStageDuration"` + ExecutionStageDuration *uint64 `json:"executionStageDuration"` ParticipationBaseline *fixed.Fixed `json:"participationBaseline"` ParticipationFloor *fixed.Fixed `json:"participationFloor"` - BaselineUpdateFactor *fixed.Fixed `json:"BaselineUpdateFactor"` - BaselineQuorumFactor *fixed.Fixed `json:"BaselineQuorumFactor"` + BaselineUpdateFactor *fixed.Fixed `json:"baselineUpdateFactor"` + BaselineQuorumFactor *fixed.Fixed `json:"baselineQuorumFactor"` } var dec GovernanceParameters if err := json.Unmarshal(input, &dec); err != nil { diff --git a/mycelo/genesis/gen_stable_token_exchange_limit_json.go b/mycelo/genesis/gen_stable_token_exchange_limit_json.go new file mode 100644 index 0000000000..626e4607b8 --- /dev/null +++ b/mycelo/genesis/gen_stable_token_exchange_limit_json.go @@ -0,0 +1,49 @@ +// Code generated by github.com/fjl/gencodec. DO NOT EDIT. + +package genesis + +import ( + "encoding/json" + "math/big" + + "github.com/celo-org/celo-blockchain/common/decimal/bigintstr" +) + +var _ = (*StableTokenExchangeLimitsMarshaling)(nil) + +// MarshalJSON marshals as JSON. +func (s StableTokenExchangeLimit) MarshalJSON() ([]byte, error) { + type StableTokenExchangeLimit struct { + StableToken string `json:"stableToken"` + MinExchangeAmount *bigintstr.BigIntStr `json:"minExchangeAmount"` + MaxExchangeAmount *bigintstr.BigIntStr `json:"maxExchangeAmount"` + } + var enc StableTokenExchangeLimit + enc.StableToken = s.StableToken + enc.MinExchangeAmount = (*bigintstr.BigIntStr)(s.MinExchangeAmount) + enc.MaxExchangeAmount = (*bigintstr.BigIntStr)(s.MaxExchangeAmount) + return json.Marshal(&enc) +} + +// UnmarshalJSON unmarshals from JSON. +func (s *StableTokenExchangeLimit) UnmarshalJSON(input []byte) error { + type StableTokenExchangeLimit struct { + StableToken *string `json:"stableToken"` + MinExchangeAmount *bigintstr.BigIntStr `json:"minExchangeAmount"` + MaxExchangeAmount *bigintstr.BigIntStr `json:"maxExchangeAmount"` + } + var dec StableTokenExchangeLimit + if err := json.Unmarshal(input, &dec); err != nil { + return err + } + if dec.StableToken != nil { + s.StableToken = *dec.StableToken + } + if dec.MinExchangeAmount != nil { + s.MinExchangeAmount = (*big.Int)(dec.MinExchangeAmount) + } + if dec.MaxExchangeAmount != nil { + s.MaxExchangeAmount = (*big.Int)(dec.MaxExchangeAmount) + } + return nil +} diff --git a/mycelo/genesis/genesis_state.go b/mycelo/genesis/genesis_state.go index 2f31cabb05..b3cdbb8f94 100644 --- a/mycelo/genesis/genesis_state.go +++ b/mycelo/genesis/genesis_state.go @@ -80,82 +80,96 @@ func (ctx *deployContext) deploy() (core.GenesisAlloc, error) { ctx.fundAdminAccount() deploySteps := [](func() error){ + // X, Y => X is the number in this list, Y is the migration number in the protocol folder for the core contracts + + // i:00, migr:01 Libraries ctx.deployLibraries, - // 01 Registry + + // i:01, migr:02 Registry ctx.deployRegistry, - // 02 Freezer + + // i:02, migr:03 Freezer ctx.deployFreezer, - // 03 TransferWhitelist + // i:03, migr:03 TransferWhitelist ctx.deployTransferWhitelist, - // 03.bis FeeCurrencyWhitelist + // i:04, migr:03 FeeCurrencyWhitelist ctx.deployFeeCurrencyWhitelist, - // 04 GoldToken + // i:05, migr:04 GoldToken ctx.deployGoldToken, - // 05 SortedOracles + // i:06, migr:05 SortedOracles ctx.deploySortedOracles, - // 06 GasPriceMinimum + // i:07, migr:06 GasPriceMinimum ctx.deployGasPriceMinimum, - // 07 Reserve + // i:08, migr:07 Reserve ctx.deployReserve, - // 08 ReserveSpenderMultisig (requires reserve to work) + // i:09, migr:08 ReserveSpenderMultisig (requires reserve to work) ctx.deployReserveSpenderMultisig, - // 09 StableToken, StableTokenEUR and StableTokenBRL + // i:10, migr:09 StableToken, StableTokenEUR and StableTokenBRL ctx.deployStableTokens, - // 10 Exchange, ExchangeEUR and ExchangeBRL + // i:11, migr:10 Exchange, ExchangeEUR and ExchangeBRL ctx.deployExchanges, - // 11 Accounts + // i:12, migr:11 Accounts ctx.deployAccounts, - // 12 LockedGold + // i:13, migr:12 LockedGold ctx.deployLockedGold, - // 13 Validators + // i:14, migr:13 Validators ctx.deployValidators, - // 14 Election + // i:15, migr:14 Election ctx.deployElection, - // 15 EpochRewards + // i:16, migr:15 EpochRewards ctx.deployEpochRewards, - // 16 Random + // i:17, migr:16 Random ctx.deployRandom, - // 17 Attestations + // i:18, migr17 Attestations ctx.deployAttestations, - // 18 Escrow + // 1:19, migr:18 Escrow ctx.deployEscrow, - // 19 BlockchainParameters + // i:20, migr:19 BlockchainParameters ctx.deployBlockchainParameters, - // 20 GovernanceSlasher + // i:21, migr:20 GovernanceSlasher ctx.deployGovernanceSlasher, - // 21 DoubleSigningSlasher + // i:22, migr:21 DoubleSigningSlasher ctx.deployDoubleSigningSlasher, - // 22 DowntimeSlasher + // i:23, migr:22 DowntimeSlasher ctx.deployDowntimeSlasher, - // 23 GovernanceApproverMultiSig + // i:24, migr:23 GovernanceApproverMultiSig ctx.deployGovernanceApproverMultiSig, - // 24 Governance + // i:25, migr:24 GrandaMento + ctx.deployGrandaMento, + + // i:26, migr:25 FederatedAttestations + ctx.deployFederatedAttestations, + + // i:27, migr:26 OdisPayment + ctx.deployOdisPayments, + + // i:28, migr:27 Governance ctx.deployGovernance, - // 25 Elect Validators + // i:29, migr:28 Elect Validators ctx.electValidators, } @@ -461,7 +475,7 @@ func (ctx *deployContext) deployAttestations() error { func (ctx *deployContext) deployEscrow() error { return ctx.deployCoreContract("Escrow", func(contract *contract.EVMBackend) error { - return contract.SimpleCall("initialize", env.MustProxyAddressFor("Registry")) + return contract.SimpleCall("initialize") }) } @@ -471,6 +485,46 @@ func (ctx *deployContext) deployFeeCurrencyWhitelist() error { }) } +func (ctx *deployContext) deployGrandaMento() error { + approver := ctx.accounts.AdminAccount().Address + + err := ctx.deployCoreContract("GrandaMento", func(contract *contract.EVMBackend) error { + return contract.SimpleCall("initialize", + env.MustProxyAddressFor("Registry"), + approver, + ctx.genesisConfig.GrandaMento.MaxApprovalExchangeRateChange.BigInt(), + ctx.genesisConfig.GrandaMento.Spread.BigInt(), + newBigInt(ctx.genesisConfig.GrandaMento.VetoPeriodSeconds), + ) + }) + if err != nil { + return err + } + + ctx.logger.Info("Adding GrandaMento as a new exchange spender to the reserve", "GrandaMento", env.MustProxyAddressFor("GrandaMento")) + ctx.contract("Reserve").SimpleCall("addExchangeSpender", env.MustProxyAddressFor("GrandaMento")) + + for _, exchangeLimit := range ctx.genesisConfig.GrandaMento.StableTokenExchangeLimits { + err = ctx.contract("GrandaMento").SimpleCall("setStableTokenExchangeLimits", exchangeLimit.StableToken, exchangeLimit.MinExchangeAmount, exchangeLimit.MaxExchangeAmount) + if err != nil { + return err + } + } + return nil +} + +func (ctx *deployContext) deployFederatedAttestations() error { + return ctx.deployCoreContract("FederatedAttestations", func(contract *contract.EVMBackend) error { + return contract.SimpleCall("initialize") + }) +} + +func (ctx *deployContext) deployOdisPayments() error { + return ctx.deployCoreContract("OdisPayments", func(contract *contract.EVMBackend) error { + return contract.SimpleCall("initialize") + }) +} + func (ctx *deployContext) deployGoldToken() error { err := ctx.deployCoreContract("GoldToken", func(contract *contract.EVMBackend) error { return contract.SimpleCall("initialize", env.MustProxyAddressFor("Registry")) diff --git a/mycelo/internal/scripts/generate/main.go b/mycelo/internal/scripts/generate/main.go index cc9bbcc0b4..e2a7d98804 100644 --- a/mycelo/internal/scripts/generate/main.go +++ b/mycelo/internal/scripts/generate/main.go @@ -66,6 +66,9 @@ var contractNames = []string{ "DowntimeSlasher", "GovernanceApproverMultiSig", "Governance", + "GrandaMento", + "FederatedAttestations", + "OdisPayments", } var buildPath = flag.String("buildpath", "", "the folder where truffle contract build live (on monorepo ./packages/protocol/build/contracts )") From a69a9de4048fd66a025bf0874a2ee8ec19dde2ee Mon Sep 17 00:00:00 2001 From: pputman-clabs <99900942+pputman-clabs@users.noreply.github.com> Date: Thu, 16 Feb 2023 03:34:17 -0600 Subject: [PATCH 17/18] testing akeyless workflow (#2013) Changes the PR_COMMENT_TOKEN used to authenticate to github, to be a github organization app token instead of a personal access token, but generated by akeyless for each run. Now it should use the akeyless context in circle ci to access the accessid variable, which is a nonsensitive id to know which akeyless auth method to use for circle ci. This should use oauth2 to authenticate to akeyless by the circle CI organization and project ID, and have access to generate a temporary secret that gives access to write to PRs for the the celo-blockchain github repository. Then using the akeyless command line utility to generate the new key, it saves it and persists it via workspaces to share with the necessary jobs. --- .circleci/config.yml | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 30f693c00c..95b68e4436 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -279,6 +279,34 @@ jobs: - run: go mod download - *save-go-mod-cache + akeyless-get-token: + docker: + - image: akeyless/ci_base + environment: + PR_WRITE_TOKEN_PATH: /dynamic-secrets/keys/github/celo-blockchain/pull_requests=write + steps: + - checkout + - run: + name: "update akeyless cli tool to latest version" + command: akeyless update + + - run: + name: "authenticate to akeyless via OIDC" + command: akeyless auth --access-id $accessid --access-type jwt --jwt $CIRCLE_OIDC_TOKEN --json | jq '.token' -r > ~/.vault_token + + - run: + name: "Get PR Comment token (and remove unnecessary information and punctuation)" + command: TOKEN=$(cat ~/.vault_token) && echo export PR_COMMENT_TOKEN2=$(akeyless get-dynamic-secret-value --name $PR_WRITE_TOKEN_PATH --token $TOKEN |grep token | awk '{print $2}' | tr -d '"",' ) >> "$BASH_ENV" + + - run: + name: "Copy $BASH_ENV to bash.env file so we can persist that to workspaces" + command: cp $BASH_ENV bash.env + + - persist_to_workspace: + root: . + paths: + - bash.env + prepare-system-contracts: parameters: cache-key: @@ -377,6 +405,11 @@ jobs: go run tools/parsecov/main.go -packagePrefix github.com/celo-org/celo-blockchain/ cov.out > summary cat summary + - attach_workspace: + at: . + - run: | + cat bash.env > $BASH_ENV + - run: name: Post summary comment on PR command: | @@ -436,7 +469,8 @@ jobs: # replaced by '\n'. Using backtics causes there to be a round of # backslash processing on the command before execution, so we # need to double the backslashes in the awk command. - curl -u piersy:${PR_COMMENT_TOKEN} -X ${CURL_VERB} $URL -d "{\"body\":\"`awk -v ORS='\\\\n' '1' comment`\"}" ; + curl -u celo-org:${PR_COMMENT_TOKEN2} -X ${CURL_VERB} $URL -d "{\"body\":\"`awk -v ORS='\\\\n' '1' comment`\"}" ; + e2e-benchmarks: executor: golang @@ -615,10 +649,14 @@ workflows: requires: - go-modules - prepare-system-contracts + - akeyless-get-token: + context: + - akeyless - istanbul-e2e-coverage: requires: - go-modules - prepare-system-contracts + - akeyless-get-token - e2e-benchmarks: requires: - go-modules From a0df3fb5d946524d1d34d8b182d1013223c84984 Mon Sep 17 00:00:00 2001 From: Michael Straka Date: Thu, 16 Feb 2023 11:56:53 -0600 Subject: [PATCH 18/18] Update celo-bls-go version to v0.3.4 (#2012) * update celo-bls-go version to fix issue #2005 * fix go.sum * go mod tidy --- go.mod | 2 +- go.sum | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 4acc91466b..d2aadbdd5a 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/btcsuite/btcd/btcec/v2 v2.1.3 github.com/btcsuite/btcd/btcutil v1.1.1 github.com/buraksezer/consistent v0.0.0-20191006190839-693edf70fd72 - github.com/celo-org/celo-bls-go v0.3.3 + github.com/celo-org/celo-bls-go v0.3.4 github.com/cespare/cp v0.1.0 github.com/cespare/xxhash/v2 v2.1.1 github.com/cloudflare/cloudflare-go v0.14.0 diff --git a/go.sum b/go.sum index b27c70c1e2..62cde6e5c0 100644 --- a/go.sum +++ b/go.sum @@ -106,20 +106,20 @@ github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46f github.com/buraksezer/consistent v0.0.0-20191006190839-693edf70fd72 h1:fUmDBbSvv1uOzo/t8WaxZMVb7BxJ8JECo5lGoR9c5bA= github.com/buraksezer/consistent v0.0.0-20191006190839-693edf70fd72/go.mod h1:OEE5igu/CDjGegM1Jn6ZMo7R6LlV/JChAkjfQQIRLpg= github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= -github.com/celo-org/celo-bls-go v0.3.3 h1:kOkm/BeM0YwHWUTwSLprxhk1IFq/ZjaWVtW6jTZ0+ys= -github.com/celo-org/celo-bls-go v0.3.3/go.mod h1:eoMAORYWgZ5HOo3Z0bIAv/nbPtj/eArIO0nh7XFx7rk= -github.com/celo-org/celo-bls-go-android v0.3.2 h1:pa6T14NUaf5S1vkq+90gya4ckVLefl4YtUhQKi22wvI= -github.com/celo-org/celo-bls-go-android v0.3.2/go.mod h1:cFgtFRH8+6x5b+EyG5SqniXY3aKd03NBSGDgITscX34= -github.com/celo-org/celo-bls-go-ios v0.3.2 h1:xR+3h80nyB1jRZB7GUChHpX93+iDIywH0qeGhWiZ/6w= -github.com/celo-org/celo-bls-go-ios v0.3.2/go.mod h1:eaSoMpx29YV5oF7jXVChzJpNfxeZHnAa8G4PjL5CyW0= -github.com/celo-org/celo-bls-go-linux v0.3.2 h1:je4JIot91S9uPLvh0D2mK3yxbE9VynGhEP56nmer0l4= -github.com/celo-org/celo-bls-go-linux v0.3.2/go.mod h1:DVpJadg22OrxBtMb0ub6iNVdqDBL/r6EDdWVAA0bHa0= -github.com/celo-org/celo-bls-go-macos v0.3.2 h1:S5C3kwXXiPlS4pPRr3t7nDeyJVo5lSFMzhfUEaHlg6I= -github.com/celo-org/celo-bls-go-macos v0.3.2/go.mod h1:mYPuRqGMVxj6yZUeL6Q6ggtP52HPBS1jz+FvBPXQ7QA= -github.com/celo-org/celo-bls-go-other v0.3.2 h1:Onbcv1FkNl/1TfBI/AfedzTCGAlChOOPEcEvPnE99M4= -github.com/celo-org/celo-bls-go-other v0.3.2/go.mod h1:tNxZNfekzyT7TdYQbyNPhkfpcYtA3KCU/IKX5FNxM/U= -github.com/celo-org/celo-bls-go-windows v0.3.2 h1:HpauxEhxeGedvsfZC4aBo8ADlNstihm1gKnVQMmdxuY= -github.com/celo-org/celo-bls-go-windows v0.3.2/go.mod h1:82GC5iJA9Qw5gynhYqR8ht3J+l/MO8eSNzgSTMI8UdA= +github.com/celo-org/celo-bls-go v0.3.4 h1:slNePT/gVjgUi7f8M4KTwBz/YYgv3JWU6XqyY0xKN84= +github.com/celo-org/celo-bls-go v0.3.4/go.mod h1:qDZHMC3bBqOw5qle28cRtKlEyJhslZtckcc2Tomqdks= +github.com/celo-org/celo-bls-go-android v0.3.3 h1:iZ2Gragn3JItkptmppeq1SENmNVc1f1W25UE4u231HY= +github.com/celo-org/celo-bls-go-android v0.3.3/go.mod h1:cFgtFRH8+6x5b+EyG5SqniXY3aKd03NBSGDgITscX34= +github.com/celo-org/celo-bls-go-ios v0.3.3 h1:/yHaEYft9WfXyPIGuJz7V2/r+tp2IqSpkvKsMsVgbuY= +github.com/celo-org/celo-bls-go-ios v0.3.3/go.mod h1:eaSoMpx29YV5oF7jXVChzJpNfxeZHnAa8G4PjL5CyW0= +github.com/celo-org/celo-bls-go-linux v0.3.3 h1:ukSQSIRyFCQeC1i7LJJunRKvlLuG1JMwNZ6DQZC51fE= +github.com/celo-org/celo-bls-go-linux v0.3.3/go.mod h1:DVpJadg22OrxBtMb0ub6iNVdqDBL/r6EDdWVAA0bHa0= +github.com/celo-org/celo-bls-go-macos v0.3.3 h1:H4ZGc+kS3e/w9Q6qru6FtlkYtVDS8eIQgw6UURB/Jlo= +github.com/celo-org/celo-bls-go-macos v0.3.3/go.mod h1:mYPuRqGMVxj6yZUeL6Q6ggtP52HPBS1jz+FvBPXQ7QA= +github.com/celo-org/celo-bls-go-other v0.3.3 h1:/Q9SLJK22hibPm/WI/OPxbBmgXTgUhjUgobfzz7qj/w= +github.com/celo-org/celo-bls-go-other v0.3.3/go.mod h1:tNxZNfekzyT7TdYQbyNPhkfpcYtA3KCU/IKX5FNxM/U= +github.com/celo-org/celo-bls-go-windows v0.3.3 h1:0IP+Ad9l+op50TIfkmFr+j7+TIjKksVROe+EoF7Ixa4= +github.com/celo-org/celo-bls-go-windows v0.3.3/go.mod h1:82GC5iJA9Qw5gynhYqR8ht3J+l/MO8eSNzgSTMI8UdA= github.com/celo-org/mobile v0.0.0-20210324213558-66ac87d7fb95/go.mod h1:skQtrUTUwhdJvXM/2KKJzY8pDgNr9I/FOMqDVRPBUS4= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk=