From 684a115effce49e81bd1985a4566f8fadae8c693 Mon Sep 17 00:00:00 2001 From: Tudor Malene Date: Tue, 22 Oct 2024 10:24:24 +0100 Subject: [PATCH 01/19] cache receipts (#2103) * cache receipts * cleanup * adjust cache * clarify logic * address pr comments --- go/enclave/core/event_types.go | 2 +- go/enclave/enclave.go | 2 +- go/enclave/evm/evm_facade.go | 4 +- go/enclave/rpc/GetTransactionReceipt.go | 129 ++++++++++++++++++++++- go/enclave/rpc/rpc_encryption_manager.go | 4 +- go/enclave/storage/cache_service.go | 57 +++++++--- go/enclave/storage/enclavedb/events.go | 8 +- go/enclave/storage/events_storage.go | 10 +- go/enclave/storage/interfaces.go | 5 +- go/enclave/storage/storage.go | 17 ++- go/enclave/system/hooks.go | 2 +- 11 files changed, 207 insertions(+), 33 deletions(-) diff --git a/go/enclave/core/event_types.go b/go/enclave/core/event_types.go index 87fe389808..c8eb16701a 100644 --- a/go/enclave/core/event_types.go +++ b/go/enclave/core/event_types.go @@ -33,6 +33,7 @@ type TxExecResult struct { Receipt *types.Receipt CreatedContracts map[gethcommon.Address]*ContractVisibilityConfig Tx *types.Transaction + From *gethcommon.Address Err error } @@ -43,7 +44,6 @@ type InternalReceipt struct { CumulativeGasUsed uint64 EffectiveGasPrice *uint64 CreatedContract *gethcommon.Address - TxContent []byte TxHash gethcommon.Hash BlockHash gethcommon.Hash BlockNumber *big.Int diff --git a/go/enclave/enclave.go b/go/enclave/enclave.go index 3a7c1178d1..eb816b901d 100644 --- a/go/enclave/enclave.go +++ b/go/enclave/enclave.go @@ -242,7 +242,7 @@ func NewEnclave( registry, config.GasLocalExecutionCapFlag, ) - rpcEncryptionManager := rpc.NewEncryptionManager(ecies.ImportECDSA(obscuroKey), storage, registry, crossChainProcessors, service, config, gasOracle, storage, blockProcessor, chain, logger) + rpcEncryptionManager := rpc.NewEncryptionManager(ecies.ImportECDSA(obscuroKey), storage, cachingService, registry, crossChainProcessors, service, config, gasOracle, storage, blockProcessor, chain, logger) subscriptionManager := events.NewSubscriptionManager(storage, registry, config.ObscuroChainID, logger) // ensure cached chain state data is up-to-date using the persisted batch data diff --git a/go/enclave/evm/evm_facade.go b/go/enclave/evm/evm_facade.go index 34da164093..8994e9e32d 100644 --- a/go/enclave/evm/evm_facade.go +++ b/go/enclave/evm/evm_facade.go @@ -248,7 +248,7 @@ func executeTransaction( header.MixDigest = before if err != nil { s.RevertToSnapshot(snap) - return &core.TxExecResult{Receipt: receipt, Tx: t.Tx, Err: err} + return &core.TxExecResult{Receipt: receipt, Tx: t.Tx, From: &from, Err: err} } contractsWithVisibility := make(map[gethcommon.Address]*core.ContractVisibilityConfig) @@ -256,7 +256,7 @@ func executeTransaction( contractsWithVisibility[*contractAddress] = readVisibilityConfig(vmenv, contractAddress) } - return &core.TxExecResult{Receipt: receipt, Tx: t.Tx, CreatedContracts: contractsWithVisibility} + return &core.TxExecResult{Receipt: receipt, Tx: t.Tx, From: &from, CreatedContracts: contractsWithVisibility} } const ( diff --git a/go/enclave/rpc/GetTransactionReceipt.go b/go/enclave/rpc/GetTransactionReceipt.go index 0eba4fbbb1..b135f29d1d 100644 --- a/go/enclave/rpc/GetTransactionReceipt.go +++ b/go/enclave/rpc/GetTransactionReceipt.go @@ -1,9 +1,16 @@ package rpc import ( + "context" "errors" "fmt" + "github.com/ten-protocol/go-ten/go/enclave/storage" + "github.com/ten-protocol/go-ten/go/enclave/storage/enclavedb" + + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/core/types" + gethcommon "github.com/ethereum/go-ethereum/common" "github.com/ten-protocol/go-ten/go/common/errutil" "github.com/ten-protocol/go-ten/go/common/log" @@ -31,6 +38,18 @@ func GetTransactionReceiptExecute(builder *CallBuilder[gethcommon.Hash, map[stri requester := builder.VK.AccountAddress rpc.logger.Trace("Get receipt for ", log.TxKey, txHash, "requester", requester.Hex()) + // first try the cache for recent transactions + result, err := fetchFromCache(builder.ctx, rpc.storage, rpc.cacheService, txHash, requester) + if err != nil { + return err + } + + if result != nil { + rpc.logger.Trace("Successfully retrieved receipt from cache for ", log.TxKey, txHash, "rec", result) + builder.ReturnValue = &result + return nil + } + exists, err := rpc.storage.ExistsTransactionReceipt(builder.ctx, txHash) if err != nil { return fmt.Errorf("could not retrieve transaction receipt in eth_getTransactionReceipt request. Cause: %w", err) @@ -41,7 +60,7 @@ func GetTransactionReceiptExecute(builder *CallBuilder[gethcommon.Hash, map[stri } // We retrieve the transaction receipt. - receipt, err := rpc.storage.GetTransactionReceipt(builder.ctx, txHash, requester, false) + receipt, err := rpc.storage.GetFilteredInternalReceipt(builder.ctx, txHash, requester, false) if err != nil { rpc.logger.Trace("error getting tx receipt", log.TxKey, txHash, log.ErrKey, err) if errors.Is(err, errutil.ErrNotFound) { @@ -57,3 +76,111 @@ func GetTransactionReceiptExecute(builder *CallBuilder[gethcommon.Hash, map[stri builder.ReturnValue = &r return nil } + +func fetchFromCache(ctx context.Context, storage storage.Storage, cacheService *storage.CacheService, txHash gethcommon.Hash, requester *gethcommon.Address) (map[string]interface{}, error) { + rec, _ := cacheService.ReadReceipt(ctx, txHash) + if rec == nil { + return nil, nil + } + + // receipt found in cache + // for simplicity only the tx sender will access the cache + // check whether the requester is the sender + if rec.From != requester { + return nil, nil + } + + logs := rec.Receipt.Logs + // filter out the logs that the sender can't read + // doesn't apply to contract creation (when to=nil) + if len(logs) > 0 && (rec.To != nil && *rec.To != (gethcommon.Address{})) { + ctr, err := storage.ReadContract(ctx, *rec.To) + if err != nil && !errors.Is(err, errutil.ErrNotFound) { + return nil, fmt.Errorf("could not read contract in eth_getTransactionReceipt request. Cause: %w", err) + } + // only filter when the transaction calls a contract. Value transfers emit no events. + if ctr != nil { + logs, err = filterLogs(ctx, storage, rec.Receipt.Logs, ctr, requester) + if err != nil { + return nil, fmt.Errorf("could not filter cached logs in eth_getTransactionReceipt request. Cause: %w", err) + } + } + } + r := marshalReceipt(rec.Receipt, logs, rec.From, rec.To) + return r, nil +} + +func filterLogs(ctx context.Context, storage storage.Storage, logs []*types.Log, ctr *enclavedb.Contract, requester *gethcommon.Address) ([]*types.Log, error) { + filtered := make([]*types.Log, 0) + for _, l := range logs { + canView, err := senderCanViewLog(ctx, storage, ctr, l, requester) + if err != nil { + return nil, err + } + if canView { + filtered = append(filtered, l) + } + } + return filtered, nil +} + +func senderCanViewLog(ctx context.Context, storage storage.Storage, ctr *enclavedb.Contract, l *types.Log, sender *gethcommon.Address) (bool, error) { + eventSig := l.Topics[0] + eventType, err := storage.ReadEventType(ctx, ctr.Address, eventSig) + if err != nil { + return false, fmt.Errorf("could not read event type in eth_getTransactionReceipt request. Cause: %w", err) + } + // event visibility logic + canView := eventType.IsPublic() || + (eventType.AutoPublic != nil && *eventType.AutoPublic) || + (eventType.SenderCanView != nil && *eventType.SenderCanView) || + (eventType.Topic1CanView != nil && *eventType.Topic1CanView && isAddress(l.Topics, 1, sender)) || + (eventType.Topic2CanView != nil && *eventType.Topic2CanView && isAddress(l.Topics, 2, sender)) || + (eventType.Topic3CanView != nil && *eventType.Topic3CanView && isAddress(l.Topics, 3, sender)) || + (eventType.AutoVisibility && (isAddress(l.Topics, 1, sender) || isAddress(l.Topics, 2, sender) || isAddress(l.Topics, 3, sender))) + return canView, nil +} + +func isAddress(topics []gethcommon.Hash, nr int, requester *gethcommon.Address) bool { + if len(topics) < nr+1 { + return false + } + topic := gethcommon.Address(topics[nr].Bytes()) + return topic == *requester +} + +// marshalReceipt marshals a transaction receipt into a JSON object. +// taken from geth +func marshalReceipt(receipt *types.Receipt, logs []*types.Log, from, to *gethcommon.Address) map[string]interface{} { + fields := map[string]interface{}{ + "blockHash": receipt.BlockHash.Hex(), + "blockNumber": hexutil.Uint64(receipt.BlockNumber.Uint64()), + "transactionHash": receipt.TxHash.Hex(), + "transactionIndex": hexutil.Uint64(receipt.TransactionIndex), + "from": from, + "to": to, + "gasUsed": hexutil.Uint64(receipt.GasUsed), + "cumulativeGasUsed": hexutil.Uint64(receipt.CumulativeGasUsed), + "contractAddress": nil, + "logs": logs, + "logsBloom": receipt.Bloom, + "type": hexutil.Uint(receipt.Type), + "effectiveGasPrice": (*hexutil.Big)(receipt.EffectiveGasPrice), + } + + // Assign receipt status or post state. + if len(receipt.PostState) > 0 { + fields["root"] = hexutil.Bytes(receipt.PostState) + } else { + fields["status"] = hexutil.Uint(receipt.Status) + } + if receipt.Logs == nil { + fields["logs"] = []*types.Log{} + } + + // If the ContractAddress is 20 0x0 bytes, assume it is not a contract creation + if receipt.ContractAddress != (gethcommon.Address{}) { + fields["contractAddress"] = receipt.ContractAddress + } + return fields +} diff --git a/go/enclave/rpc/rpc_encryption_manager.go b/go/enclave/rpc/rpc_encryption_manager.go index 2c94d76a99..731b8c3d17 100644 --- a/go/enclave/rpc/rpc_encryption_manager.go +++ b/go/enclave/rpc/rpc_encryption_manager.go @@ -22,6 +22,7 @@ type EncryptionManager struct { chain l2chain.ObscuroChain enclavePrivateKeyECIES *ecies.PrivateKey storage storage.Storage + cacheService *storage.CacheService registry components.BatchRegistry processors *crosschain.Processors service nodetype.NodeType @@ -33,9 +34,10 @@ type EncryptionManager struct { whitelist *privacy.Whitelist } -func NewEncryptionManager(enclavePrivateKeyECIES *ecies.PrivateKey, storage storage.Storage, registry components.BatchRegistry, processors *crosschain.Processors, service nodetype.NodeType, config *config.EnclaveConfig, oracle gas.Oracle, blockResolver storage.BlockResolver, l1BlockProcessor components.L1BlockProcessor, chain l2chain.ObscuroChain, logger gethlog.Logger) *EncryptionManager { +func NewEncryptionManager(enclavePrivateKeyECIES *ecies.PrivateKey, storage storage.Storage, cacheService *storage.CacheService, registry components.BatchRegistry, processors *crosschain.Processors, service nodetype.NodeType, config *config.EnclaveConfig, oracle gas.Oracle, blockResolver storage.BlockResolver, l1BlockProcessor components.L1BlockProcessor, chain l2chain.ObscuroChain, logger gethlog.Logger) *EncryptionManager { return &EncryptionManager{ storage: storage, + cacheService: cacheService, registry: registry, processors: processors, service: service, diff --git a/go/enclave/storage/cache_service.go b/go/enclave/storage/cache_service.go index 79203fe58d..ae1fde3867 100644 --- a/go/enclave/storage/cache_service.go +++ b/go/enclave/storage/cache_service.go @@ -28,6 +28,9 @@ const ( hashCost = 32 idCost = 8 batchCost = 1024 * 1024 + receiptCost = 1024 * 50 + contractCost = 60 + eventTypeCost = 120 ) type CacheService struct { @@ -62,6 +65,11 @@ type CacheService struct { // store the last few batches together with the content lastBatchesCache *cache.Cache[*core.Batch] + // store all recent receipts in a cache + // together with the sender - and for each log whether it is visible by the sender + // only sender can view configured + receiptCache *cache.Cache[*CachedReceipt] + logger gethlog.Logger } @@ -74,6 +82,9 @@ func NewCacheService(logger gethlog.Logger) *CacheService { nrBatches := int64(50) ristrettoStoreForBatches := newCache(logger, nrBatches, nrBatches*batchCost) + nrReceiptsToCache := int64(10_000) + ristrettoStoreForReceipts := newCache(logger, nrReceiptsToCache, nrReceiptsToCache*receiptCost) + return &CacheService{ blockCache: cache.New[*types.Header](ristrettoStore), batchCacheBySeqNo: cache.New[*common.BatchHeader](ristrettoStore), @@ -84,8 +95,10 @@ func NewCacheService(logger gethlog.Logger) *CacheService { contractAddressCache: cache.New[*enclavedb.Contract](ristrettoStore), eventTypeCache: cache.New[*enclavedb.EventType](ristrettoStore), convertedGethHeaderCache: cache.New[*types.Header](ristrettoStore), - lastBatchesCache: cache.New[*core.Batch](ristrettoStoreForBatches), - logger: logger, + + receiptCache: cache.New[*CachedReceipt](ristrettoStoreForReceipts), + lastBatchesCache: cache.New[*core.Batch](ristrettoStoreForBatches), + logger: logger, } } @@ -109,6 +122,10 @@ func (cs *CacheService) CacheBlock(ctx context.Context, b *types.Header) { cacheValue(ctx, cs.blockCache, cs.logger, b.Hash(), b, blockHeaderCost) } +func (cs *CacheService) CacheReceipt(ctx context.Context, r *CachedReceipt) { + cacheValue(ctx, cs.receiptCache, cs.logger, r.Receipt.TxHash, r, receiptCost) +} + func (cs *CacheService) CacheBatch(ctx context.Context, batch *core.Batch) { cacheValue(ctx, cs.batchCacheBySeqNo, cs.logger, batch.SeqNo().Uint64(), batch.Header, batchHeaderCost) cacheValue(ctx, cs.seqCacheByHash, cs.logger, batch.Hash(), batch.SeqNo(), idCost) @@ -120,52 +137,62 @@ func (cs *CacheService) CacheBatch(ctx context.Context, batch *core.Batch) { } func (cs *CacheService) ReadBlock(ctx context.Context, key gethcommon.Hash, onCacheMiss func(any) (*types.Header, error)) (*types.Header, error) { - return getCachedValue(ctx, cs.blockCache, cs.logger, key, blockHeaderCost, onCacheMiss) + return getCachedValue(ctx, cs.blockCache, cs.logger, key, blockHeaderCost, onCacheMiss, true) } func (cs *CacheService) ReadBatchSeqByHash(ctx context.Context, hash common.L2BatchHash, onCacheMiss func(any) (*big.Int, error)) (*big.Int, error) { - return getCachedValue(ctx, cs.seqCacheByHash, cs.logger, hash, idCost, onCacheMiss) + return getCachedValue(ctx, cs.seqCacheByHash, cs.logger, hash, idCost, onCacheMiss, true) } func (cs *CacheService) ReadBatchSeqByHeight(ctx context.Context, height uint64, onCacheMiss func(any) (*big.Int, error)) (*big.Int, error) { // the key is (height+1), because for some reason it doesn't like a key of 0 - return getCachedValue(ctx, cs.seqCacheByHeight, cs.logger, height+1, idCost, onCacheMiss) + return getCachedValue(ctx, cs.seqCacheByHeight, cs.logger, height+1, idCost, onCacheMiss, true) } func (cs *CacheService) ReadConvertedHash(ctx context.Context, hash common.L2BatchHash, onCacheMiss func(any) (*gethcommon.Hash, error)) (*gethcommon.Hash, error) { - return getCachedValue(ctx, cs.convertedHashCache, cs.logger, hash, hashCost, onCacheMiss) + return getCachedValue(ctx, cs.convertedHashCache, cs.logger, hash, hashCost, onCacheMiss, true) } func (cs *CacheService) ReadBatchHeader(ctx context.Context, seqNum uint64, onCacheMiss func(any) (*common.BatchHeader, error)) (*common.BatchHeader, error) { - return getCachedValue(ctx, cs.batchCacheBySeqNo, cs.logger, seqNum, batchHeaderCost, onCacheMiss) + return getCachedValue(ctx, cs.batchCacheBySeqNo, cs.logger, seqNum, batchHeaderCost, onCacheMiss, true) } func (cs *CacheService) ReadBatch(ctx context.Context, seqNum uint64, onCacheMiss func(any) (*core.Batch, error)) (*core.Batch, error) { - return getCachedValue(ctx, cs.lastBatchesCache, cs.logger, seqNum, batchCost, onCacheMiss) + return getCachedValue(ctx, cs.lastBatchesCache, cs.logger, seqNum, batchCost, onCacheMiss, true) } func (cs *CacheService) ReadEOA(ctx context.Context, addr gethcommon.Address, onCacheMiss func(any) (*uint64, error)) (*uint64, error) { - return getCachedValue(ctx, cs.eoaCache, cs.logger, addr, idCost, onCacheMiss) + return getCachedValue(ctx, cs.eoaCache, cs.logger, addr, idCost, onCacheMiss, true) } func (cs *CacheService) ReadContractAddr(ctx context.Context, addr gethcommon.Address, onCacheMiss func(any) (*enclavedb.Contract, error)) (*enclavedb.Contract, error) { - return getCachedValue(ctx, cs.contractAddressCache, cs.logger, addr, idCost, onCacheMiss) + return getCachedValue(ctx, cs.contractAddressCache, cs.logger, addr, contractCost, onCacheMiss, true) +} + +type CachedReceipt struct { + Receipt *types.Receipt + From *gethcommon.Address + To *gethcommon.Address +} + +func (cs *CacheService) ReadReceipt(ctx context.Context, txHash gethcommon.Hash) (*CachedReceipt, error) { + return cs.receiptCache.Get(ctx, txHash) } func (cs *CacheService) ReadEventType(ctx context.Context, contractAddress gethcommon.Address, eventSignature gethcommon.Hash, onCacheMiss func(any) (*enclavedb.EventType, error)) (*enclavedb.EventType, error) { key := make([]byte, 0) key = append(key, contractAddress.Bytes()...) key = append(key, eventSignature.Bytes()...) - return getCachedValue(ctx, cs.eventTypeCache, cs.logger, key, idCost, onCacheMiss) + return getCachedValue(ctx, cs.eventTypeCache, cs.logger, key, eventTypeCost, onCacheMiss, true) } func (cs *CacheService) ReadConvertedHeader(ctx context.Context, batchHash common.L2BatchHash, onCacheMiss func(any) (*types.Header, error)) (*types.Header, error) { - return getCachedValue(ctx, cs.convertedGethHeaderCache, cs.logger, batchHash, blockHeaderCost, onCacheMiss) + return getCachedValue(ctx, cs.convertedGethHeaderCache, cs.logger, batchHash, blockHeaderCost, onCacheMiss, true) } // getCachedValue - returns the cached value for the provided key. If the key is not found, then invoke the 'onCacheMiss' function // which returns the value, and cache it -func getCachedValue[V any](ctx context.Context, cache *cache.Cache[*V], logger gethlog.Logger, key any, cost int64, onCacheMiss func(any) (*V, error)) (*V, error) { +func getCachedValue[V any](ctx context.Context, cache *cache.Cache[*V], logger gethlog.Logger, key any, cost int64, onCacheMiss func(any) (*V, error), cacheIfMissing bool) (*V, error) { value, err := cache.Get(ctx, key) if err != nil || value == nil { // todo metrics for cache misses @@ -176,7 +203,9 @@ func getCachedValue[V any](ctx context.Context, cache *cache.Cache[*V], logger g if v == nil { logger.Crit("Returned a nil value from the onCacheMiss function. Should not happen.") } - cacheValue(ctx, cache, logger, key, v, cost) + if cacheIfMissing { + cacheValue(ctx, cache, logger, key, v, cost) + } return v, nil } diff --git a/go/enclave/storage/enclavedb/events.go b/go/enclave/storage/enclavedb/events.go index 11e631c819..bdb4d84292 100644 --- a/go/enclave/storage/enclavedb/events.go +++ b/go/enclave/storage/enclavedb/events.go @@ -238,7 +238,7 @@ func loadReceiptList(ctx context.Context, db *sql.DB, requestingAccount *gethcom } var queryParams []any - query := "select b.hash, b.height, curr_tx.hash, curr_tx.idx, rec.post_state, rec.status, rec.cumulative_gas_used, rec.effective_gas_price, rec.created_contract_address, curr_tx.content, tx_sender.address, tx_contr.address, curr_tx.type " + query := "select b.hash, b.height, curr_tx.hash, curr_tx.idx, rec.post_state, rec.status, rec.cumulative_gas_used, rec.effective_gas_price, rec.created_contract_address, tx_sender.address, tx_contr.address, curr_tx.type " query += baseReceiptJoin // visibility @@ -286,7 +286,7 @@ func onRowWithReceipt(rows *sql.Rows) (*core.InternalReceipt, error) { var txIndex *uint var blockHash, transactionHash *gethcommon.Hash var blockNumber *uint64 - res := []any{&blockHash, &blockNumber, &transactionHash, &txIndex, &r.PostState, &r.Status, &r.CumulativeGasUsed, &r.EffectiveGasPrice, &r.CreatedContract, &r.TxContent, &r.From, &r.To, &r.TxType} + res := []any{&blockHash, &blockNumber, &transactionHash, &txIndex, &r.PostState, &r.Status, &r.CumulativeGasUsed, &r.EffectiveGasPrice, &r.CreatedContract, &r.From, &r.To, &r.TxType} err := rows.Scan(res...) if err != nil { @@ -306,7 +306,7 @@ func onRowWithReceipt(rows *sql.Rows) (*core.InternalReceipt, error) { // todo always pass in the actual batch hashes because of reorgs, or make sure to clean up log entries from discarded batches func loadReceiptsAndEventLogs(ctx context.Context, db *sql.DB, requestingAccount *gethcommon.Address, whereCondition string, whereParams []any, withReceipts bool) ([]*core.InternalReceipt, []*types.Log, error) { logsQuery := " et.event_sig, t1.topic, t2.topic, t3.topic, datablob, log_idx, b.hash, b.height, curr_tx.hash, curr_tx.idx, c.address " - receiptQuery := " rec.post_state, rec.status, rec.cumulative_gas_used, rec.effective_gas_price, rec.created_contract_address, curr_tx.content, tx_sender.address, tx_contr.address, curr_tx.type " + receiptQuery := " rec.post_state, rec.status, rec.cumulative_gas_used, rec.effective_gas_price, rec.created_contract_address, tx_sender.address, tx_contr.address, curr_tx.type " query := "select " + logsQuery if withReceipts { @@ -417,7 +417,7 @@ func onRowWithEventLogAndReceipt(rows *sql.Rows, withReceipts bool) (*core.Inter if withReceipts { // when loading receipts, add the extra fields - res = append(res, &r.PostState, &r.Status, &r.CumulativeGasUsed, &r.EffectiveGasPrice, &r.CreatedContract, &r.TxContent, &r.From, &r.To, &r.TxType) + res = append(res, &r.PostState, &r.Status, &r.CumulativeGasUsed, &r.EffectiveGasPrice, &r.CreatedContract, &r.From, &r.To, &r.TxType) } err := rows.Scan(res...) diff --git a/go/enclave/storage/events_storage.go b/go/enclave/storage/events_storage.go index 6dcb9f2863..1f106cb5c1 100644 --- a/go/enclave/storage/events_storage.go +++ b/go/enclave/storage/events_storage.go @@ -18,12 +18,13 @@ import ( // responsible for saving event logs type eventsStorage struct { + db enclavedb.EnclaveDB cachingService *CacheService logger gethlog.Logger } -func newEventsStorage(cachingService *CacheService, logger gethlog.Logger) *eventsStorage { - return &eventsStorage{cachingService: cachingService, logger: logger} +func newEventsStorage(cachingService *CacheService, db enclavedb.EnclaveDB, logger gethlog.Logger) *eventsStorage { + return &eventsStorage{cachingService: cachingService, db: db, logger: logger} } func (es *eventsStorage) storeReceiptAndEventLogs(ctx context.Context, dbTX *sql.Tx, batch *common.BatchHeader, txExecResult *core.TxExecResult) error { @@ -52,6 +53,11 @@ func (es *eventsStorage) storeReceiptAndEventLogs(ctx context.Context, dbTX *sql } } + es.cachingService.CacheReceipt(ctx, &CachedReceipt{ + Receipt: txExecResult.Receipt, + From: txExecResult.From, + To: txExecResult.Tx.To(), + }) return nil } diff --git a/go/enclave/storage/interfaces.go b/go/enclave/storage/interfaces.go index 6d8dc64c36..234c6f1827 100644 --- a/go/enclave/storage/interfaces.go +++ b/go/enclave/storage/interfaces.go @@ -97,8 +97,8 @@ type SharedSecretStorage interface { type TransactionStorage interface { // GetTransaction - returns the positional metadata of the tx by hash GetTransaction(ctx context.Context, txHash common.L2TxHash) (*types.Transaction, common.L2BatchHash, uint64, uint64, error) - // GetTransactionReceipt - returns the receipt of a tx by tx hash - GetTransactionReceipt(ctx context.Context, txHash common.L2TxHash, requester *gethcommon.Address, syntheticTx bool) (*core.InternalReceipt, error) + // GetFilteredReceipt - returns the receipt of a tx with event logs visible to the requester + GetFilteredInternalReceipt(ctx context.Context, txHash common.L2TxHash, requester *gethcommon.Address, syntheticTx bool) (*core.InternalReceipt, error) ExistsTransactionReceipt(ctx context.Context, txHash common.L2TxHash) (bool, error) } @@ -153,6 +153,7 @@ type Storage interface { StateDB() state.Database ReadContract(ctx context.Context, address gethcommon.Address) (*enclavedb.Contract, error) + ReadEventType(ctx context.Context, contractAddress gethcommon.Address, eventSignature gethcommon.Hash) (*enclavedb.EventType, error) } type ScanStorage interface { diff --git a/go/enclave/storage/storage.go b/go/enclave/storage/storage.go index 5b343564f3..d43d87b3fa 100644 --- a/go/enclave/storage/storage.go +++ b/go/enclave/storage/storage.go @@ -93,7 +93,7 @@ func NewStorage(backingDB enclavedb.EnclaveDB, cachingService *CacheService, cha stateCache: stateDB, chainConfig: chainConfig, cachingService: cachingService, - eventsStorage: newEventsStorage(cachingService, logger), + eventsStorage: newEventsStorage(cachingService, backingDB, logger), logger: logger, } } @@ -430,8 +430,8 @@ func (s *storageImpl) GetTransaction(ctx context.Context, txHash gethcommon.Hash return enclavedb.ReadTransaction(ctx, s.db.GetSQLDB(), txHash) } -func (s *storageImpl) GetTransactionReceipt(ctx context.Context, txHash common.L2TxHash, requester *gethcommon.Address, syntheticTx bool) (*core.InternalReceipt, error) { - defer s.logDuration("GetTransactionReceipt", measure.NewStopwatch()) +func (s *storageImpl) GetFilteredInternalReceipt(ctx context.Context, txHash common.L2TxHash, requester *gethcommon.Address, syntheticTx bool) (*core.InternalReceipt, error) { + defer s.logDuration("GetFilteredInternalReceipt", measure.NewStopwatch()) if !syntheticTx && requester == nil { return nil, errors.New("requester address is required for non-synthetic transactions") } @@ -439,7 +439,7 @@ func (s *storageImpl) GetTransactionReceipt(ctx context.Context, txHash common.L } func (s *storageImpl) ExistsTransactionReceipt(ctx context.Context, txHash common.L2TxHash) (bool, error) { - defer s.logDuration("GetTransactionReceipt", measure.NewStopwatch()) + defer s.logDuration("ExistsTransactionReceipt", measure.NewStopwatch()) return enclavedb.ExistsReceipt(ctx, s.db.GetSQLDB(), txHash) } @@ -842,6 +842,15 @@ func (s *storageImpl) ReadContract(ctx context.Context, address gethcommon.Addre return enclavedb.ReadContractByAddress(ctx, dbtx, address) } +func (s *storageImpl) ReadEventType(ctx context.Context, contractAddress gethcommon.Address, eventSignature gethcommon.Hash) (*enclavedb.EventType, error) { + dbTx, err := s.db.NewDBTransaction(ctx) + if err != nil { + return nil, fmt.Errorf("could not create DB transaction - %w", err) + } + defer dbTx.Rollback() + return s.eventsStorage.readEventType(ctx, dbTx, contractAddress, eventSignature) +} + func (s *storageImpl) logDuration(method string, stopWatch *measure.Stopwatch) { core.LogMethodDuration(s.logger, stopWatch, fmt.Sprintf("Storage::%s completed", method)) } diff --git a/go/enclave/system/hooks.go b/go/enclave/system/hooks.go index 733a1434a0..8e19bc42d7 100644 --- a/go/enclave/system/hooks.go +++ b/go/enclave/system/hooks.go @@ -79,7 +79,7 @@ func (s *systemContractCallbacks) Load() error { return fmt.Errorf("genesis batch does not have enough transactions") } - receipt, err := s.storage.GetTransactionReceipt(context.Background(), batch.Transactions[1].Hash(), nil, true) + receipt, err := s.storage.GetFilteredInternalReceipt(context.Background(), batch.Transactions[1].Hash(), nil, true) if err != nil { s.logger.Error("Load: Failed fetching receipt", "transactionHash", batch.Transactions[1].Hash().Hex(), "error", err) return fmt.Errorf("failed fetching receipt %w", err) From 061427bfbd00fe62f014470796535d10930de435 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=BDiga=20Kokelj?= Date: Wed, 23 Oct 2024 10:47:57 +0200 Subject: [PATCH 02/19] remove github run number from DNS name for sequencer and validators (#2094) --- .github/workflows/manual-deploy-testnet-l2.yml | 14 +++++++------- .../workflows/manual-deploy-testnet-validator.yml | 8 ++++---- .github/workflows/manual-upgrade-testnet-l2.yml | 8 ++++---- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/manual-deploy-testnet-l2.yml b/.github/workflows/manual-deploy-testnet-l2.yml index 978df512f9..1bfcb887b0 100644 --- a/.github/workflows/manual-deploy-testnet-l2.yml +++ b/.github/workflows/manual-deploy-testnet-l2.yml @@ -199,7 +199,7 @@ jobs: inlineScript: | az vm create -g Testnet -n "${{ vars.AZURE_RESOURCE_PREFIX }}-${{ matrix.host_id }}-${{ GITHUB.RUN_NUMBER }}" \ --admin-username obscurouser --admin-password "${{ secrets.OBSCURO_NODE_VM_PWD }}" \ - --public-ip-address-dns-name "obscuronode-${{ matrix.host_id }}-${{ github.event.inputs.testnet_type }}-${{ GITHUB.RUN_NUMBER }}" \ + --public-ip-address-dns-name "obscuronode-${{ matrix.host_id }}-${{ github.event.inputs.testnet_type }}" \ --tags deploygroup=ObscuroNode-${{ github.event.inputs.testnet_type }}-${{ GITHUB.RUN_NUMBER }} ${{ vars.AZURE_DEPLOY_GROUP_L2 }}=true \ --vnet-name ${{ github.event.inputs.testnet_type }}-virtual-network --subnet ${{ github.event.inputs.testnet_type }}-sub-network \ --size Standard_DC8_v2 --storage-sku StandardSSD_LRS --image ObscuroConfUbuntu \ @@ -283,8 +283,8 @@ jobs: -message_bus_contract_addr=${{needs.build.outputs.MSG_BUS_CONTRACT_ADDR}} \ -l1_start=${{needs.build.outputs.L1_START_HASH}} \ -private_key=${{ secrets[matrix.node_pk_lookup] }} \ - -sequencer_addr=obscuronode-0-${{ github.event.inputs.testnet_type }}-${{ GITHUB.RUN_NUMBER }}.uksouth.cloudapp.azure.com:10000 \ - -host_public_p2p_addr=obscuronode-${{ matrix.host_id }}-${{ github.event.inputs.testnet_type }}-${{ GITHUB.RUN_NUMBER }}.uksouth.cloudapp.azure.com:10000 \ + -sequencer_addr=obscuronode-0-${{ github.event.inputs.testnet_type }}.uksouth.cloudapp.azure.com:10000 \ + -host_public_p2p_addr=obscuronode-${{ matrix.host_id }}-${{ github.event.inputs.testnet_type }}.uksouth.cloudapp.azure.com:10000 \ -host_p2p_port=10000 \ -enclave_docker_image=${{ vars.L2_ENCLAVE_DOCKER_BUILD_TAG }} \ -host_docker_image=${{ vars.L2_HOST_DOCKER_BUILD_TAG }} \ @@ -312,9 +312,9 @@ jobs: - name: "Wait until obscuro node is healthy" shell: bash run: | - ./.github/workflows/runner-scripts/wait-node-healthy.sh --host=obscuronode-0-${{ github.event.inputs.testnet_type }}-${{ GITHUB.RUN_NUMBER }}.uksouth.cloudapp.azure.com - ./.github/workflows/runner-scripts/wait-node-healthy.sh --host=obscuronode-1-${{ github.event.inputs.testnet_type }}-${{ GITHUB.RUN_NUMBER }}.uksouth.cloudapp.azure.com - ./.github/workflows/runner-scripts/wait-node-healthy.sh --host=obscuronode-2-${{ github.event.inputs.testnet_type }}-${{ GITHUB.RUN_NUMBER }}.uksouth.cloudapp.azure.com + ./.github/workflows/runner-scripts/wait-node-healthy.sh --host=obscuronode-0-${{ github.event.inputs.testnet_type }}.uksouth.cloudapp.azure.com + ./.github/workflows/runner-scripts/wait-node-healthy.sh --host=obscuronode-1-${{ github.event.inputs.testnet_type }}.uksouth.cloudapp.azure.com + ./.github/workflows/runner-scripts/wait-node-healthy.sh --host=obscuronode-2-${{ github.event.inputs.testnet_type }}.uksouth.cloudapp.azure.com deploy-l2-contracts: needs: @@ -331,7 +331,7 @@ jobs: shell: bash run: | go run ./testnet/launcher/l2contractdeployer/cmd \ - -l2_host=obscuronode-0-${{ github.event.inputs.testnet_type }}-${{ GITHUB.RUN_NUMBER }}.uksouth.cloudapp.azure.com \ + -l2_host=obscuronode-0-${{ github.event.inputs.testnet_type }}.uksouth.cloudapp.azure.com \ -l1_http_url=${{ secrets.L1_HTTP_URL }} \ -l2_ws_port=81 \ -private_key=${{ secrets.ACCOUNT_PK_WORKER }} \ diff --git a/.github/workflows/manual-deploy-testnet-validator.yml b/.github/workflows/manual-deploy-testnet-validator.yml index ece09cb703..f3b4e659fa 100644 --- a/.github/workflows/manual-deploy-testnet-validator.yml +++ b/.github/workflows/manual-deploy-testnet-validator.yml @@ -122,7 +122,7 @@ jobs: inlineScript: | az vm create -g Testnet -n "${{ vars.AZURE_RESOURCE_PREFIX }}-${{ github.event.inputs.node_id }}-${{ GITHUB.RUN_NUMBER }}" \ --admin-username obscurouser --admin-password "${{ secrets.OBSCURO_NODE_VM_PWD }}" \ - --public-ip-address-dns-name "obscuronode-${{ github.event.inputs.node_id }}-${{ github.event.inputs.testnet_type }}-${{ GITHUB.RUN_NUMBER }}" \ + --public-ip-address-dns-name "obscuronode-${{ github.event.inputs.node_id }}-${{ github.event.inputs.testnet_type }}" \ --tags deploygroup=ObscuroNode-${{ github.event.inputs.testnet_type }}-${{ GITHUB.RUN_NUMBER }} ${{ vars.AZURE_DEPLOY_GROUP_L2 }}=true \ --vnet-name ${{ github.event.inputs.testnet_type }}-virtual-network --subnet ${{ github.event.inputs.testnet_type }}-sub-network \ --size Standard_DC8_v2 --storage-sku StandardSSD_LRS --image ObscuroConfUbuntu \ @@ -203,8 +203,8 @@ jobs: -message_bus_contract_addr=${{ github.event.inputs.MSG_BUS_CONTRACT_ADDR }} \ -l1_start=${{ github.event.inputs.L1_START_HASH }} \ -private_key=${{ secrets.ADD_NEW_NODE_PRIVATE_KEY }} \ - -sequencer_addr=obscuronode-0-${{ github.event.inputs.testnet_type }}-${{ GITHUB.RUN_NUMBER }}.uksouth.cloudapp.azure.com:10000 \ - -host_public_p2p_addr=obscuronode-${{ github.event.inputs.node_id }}-${{ github.event.inputs.testnet_type }}-${{ GITHUB.RUN_NUMBER }}.uksouth.cloudapp.azure.com:10000 \ + -sequencer_addr=obscuronode-0-${{ github.event.inputs.testnet_type }}.uksouth.cloudapp.azure.com:10000 \ + -host_public_p2p_addr=obscuronode-${{ github.event.inputs.node_id }}-${{ github.event.inputs.testnet_type }}.uksouth.cloudapp.azure.com:10000 \ -host_p2p_port=10000 \ -enclave_docker_image=${{ vars.L2_ENCLAVE_DOCKER_BUILD_TAG }} \ -host_docker_image=${{ vars.L2_HOST_DOCKER_BUILD_TAG }} \ @@ -261,4 +261,4 @@ jobs: - name: "Wait until obscuro node is healthy" shell: bash run: | - ./.github/workflows/runner-scripts/wait-node-healthy.sh --host=obscuronode-${{ github.event.inputs.node_id }}-${{ github.event.inputs.testnet_type }}-${{ GITHUB.RUN_NUMBER }}.uksouth.cloudapp.azure.com + ./.github/workflows/runner-scripts/wait-node-healthy.sh --host=obscuronode-${{ github.event.inputs.node_id }}-${{ github.event.inputs.testnet_type }}.uksouth.cloudapp.azure.com diff --git a/.github/workflows/manual-upgrade-testnet-l2.yml b/.github/workflows/manual-upgrade-testnet-l2.yml index 33395c9074..5e2518cdc0 100644 --- a/.github/workflows/manual-upgrade-testnet-l2.yml +++ b/.github/workflows/manual-upgrade-testnet-l2.yml @@ -166,8 +166,8 @@ jobs: -host_id=${{ vars[matrix.node_addr_lookup] }} \ -l1_ws_url=${{ secrets[matrix.node_l1_ws_lookup] }} \ -private_key=${{ secrets[matrix.node_pk_lookup] }} \ - -sequencer_addr=obscuronode-0-${{ github.event.inputs.testnet_type }}-${{ needs.build.outputs.VM_BUILD_NUMBER }}.uksouth.cloudapp.azure.com:10000 \ - -host_public_p2p_addr=obscuronode-${{ matrix.host_id }}-${{ github.event.inputs.testnet_type }}-${{ needs.build.outputs.VM_BUILD_NUMBER }}.uksouth.cloudapp.azure.com:10000 \ + -sequencer_addr=obscuronode-0-${{ github.event.inputs.testnet_type }}.uksouth.cloudapp.azure.com:10000 \ + -host_public_p2p_addr=obscuronode-${{ matrix.host_id }}-${{ github.event.inputs.testnet_type }}.uksouth.cloudapp.azure.com:10000 \ -host_p2p_port=10000 \ -enclave_docker_image=${{ vars.L2_ENCLAVE_DOCKER_BUILD_TAG }} \ -host_docker_image=${{ vars.L2_HOST_DOCKER_BUILD_TAG }} \ @@ -193,8 +193,8 @@ jobs: - name: "Wait until obscuro node is healthy" shell: bash run: | - ./.github/workflows/runner-scripts/wait-node-healthy.sh --host=obscuronode-0-${{ github.event.inputs.testnet_type }}-${{ needs.build.outputs.VM_BUILD_NUMBER }}.uksouth.cloudapp.azure.com - ./.github/workflows/runner-scripts/wait-node-healthy.sh --host=obscuronode-1-${{ github.event.inputs.testnet_type }}-${{ needs.build.outputs.VM_BUILD_NUMBER }}.uksouth.cloudapp.azure.com + ./.github/workflows/runner-scripts/wait-node-healthy.sh --host=obscuronode-0-${{ github.event.inputs.testnet_type }}.uksouth.cloudapp.azure.com + ./.github/workflows/runner-scripts/wait-node-healthy.sh --host=obscuronode-1-${{ github.event.inputs.testnet_type }}.uksouth.cloudapp.azure.com deploy-faucet-on-dispatch: uses: ./.github/workflows/manual-deploy-testnet-faucet.yml From b7c65bbaf72d796cdbb336b0f718a5a40ae60402 Mon Sep 17 00:00:00 2001 From: Anthony Nixon Date: Thu, 24 Oct 2024 15:28:56 +0100 Subject: [PATCH 03/19] add workflow build and push release --- .github/workflows/build-release-images.yml | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/build-release-images.yml diff --git a/.github/workflows/build-release-images.yml b/.github/workflows/build-release-images.yml new file mode 100644 index 0000000000..efb310b559 --- /dev/null +++ b/.github/workflows/build-release-images.yml @@ -0,0 +1,50 @@ +name: 'Build and Push Release Images' + +on: + release: + types: [published] + workflow_dispatch: + inputs: + tag: + description: 'Tag to build and push (leave empty for latest)' + required: false + default: '' + +jobs: + build-and-push: + runs-on: ubuntu-latest + environment: production + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version: 1.21.8 + + - name: 'Login to Azure docker registry' + uses: azure/docker-login@v1 + with: + login-server: testnetobscuronet.azurecr.io + username: testnetobscuronet + password: ${{ secrets.REGISTRY_PASSWORD }} + + - name: 'Get version' + id: get_version + run: | + if [ "${{ github.event_name }}" = "release" ]; then + echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT + elif [ -n "${{ github.event.inputs.tag }}" ]; then + echo "VERSION=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT + else + echo "VERSION=latest" >> $GITHUB_OUTPUT + fi + + - name: 'Build and push obscuro node images' + env: + VERSION: ${{ steps.get_version.outputs.VERSION }} + run: | + DOCKER_BUILDKIT=1 docker build -t testnetobscuronet.azurecr.io/obscuro/enclave:${VERSION} --build-arg TESTMODE=true -f dockerfiles/enclave.Dockerfile . + docker push testnetobscuronet.azurecr.io/obscuro/enclave:${VERSION} + DOCKER_BUILDKIT=1 docker build -t testnetobscuronet.azurecr.io/obscuro/host:${VERSION} -f dockerfiles/host.Dockerfile . + docker push testnetobscuronet.azurecr.io/obscuro/host:${VERSION} From 0bce0ce2690f4f1f6ba51246cff8d7f37827e9f8 Mon Sep 17 00:00:00 2001 From: Anthony Nixon Date: Thu, 24 Oct 2024 15:42:10 +0100 Subject: [PATCH 04/19] pull request for workflow visibility --- .github/workflows/build-release-images.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-release-images.yml b/.github/workflows/build-release-images.yml index efb310b559..0afa5c2f32 100644 --- a/.github/workflows/build-release-images.yml +++ b/.github/workflows/build-release-images.yml @@ -9,6 +9,7 @@ on: description: 'Tag to build and push (leave empty for latest)' required: false default: '' + pull_request: jobs: build-and-push: From 4c7339662e5842819771949eb18cfcb3bb735454 Mon Sep 17 00:00:00 2001 From: Anthony Nixon Date: Thu, 24 Oct 2024 16:08:03 +0100 Subject: [PATCH 05/19] fix repo name and remove PR dispatch --- .github/workflows/build-release-images.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-release-images.yml b/.github/workflows/build-release-images.yml index 0afa5c2f32..da927d122a 100644 --- a/.github/workflows/build-release-images.yml +++ b/.github/workflows/build-release-images.yml @@ -9,7 +9,6 @@ on: description: 'Tag to build and push (leave empty for latest)' required: false default: '' - pull_request: jobs: build-and-push: @@ -45,7 +44,7 @@ jobs: env: VERSION: ${{ steps.get_version.outputs.VERSION }} run: | - DOCKER_BUILDKIT=1 docker build -t testnetobscuronet.azurecr.io/obscuro/enclave:${VERSION} --build-arg TESTMODE=true -f dockerfiles/enclave.Dockerfile . - docker push testnetobscuronet.azurecr.io/obscuro/enclave:${VERSION} - DOCKER_BUILDKIT=1 docker build -t testnetobscuronet.azurecr.io/obscuro/host:${VERSION} -f dockerfiles/host.Dockerfile . - docker push testnetobscuronet.azurecr.io/obscuro/host:${VERSION} + DOCKER_BUILDKIT=1 docker build -t testnetobscuronet.azurecr.io/obscuronet/enclave:${VERSION} --build-arg TESTMODE=true -f dockerfiles/enclave.Dockerfile . + docker push testnetobscuronet.azurecr.io/obscuronet/enclave:${VERSION} + DOCKER_BUILDKIT=1 docker build -t testnetobscuronet.azurecr.io/obscuronet/host:${VERSION} -f dockerfiles/host.Dockerfile . + docker push testnetobscuronet.azurecr.io/obscuronet/host:${VERSION} From 74366369391c88b7f6f192ee2789f9e9a7b2c0a2 Mon Sep 17 00:00:00 2001 From: Anthony Nixon Date: Thu, 24 Oct 2024 16:14:07 +0100 Subject: [PATCH 06/19] switch version default to latest release tag. --- .github/workflows/build-release-images.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-release-images.yml b/.github/workflows/build-release-images.yml index da927d122a..04c0415ed2 100644 --- a/.github/workflows/build-release-images.yml +++ b/.github/workflows/build-release-images.yml @@ -7,7 +7,7 @@ on: inputs: tag: description: 'Tag to build and push (leave empty for latest)' - required: false + required: true default: '' jobs: @@ -37,7 +37,9 @@ jobs: elif [ -n "${{ github.event.inputs.tag }}" ]; then echo "VERSION=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT else - echo "VERSION=latest" >> $GITHUB_OUTPUT + # Fetch the latest tag from the repository + LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`) + echo "VERSION=${LATEST_TAG}" >> $GITHUB_OUTPUT fi - name: 'Build and push obscuro node images' From 464b90478b48561aaef20eca57173e4a39ec8179 Mon Sep 17 00:00:00 2001 From: Tudor Malene Date: Fri, 25 Oct 2024 12:39:27 +0100 Subject: [PATCH 07/19] small flakyness fixes (#2105) * small fixes * more fixes * reduce memory pressure for testing * fix * fix --- go/enclave/enclave.go | 2 +- .../evm/ethchainadapter/eth_chainadapter.go | 7 ++----- go/enclave/genesis/genesis_test.go | 4 ++-- go/enclave/storage/cache_service.go | 15 ++++++++++++--- go/enclave/storage/enclavedb/block.go | 10 +++++----- go/enclave/storage/events_storage.go | 7 +++++-- go/enclave/storage/storage.go | 14 +++++++------- go/enclave/txpool/txpool.go | 6 +++++- go/host/enclave/guardian.go | 2 +- integration/ethereummock/gethutil.go | 3 +++ integration/ethereummock/node.go | 7 +++++-- integration/smartcontract/debug_wallet.go | 2 +- integration/smartcontract/smartcontracts_test.go | 2 ++ 13 files changed, 51 insertions(+), 30 deletions(-) diff --git a/go/enclave/enclave.go b/go/enclave/enclave.go index eb816b901d..38d401803c 100644 --- a/go/enclave/enclave.go +++ b/go/enclave/enclave.go @@ -116,7 +116,7 @@ func NewEnclave( } // Initialise the database - cachingService := storage.NewCacheService(logger) + cachingService := storage.NewCacheService(logger, config.UseInMemoryDB) chainConfig := ethchainadapter.ChainParams(big.NewInt(config.ObscuroChainID)) storage := storage.NewStorageFromConfig(config, cachingService, chainConfig, logger) diff --git a/go/enclave/evm/ethchainadapter/eth_chainadapter.go b/go/enclave/evm/ethchainadapter/eth_chainadapter.go index 1dbb927724..bcddbf0868 100644 --- a/go/enclave/evm/ethchainadapter/eth_chainadapter.go +++ b/go/enclave/evm/ethchainadapter/eth_chainadapter.go @@ -56,15 +56,12 @@ func (e *EthChainAdapter) CurrentBlock() *gethtypes.Header { if currentBatchSeqNo == nil { return nil } - ctx, cancelCtx := context.WithTimeout(context.Background(), e.config.RPCTimeout) - defer cancelCtx() - - currentBatch, err := e.storage.FetchBatchHeaderBySeqNo(ctx, currentBatchSeqNo.Uint64()) + currentBatch, err := e.storage.FetchBatchHeaderBySeqNo(context.Background(), currentBatchSeqNo.Uint64()) if err != nil { e.logger.Warn("unable to retrieve batch seq no", "currentBatchSeqNo", currentBatchSeqNo, log.ErrKey, err) return nil } - batch, err := e.gethEncoding.CreateEthHeaderForBatch(ctx, currentBatch) + batch, err := e.gethEncoding.CreateEthHeaderForBatch(context.Background(), currentBatch) if err != nil { e.logger.Warn("unable to convert batch to eth header ", "currentBatchSeqNo", currentBatchSeqNo, log.ErrKey, err) return nil diff --git a/go/enclave/genesis/genesis_test.go b/go/enclave/genesis/genesis_test.go index 165caf653c..83b2e47a22 100644 --- a/go/enclave/genesis/genesis_test.go +++ b/go/enclave/genesis/genesis_test.go @@ -43,7 +43,7 @@ func TestDefaultGenesis(t *testing.T) { if err != nil { t.Fatalf("unable to create temp db: %s", err) } - storageDB := storage.NewStorage(backingDB, storage.NewCacheService(gethlog.New()), nil, gethlog.New()) + storageDB := storage.NewStorage(backingDB, storage.NewCacheService(gethlog.New(), true), nil, gethlog.New()) stateDB, err := gen.applyAllocations(storageDB) if err != nil { t.Fatalf("unable to apply genesis allocations") @@ -86,7 +86,7 @@ func TestCustomGenesis(t *testing.T) { if err != nil { t.Fatalf("unable to create temp db: %s", err) } - storageDB := storage.NewStorage(backingDB, storage.NewCacheService(gethlog.New()), nil, gethlog.New()) + storageDB := storage.NewStorage(backingDB, storage.NewCacheService(gethlog.New(), true), nil, gethlog.New()) stateDB, err := gen.applyAllocations(storageDB) if err != nil { t.Fatalf("unable to apply genesis allocations") diff --git a/go/enclave/storage/cache_service.go b/go/enclave/storage/cache_service.go index ae1fde3867..2d611000d3 100644 --- a/go/enclave/storage/cache_service.go +++ b/go/enclave/storage/cache_service.go @@ -73,16 +73,25 @@ type CacheService struct { logger gethlog.Logger } -func NewCacheService(logger gethlog.Logger) *CacheService { +func NewCacheService(logger gethlog.Logger, testMode bool) *CacheService { + nrElem := int64(50_000_000) + cacheSize := int64(2 * 1024 * 1024 * 1024) + nrReceiptsToCache := int64(10_000) + + if testMode { + nrElem = 1_000_000 + cacheSize = int64(100 * 1024 * 1024) + nrReceiptsToCache = int64(500) + } + // the general cache for 50Mil elements, - 2GB // todo - consider making it fine grained per cache - ristrettoStore := newCache(logger, 50_000_000, 2*1024*1024*1024) + ristrettoStore := newCache(logger, nrElem, cacheSize) // cache the latest received batches to avoid a lookup when streaming it back to the host after processing nrBatches := int64(50) ristrettoStoreForBatches := newCache(logger, nrBatches, nrBatches*batchCost) - nrReceiptsToCache := int64(10_000) ristrettoStoreForReceipts := newCache(logger, nrReceiptsToCache, nrReceiptsToCache*receiptCost) return &CacheService{ diff --git a/go/enclave/storage/enclavedb/block.go b/go/enclave/storage/enclavedb/block.go index e2b2267fa9..390537c5b5 100644 --- a/go/enclave/storage/enclavedb/block.go +++ b/go/enclave/storage/enclavedb/block.go @@ -56,8 +56,8 @@ func IsCanonicalBlock(ctx context.Context, dbtx *sql.Tx, hash *gethcommon.Hash) } // CheckCanonicalValidity - expensive but useful for debugging races -func CheckCanonicalValidity(ctx context.Context, dbtx *sql.Tx) error { - rows, err := dbtx.QueryContext(ctx, "select count(*), height from batch where is_canonical=true group by height having count(*) >1") +func CheckCanonicalValidity(ctx context.Context, dbtx *sql.Tx, blockId int64) error { + rows, err := dbtx.QueryContext(ctx, "select count(*), height from batch where l1_proof >=? AND is_canonical=true group by height having count(*) >1", blockId) if err != nil { return err } @@ -67,12 +67,12 @@ func CheckCanonicalValidity(ctx context.Context, dbtx *sql.Tx) error { } if rows.Next() { var cnt uint64 - var heignt uint64 - err := rows.Scan(&cnt, &heignt) + var height uint64 + err := rows.Scan(&cnt, &height) if err != nil { return err } - return fmt.Errorf("found multiple (%d) canonical batches for height %d", cnt, heignt) + return fmt.Errorf("found multiple (%d) canonical batches for height %d", cnt, height) } return nil } diff --git a/go/enclave/storage/events_storage.go b/go/enclave/storage/events_storage.go index 1f106cb5c1..67b88df7a9 100644 --- a/go/enclave/storage/events_storage.go +++ b/go/enclave/storage/events_storage.go @@ -208,7 +208,7 @@ func (es *eventsStorage) storeTopics(ctx context.Context, dbTX *sql.Tx, eventTyp // if no entry was found topicId, err = es.storeTopic(ctx, dbTX, eventType, i, topic) if err != nil { - return nil, fmt.Errorf("could not read the event topic. Cause: %w", err) + return nil, fmt.Errorf("could not store the event topic. Cause: %w", err) } } topicIds[i-1] = &topicId @@ -227,9 +227,12 @@ func (es *eventsStorage) storeTopic(ctx context.Context, dbTX *sql.Tx, eventType if relevantAddress != nil { var err error relAddressId, err = es.readEOA(ctx, dbTX, *relevantAddress) - if err != nil { + if err != nil && !errors.Is(err, errutil.ErrNotFound) { return 0, err } + if relAddressId == nil { + es.logger.Debug("EOA not found when saving topic", "topic", topic.Hex()) + } } eventTopicId, err := enclavedb.WriteEventTopic(ctx, dbTX, &topic, relAddressId, eventType.Id) if err != nil { diff --git a/go/enclave/storage/storage.go b/go/enclave/storage/storage.go index d43d87b3fa..9387d176a6 100644 --- a/go/enclave/storage/storage.go +++ b/go/enclave/storage/storage.go @@ -268,14 +268,14 @@ func (s *storageImpl) StoreBlock(ctx context.Context, block *types.Header, chain if err != nil { return err } - } - // double check that there is always a single canonical batch or block per layer - // only for debugging - //err = enclavedb.CheckCanonicalValidity(ctx, dbTx) - //if err != nil { - // return err - //} + // sanity check that there is always a single canonical batch or block per layer + // called after forks, for the latest 50 blocks + err = enclavedb.CheckCanonicalValidity(ctx, dbTx, blockId-50) + if err != nil { + s.logger.Crit("Should not happen.", log.ErrKey, err) + } + } if err := dbTx.Commit(); err != nil { return fmt.Errorf("4. could not store block %s. Cause: %w", block.Hash(), err) diff --git a/go/enclave/txpool/txpool.go b/go/enclave/txpool/txpool.go index efcd3dd3af..0ed221ec3b 100644 --- a/go/enclave/txpool/txpool.go +++ b/go/enclave/txpool/txpool.go @@ -70,7 +70,11 @@ func (t *TxPool) Start() error { // PendingTransactions returns all pending transactions grouped per address and ordered per nonce func (t *TxPool) PendingTransactions() map[gethcommon.Address][]*gethtxpool.LazyTransaction { // todo - for now using the base fee from the block - baseFee := t.Chain.CurrentBlock().BaseFee + currentBlock := t.Chain.CurrentBlock() + if currentBlock == nil { + return make(map[gethcommon.Address][]*gethtxpool.LazyTransaction) + } + baseFee := currentBlock.BaseFee return t.pool.Pending(gethtxpool.PendingFilter{ BaseFee: uint256.NewInt(baseFee.Uint64()), OnlyPlainTxs: true, diff --git a/go/host/enclave/guardian.go b/go/host/enclave/guardian.go index 5a6adfee71..5c4c9bd818 100644 --- a/go/host/enclave/guardian.go +++ b/go/host/enclave/guardian.go @@ -558,7 +558,7 @@ func (g *Guardian) periodicBatchProduction() { skipBatchIfEmpty := g.maxBatchInterval > g.batchInterval && time.Since(g.lastBatchCreated) < g.maxBatchInterval err := g.enclaveClient.CreateBatch(context.Background(), skipBatchIfEmpty) if err != nil { - g.logger.Error("Unable to produce batch", log.ErrKey, err) + g.logger.Crit("Unable to produce batch", log.ErrKey, err) } case <-g.hostInterrupter.Done(): // interrupted - end periodic process diff --git a/integration/ethereummock/gethutil.go b/integration/ethereummock/gethutil.go index 433737e7ea..ac22b5f816 100644 --- a/integration/ethereummock/gethutil.go +++ b/integration/ethereummock/gethutil.go @@ -18,6 +18,9 @@ var EmptyHash = gethcommon.Hash{} // it also returns the blocks that became canonical, and the once that are now the fork func LCA(ctx context.Context, newCanonical *types.Block, oldCanonical *types.Block, resolver *blockResolverInMem) (*common.ChainFork, error) { b, cp, ncp, err := internalLCA(ctx, newCanonical, oldCanonical, resolver, []common.L1BlockHash{}, []common.L1BlockHash{}) + if err != nil { + return nil, fmt.Errorf("could not calculate LCA. Cause: %w", err) + } return &common.ChainFork{ NewCanonical: newCanonical.Header(), OldCanonical: oldCanonical.Header(), diff --git a/integration/ethereummock/node.go b/integration/ethereummock/node.go index d6a1215c7e..e01b412b30 100644 --- a/integration/ethereummock/node.go +++ b/integration/ethereummock/node.go @@ -10,6 +10,8 @@ import ( "sync/atomic" "time" + "github.com/ten-protocol/go-ten/go/common/log" + "github.com/ethereum/go-ethereum/crypto/kzg4844" "github.com/ten-protocol/go-ten/go/host/l1" @@ -366,14 +368,15 @@ func (m *Node) processBlock(b *types.Block, head *types.Block) *types.Block { m.stats.L1Reorg(m.l2ID) fork, err := LCA(context.Background(), head, b, m.BlockResolver) if err != nil { - panic(err) + m.logger.Error("Should not happen.", log.ErrKey, err) + return head } m.logger.Info( fmt.Sprintf("L1Reorg new=b_%d(%d), old=b_%d(%d), fork=b_%d(%d)", common.ShortHash(b.Hash()), b.NumberU64(), common.ShortHash(head.Hash()), head.NumberU64(), common.ShortHash(fork.CommonAncestor.Hash()), fork.CommonAncestor.Number.Uint64())) return m.setFork(m.BlocksBetween(fork.CommonAncestor, b)) } if b.NumberU64() > (head.NumberU64() + 1) { - m.logger.Crit("Should not happen") + m.logger.Error("Should not happen. Blocks are skewed") } return m.setHead(b) diff --git a/integration/smartcontract/debug_wallet.go b/integration/smartcontract/debug_wallet.go index 27f60b9f39..20941b6bc5 100644 --- a/integration/smartcontract/debug_wallet.go +++ b/integration/smartcontract/debug_wallet.go @@ -12,7 +12,7 @@ import ( "github.com/ten-protocol/go-ten/go/wallet" ) -var _timeout = 120 * time.Second +var _timeout = 180 * time.Second // debugWallet is a wrapper around the wallet that simplifies commonly used functions type debugWallet struct { diff --git a/integration/smartcontract/smartcontracts_test.go b/integration/smartcontract/smartcontracts_test.go index 0776fd67d4..ad4d050d80 100644 --- a/integration/smartcontract/smartcontracts_test.go +++ b/integration/smartcontract/smartcontracts_test.go @@ -86,6 +86,8 @@ func runGethNetwork(t *testing.T) *netInfo { } func TestManagementContract(t *testing.T) { + t.Skip("Skipping as it's too flaky.") + // run tests on one network sim := runGethNetwork(t) defer sim.eth2Network.Stop() //nolint: errcheck From 5ea5a994715760ab0c1b103d8a309e373c3a3756 Mon Sep 17 00:00:00 2001 From: Stefan Iliev <46542846+StefanIliev545@users.noreply.github.com> Date: Sun, 27 Oct 2024 12:21:52 +0200 Subject: [PATCH 08/19] Load system contract addresses on restart. (#2102) * Call Load(). * Changed batch seq no. --------- Co-authored-by: StefanIliev545 --- go/enclave/enclave.go | 7 ++++++- go/enclave/system/hooks.go | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/go/enclave/enclave.go b/go/enclave/enclave.go index 38d401803c..b78db618d2 100644 --- a/go/enclave/enclave.go +++ b/go/enclave/enclave.go @@ -170,7 +170,7 @@ func NewEnclave( crossChainProcessors := crosschain.New(&config.MessageBusAddress, storage, big.NewInt(config.ObscuroChainID), logger) systemContractsWallet := system.GetPlaceholderWallet(chainConfig.ChainID, logger) - scb := system.NewSystemContractCallbacks(systemContractsWallet, logger) + scb := system.NewSystemContractCallbacks(systemContractsWallet, storage, logger) gasOracle := gas.NewGasOracle() blockProcessor := components.NewBlockProcessor(storage, crossChainProcessors, gasOracle, logger) @@ -251,6 +251,11 @@ func NewEnclave( logger.Crit("failed to resync L2 chain state DB after restart", log.ErrKey, err) } + err = scb.Load() + if err != nil && !errors.Is(err, errutil.ErrNotFound) { + logger.Crit("failed to load system contracts", log.ErrKey, err) + } + // TODO ensure debug is allowed/disallowed debug := debugger.New(chain, storage, chainConfig) diff --git a/go/enclave/system/hooks.go b/go/enclave/system/hooks.go index 8e19bc42d7..9d11a370d0 100644 --- a/go/enclave/system/hooks.go +++ b/go/enclave/system/hooks.go @@ -41,12 +41,12 @@ type systemContractCallbacks struct { logger gethlog.Logger } -func NewSystemContractCallbacks(ownerWallet wallet.Wallet, logger gethlog.Logger) SystemContractCallbacks { +func NewSystemContractCallbacks(ownerWallet wallet.Wallet, storage storage.Storage, logger gethlog.Logger) SystemContractCallbacks { return &systemContractCallbacks{ transactionsPostProcessorAddress: nil, ownerWallet: ownerWallet, logger: logger, - storage: nil, + storage: storage, } } @@ -66,7 +66,7 @@ func (s *systemContractCallbacks) Load() error { return fmt.Errorf("storage is not set") } - batchSeqNo := uint64(1) + batchSeqNo := uint64(2) s.logger.Debug("Load: Fetching batch", "batchSeqNo", batchSeqNo) batch, err := s.storage.FetchBatchBySeqNo(context.Background(), batchSeqNo) if err != nil { From 57a337a8423c252c0a37868996a05fcdedb63b19 Mon Sep 17 00:00:00 2001 From: Stefan Iliev <46542846+StefanIliev545@users.noreply.github.com> Date: Sun, 27 Oct 2024 20:14:03 +0200 Subject: [PATCH 09/19] Tokens withdrawal fix (#2109) * Dumping progress. Nothing at this point. * Fix for cross chain messages. * Reversed order of requires back to match value transfers. --------- Co-authored-by: StefanIliev545 --- .../testing/003_simple_withdrawal.ts | 3 +- .../testing/004_token_withdrawal.ts | 254 ++++++++++++++++++ .../ManagementContract.bin | 2 +- .../MerkleTreeMessageBus.bin | 2 +- .../ManagementContract/ManagementContract.go | 2 +- .../MerkleTreeMessageBus.go | 2 +- .../src/messaging/MerkleTreeMessageBus.sol | 10 +- 7 files changed, 269 insertions(+), 6 deletions(-) create mode 100644 contracts/deployment_scripts/testing/004_token_withdrawal.ts diff --git a/contracts/deployment_scripts/testing/003_simple_withdrawal.ts b/contracts/deployment_scripts/testing/003_simple_withdrawal.ts index 7166e9e6ed..b8f4f24469 100644 --- a/contracts/deployment_scripts/testing/003_simple_withdrawal.ts +++ b/contracts/deployment_scripts/testing/003_simple_withdrawal.ts @@ -18,7 +18,7 @@ function process_value_transfer(ethers, value_transfer) { } - function decode_base64(base64String) { + function decode_base64(base64String: string) { let jsonString = atob(base64String); return JSON.parse(jsonString); } @@ -54,6 +54,7 @@ async function waitForRootPublished(management, msg, proof, root, provider: Ethe const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + return; const l2Network = hre; const {deployer} = await hre.getNamedAccounts(); diff --git a/contracts/deployment_scripts/testing/004_token_withdrawal.ts b/contracts/deployment_scripts/testing/004_token_withdrawal.ts new file mode 100644 index 0000000000..b0b09aa54c --- /dev/null +++ b/contracts/deployment_scripts/testing/004_token_withdrawal.ts @@ -0,0 +1,254 @@ +import { EthereumProvider, HardhatRuntimeEnvironment } from 'hardhat/types'; +import { DeployFunction } from 'hardhat-deploy/types'; +import { Receipt } from 'hardhat-deploy/dist/types'; +import { StandardMerkleTree } from "@openzeppelin/merkle-tree"; +import { ContractTransactionReceipt, decodeBase64, keccak256, Log } from 'ethers'; +import { HardhatEthersProvider } from '@nomicfoundation/hardhat-ethers/internal/hardhat-ethers-provider'; + +function process_value_transfer(ethers, value_transfer) { + const abiTypes = ['address', 'address', 'uint256', 'uint64']; + const msg = [ + value_transfer['args'].sender, value_transfer['args'].receiver, + value_transfer['args'].amount.toString(), value_transfer['args'].sequence.toString() + ]; + + const abiCoder = ethers.AbiCoder.defaultAbiCoder(); + const encodedMsg = abiCoder.encode(abiTypes, msg); + return [msg, ethers.keccak256(encodedMsg)]; +} + +function decode_base64(base64String: string) { + let jsonString = atob(base64String); + return JSON.parse(jsonString); +} + +async function sleep(ms: number) { + return new Promise((resolve) => { + setTimeout(resolve, ms); + }); +} + +async function buildMerkleProof(tree: any, message: any) { + const proof = tree.getProof(message); + return proof; +} + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const l2Network = hre; + const l1Network = hre.companionNetworks.layer1!; + const { deployer } = await hre.getNamedAccounts(); + + // Start Generation Here + // Retrieve network configuration + const networkConfig: any = await hre.network.provider.request({ method: 'net_config' }); + console.log(`Network config = ${JSON.stringify(networkConfig, null, 2)}`); + + const token = await l1Network.deployments.get("HOCERC20"); + + await bridgeTokenToL2(hre, "1000"); + await withdrawTokenFromL2(hre, token.address, "1000"); +}; + +async function bridgeTokenToL2(hre: HardhatRuntimeEnvironment, amount: string) { + const l1Network = hre.companionNetworks.layer1!; + const deployerL1 = (await l1Network.getNamedAccounts()).deployer; + const deployerL2 = (await hre.getNamedAccounts()).deployer; + const token = await l1Network.deployments.get("HOCERC20"); + console.log(`Token address = ${token.address}`); + const tenBridge = await l1Network.deployments.get("ObscuroBridge"); + + const l1Provider = new HardhatEthersProvider(l1Network.provider, "layer1") + const signer = await l1Provider.getSigner(deployerL1); + const tokenContract = await hre.ethers.getContractAt("ERC20", token.address, signer); + { + const tx = await tokenContract.connect(signer).approve(tenBridge.address, amount); + const receipt = await tx.wait(); + if (receipt!.status !== 1) { + throw new Error("Token approval failed"); + } + console.log(`Token approval successful for l1 to l2`); + } + { + const tenBridgeContract = await hre.ethers.getContractAt("ObscuroBridge", tenBridge.address, signer); + const bridgeTx = await tenBridgeContract.sendERC20(token.address, amount, deployerL2!); + const receipt = await bridgeTx.wait(); + if (receipt!.status !== 1) { + throw new Error("Token bridge failed"); + } + console.log(`Layer1.SendERC20 successful`); + await finalizeTokenBridgeToL2(hre, receipt!, token.address); + } +} + +async function getMessage(hre: HardhatRuntimeEnvironment, receipt: ContractTransactionReceipt) { + async function submitMessagesFromTx(hre: HardhatRuntimeEnvironment, receipt: ContractTransactionReceipt) { + + const eventSignature = "LogMessagePublished(address,uint64,uint32,uint32,bytes,uint8)"; + const topic = hre.ethers.id(eventSignature) + let eventIface = new hre.ethers.Interface([ `event LogMessagePublished(address,uint64,uint32,uint32,bytes,uint8)`]); + console.log(`Event topic = ${topic}`); + + const events = receipt.logs!.filter((x)=> { + return x.topics.find((t: string)=> t == topic) != undefined; + }) || []; + + if (events.length == 0) { + throw new Error("No messages found"); + } + + const promises = events.map(async (event) => { + const decodedEvent = eventIface.parseLog({ + topics: event!.topics!, + data: event!.data + })!!; + + const xchainMessage = { + sender: decodedEvent.args[0], + sequence: decodedEvent.args[1], + nonce: decodedEvent.args[2], + topic: decodedEvent.args[3], + payload: decodedEvent.args[4], + consistencyLevel: decodedEvent.args[5] + }; + return xchainMessage; + }); + return await Promise.all(promises); + } + return await submitMessagesFromTx(hre, receipt); +} + +async function finalizeTokenBridgeToL2(hre: HardhatRuntimeEnvironment, receipt: ContractTransactionReceipt, tokenAddress: string) { + await sleep(5000); + + const l2Network = hre; + const { deployer } = await hre.getNamedAccounts(); + const signer = await hre.ethers.getSigner(deployer!); + + const l2Messenger = await l2Network.deployments.get("CrossChainMessenger"); + const l2MessengerContract = await hre.ethers.getContractAt("CrossChainMessenger", l2Messenger.address, signer); + const messages = await getMessage(hre, receipt); + const tx = await l2MessengerContract.relayMessage(messages![0]!); + const receiptForRelay = await tx.wait(); + if (receiptForRelay!.status !== 1) { + throw new Error("Relay message failed"); + } + const bridgeDeployment = await l2Network.deployments.get("EthereumBridge") + const bridge = await hre.ethers.getContractAt("EthereumBridge", bridgeDeployment.address, signer) + const correspondingToken = await bridge.remoteToLocalToken(tokenAddress); + if (!correspondingToken) { + throw new Error("No corresponding wrapped token found"); + } + + console.log(`Corresponding token = ${correspondingToken}`); + + const tokenContract = await hre.ethers.getContractAt("WrappedERC20", correspondingToken, signer); + const myAddress = await signer.getAddress(); + console.log(`My address = ${myAddress}`); + const balance = await tokenContract.balanceOf(myAddress); + console.log(`Balance = ${balance}`); +} + +async function withdrawTokenFromL2(hre: HardhatRuntimeEnvironment, tokenAddress: string, amount: string) { + const l2Network = hre; + const l1Network = hre.companionNetworks.layer1!; + const { deployer } = await hre.getNamedAccounts(); + const deployerL1 = (await l1Network.getNamedAccounts()).deployer; + const signer = await hre.ethers.getSigner(deployer!); + + const bridgeDeployment = await l2Network.deployments.get("EthereumBridge") + const bridge = await hre.ethers.getContractAt("EthereumBridge", bridgeDeployment.address, signer) + + + const wrappedToken = await bridge.remoteToLocalToken(tokenAddress); + const wrappedTokenContract = await hre.ethers.getContractAt("WrappedERC20", wrappedToken, signer); + { + const tx = await wrappedTokenContract.approve(bridgeDeployment.address, amount); + const receipt = await tx.wait(); + if (receipt!.status !== 1) { + throw new Error("Token approval failed"); + } + } + { + const tx = await bridge.sendERC20(wrappedToken, amount, deployerL1!); + const receipt = await tx.wait(); + console.log(`Receipt = ${JSON.stringify(receipt, null, 2)}`); + if (receipt!.status !== 1) { + throw new Error("Token withdrawal failed"); + } + await finalizeTokenWithdrawalFromL2(hre, receipt!, tokenAddress); + } +} + +async function finalizeTokenWithdrawalFromL2(hre: HardhatRuntimeEnvironment, receipt: ContractTransactionReceipt, tokenAddress: string) { + const l1Network = hre.companionNetworks.layer1!; + const l1Provider = new HardhatEthersProvider(l1Network.provider, "layer1") + const deployerL1 = (await l1Network.getNamedAccounts()).deployer; + const signer = await l1Provider.getSigner(deployerL1!); + + const block = await hre.ethers.provider.send("eth_getBlockByHash", [receipt.blockHash, true]); + + const decoded = decode_base64(block["crossChainTree"]); + console.log(`Tree = ${JSON.stringify(decoded, null, 2)}`); + + const messages = await getMessage(hre, receipt); + + await sleep(5000); + + const l1Messenger = await l1Network.deployments.get("CrossChainMessenger"); + const l1MessengerContract = await hre.ethers.getContractAt("CrossChainMessenger", l1Messenger.address, signer); + + const tree = StandardMerkleTree.of(decoded, ["string", "bytes32"]); + const proof = tree.getProof(0) + + console.log(`Root calculated = ${tree.root}; block root = ${block["crossChainTreeHash"]}`) + console.log(`Proof = ${JSON.stringify(proof, null, 2)}`); + + const message = messages![0]!; + // Finally do a normal ABI encode + const encodedMessage = hre.ethers.AbiCoder.defaultAbiCoder().encode( + ["address", "uint64", "uint32", "uint32", "bytes", "uint8"], + [ + message.sender, + message.sequence, + message.nonce, + message.topic, + message.payload, + message.consistencyLevel + ] + ); + + const hashedMessage2 = hre.ethers.keccak256(encodedMessage); + console.log(`Hashed message = ${hashedMessage2}`); + + // Encode packed "m" and the hashed message, then hash it + const packedLeaf = hre.ethers.AbiCoder.defaultAbiCoder().encode( + ["string", "bytes32"], + ["m", hashedMessage2] + ); + const hashedLeaf = hre.ethers.keccak256(packedLeaf); + const packedLeaf2 = hre.ethers.AbiCoder.defaultAbiCoder().encode( + ["bytes32"], + [hashedLeaf] + ); + const hashedLeaf2 = hre.ethers.keccak256(packedLeaf2); + console.log(`Hashed leaf = ${hashedLeaf2}`); + console.log(`Tree root = ${tree.root}`); + console.log(`Leaf matches root: ${hashedLeaf2 === tree.root}`); + + while (true) { + try { + const tx = await l1MessengerContract.relayMessageWithProof(message, proof, tree.root); + const receiptForRelay = await tx.wait(); + if (receiptForRelay!.status !== 1) { + break; + } + break; + } catch (e) { + console.log(`Error = ${e}`); + await sleep(5000); + } + } +} + +export default func; +func.tags = ['GasDebug', 'TokenWithdrawal']; \ No newline at end of file diff --git a/contracts/exported/src/management/ManagementContract.sol/ManagementContract.bin b/contracts/exported/src/management/ManagementContract.sol/ManagementContract.bin index e2f1d760cc..6afeae8fcc 100644 --- a/contracts/exported/src/management/ManagementContract.sol/ManagementContract.bin +++ b/contracts/exported/src/management/ManagementContract.sol/ManagementContract.bin @@ -1 +1 @@ -608060405234801561001057600080fd5b5061001a3361001f565b610090565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b614cfe80620000a06000396000f3fe60806040523480156200001157600080fd5b5060043610620002005760003560e01c80638129fc1c1162000119578063a25eb31c11620000af578063db5d91b1116200007a578063db5d91b114620004f9578063e34fbfc81462000528578063e874eb20146200053d578063f2fde38b146200055157600080fd5b8063a25eb31c14620004a3578063a4ab2faa14620004ba578063a52f433c14620004d1578063d4fab88714620004e257600080fd5b806387059edb11620000f057806387059edb14620004125780638da5cb5b146200042957806398077e86146200045a578063a1a227fa146200048057600080fd5b80638129fc1c14620003bb5780638236a7ba14620003c55780638415482614620003ec57600080fd5b806347665738116200019b5780636a30d26c11620001665780636a30d26c14620003775780636b9707d61462000390578063715018a614620003a75780637281099614620003b157600080fd5b806347665738146200030b5780635371a2161462000322578063568699c8146200033957806368e10383146200036057600080fd5b80632f0cb9e311620001dc5780632f0cb9e314620002575780633e60a22f146200028c57806343348b2f14620002d2578063440c953b146200030157600080fd5b80620ddd27146200020557806303e72e481462000227578063073b6ef31462000240575b600080fd5b6200020f600e5481565b6040516200021e919062001b7d565b60405180910390f35b6200023e6200023836600462001cd3565b62000568565b005b6200023e6200025136600462001e6e565b6200067b565b6200027d6200026836600462001f5b565b600c6020526000908152604090205460ff1681565b6040516200021e919062001f89565b620002c36200029d36600462001f99565b80516020818301810180516003825292820191909301209152546001600160a01b031681565b6040516200021e919062001fe5565b6200027d620002e336600462001ff5565b6001600160a01b031660009081526020819052604090205460ff1690565b6200020f60055481565b6200023e6200031c36600462001ff5565b62000899565b6200023e6200033336600462002088565b62000940565b620003506200034a36600462001f5b565b62000af6565b6040516200021e929190620021a4565b6200023e62000371366004620021c8565b62000b4f565b6200038162000bf8565b6040516200021e9190620022e9565b6200023e620003a136600462001ff5565b62000cdb565b6200023e62000d72565b6200023e62000d8a565b6200023e62000e15565b620003dc620003d636600462001f5b565b62000fff565b6040516200021e929190620022fc565b6200027d620003fd36600462001f5b565b600d6020526000908152604090205460ff1681565b620003dc6200042336600462001f5b565b620010ef565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b0316620002c3565b620004716200046b36600462001f5b565b62001169565b6040516200021e91906200230c565b600a5462000494906001600160a01b031681565b6040516200021e919062002369565b6200023e620004b4366004620023a7565b6200121e565b6200027d620004cb36600462002419565b62001334565b600454610100900460ff166200027d565b6200023e620004f336600462002470565b620013c6565b6200027d6200050a36600462001ff5565b6001600160a01b031660009081526001602052604090205460ff1690565b6200023e620005393660046200252e565b5050565b600b5462000494906001600160a01b031681565b6200023e6200056236600462001ff5565b620014af565b620005726200150d565b60006001600160a01b03166003836040516200058f9190620025a1565b908152604051908190036020019020546001600160a01b031603620005ee57600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01620005ec838262002691565b505b80600383604051620006019190620025a1565b90815260405190819003602001812080546001600160a01b039390931673ffffffffffffffffffffffffffffffffffffffff19909316929092179091557f17b2f9f5748931099ffee882b5b64f4a560b5c55da9b4f4e396dae3bb9f98cb5906200066f90849084906200275e565b60405180910390a15050565b6000828152600860205260409020548114620006b45760405162461bcd60e51b8152600401620006ab90620027b5565b60405180910390fd5b60006200072689898989604051602001620006d3949392919062002825565b6040516020818303038152906040528051906020012086868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506200158592505050565b6001600160a01b03811660009081526020819052604090205490915060ff16620007645760405162461bcd60e51b8152600401620006ab90620028a4565b600e8990556000805b87518110156200087457600b5488516001600160a01b039091169063b6aed0cb908a9084908110620007a357620007a3620028b6565b6020026020010151620007b690620028d7565b426040518363ffffffff1660e01b8152600401620007d692919062002911565b600060405180830381600087803b158015620007f157600080fd5b505af115801562000806573d6000803e3d6000fd5b5050505081888281518110620008205762000820620028b6565b60200260200101516200083390620028d7565b6040516020016200084692919062002911565b60405160208183030381529060405280519060200120915080806200086b9062002946565b9150506200076d565b506000908152600d60205260409020805460ff19166001179055505050505050505050565b620008a36200150d565b6001600160a01b03811660009081526020819052604090205460ff16620008de5760405162461bcd60e51b8152600401620006ab90620028a4565b6001600160a01b038116600090815260016020819052604091829020805460ff19169091179055517ffe64c7181f0fc60e300dc02cca368cdfa94d7ca45902de3b9a9d80070e760936906200093590839062001fe5565b60405180910390a150565b600b546040517fb201246f0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063b201246f906200099190879087908790879060040162002a9b565b60006040518083038186803b158015620009aa57600080fd5b505afa158015620009bf573d6000803e3d6000fd5b50505050600084604051602001620009d8919062002ada565b60408051601f1981840301815291815281516020928301206000818152600c90935291205490915060ff161562000a235760405162461bcd60e51b8152600401620006ab9062002b1d565b6001600c60008760405160200162000a3c919062002ada565b60408051808303601f190181529181528151602092830120835282820193909352908201600020805460ff191693151593909317909255600a546001600160a01b0316916399a3ad219162000a979190890190890162001ff5565b87604001356040518363ffffffff1660e01b815260040162000abb92919062002b2f565b600060405180830381600087803b15801562000ad657600080fd5b505af115801562000aeb573d6000803e3d6000fd5b505050505050505050565b60408051606080820183526000808352602083019190915291810182905260008062000b2285620010ef565b915091508162000b385760009590945092505050565b600094855260086020526040909420549492505050565b60045460ff161562000b755760405162461bcd60e51b8152600401620006ab9062002b99565b60048054600160ff1991821681179092556001600160a01b0387166000908152602081815260408083208054851686179055908490529081902080549092169092179055517ffe64c7181f0fc60e300dc02cca368cdfa94d7ca45902de3b9a9d80070e7609369062000be990879062001fe5565b60405180910390a15050505050565b60606002805480602002602001604051908101604052809291908181526020016000905b8282101562000cd257838290600052602060002001805462000c3e90620025c3565b80601f016020809104026020016040519081016040528092919081815260200182805462000c6c90620025c3565b801562000cbd5780601f1062000c915761010080835404028352916020019162000cbd565b820191906000526020600020905b81548152906001019060200180831162000c9f57829003601f168201915b50505050508152602001906001019062000c1c565b50505050905090565b62000ce56200150d565b6001600160a01b03811660009081526001602052604090205460ff1662000d205760405162461bcd60e51b8152600401620006ab9062002bde565b6001600160a01b03811660009081526001602052604090819020805460ff19169055517f0f279980343c7ca542fde9fa5396555068efb5cd560d9cf9c191aa2911079b47906200093590839062001fe5565b62000d7c6200150d565b62000d886000620015b5565b565b62000d946200150d565b600a546040517f36d2da900000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906336d2da909062000ddf90339060040162001fe5565b600060405180830381600087803b15801562000dfa57600080fd5b505af115801562000e0f573d6000803e3d6000fd5b50505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff1660008115801562000e615750825b905060008267ffffffffffffffff16600114801562000e7f5750303b155b90508115801562000e8e575080155b1562000ec6576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831562000efb57845468ff00000000000000001916680100000000000000001785555b62000f063362001633565b6000600555600160095560405162000f1e9062001b67565b604051809103906000f08015801562000f3b573d6000803e3d6000fd5b50600b80546001600160a01b039290921673ffffffffffffffffffffffffffffffffffffffff199283168117909155600a805490921681179091556040517fbd726cf82ac9c3260b1495107182e336e0654b25c10915648c0cc15b2bb72cbf9162000fa69162001fe5565b60405180910390a1831562000ff857845468ff0000000000000000191685556040517fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29062000be99060019062002c0e565b5050505050565b6040805160608082018352600080835260208084018390528385018290528582526006815284822085519384019095528454835260018501805492958694939092840191906200104f90620025c3565b80601f01602080910402602001604051908101604052809291908181526020018280546200107d90620025c3565b8015620010ce5780601f10620010a257610100808354040283529160200191620010ce565b820191906000526020600020905b815481529060010190602001808311620010b057829003601f168201915b50505091835250506002919091015460209091015280519094149492505050565b604080516060808201835260008083526020830191909152918101829052600083815260076020526040812054908190036200115457505060408051606081018252600080825282516020818101855282825283015291810182905290939092509050565b6200115f8162000fff565b9250925050915091565b600281815481106200117a57600080fd5b9060005260206000200160009150905080546200119790620025c3565b80601f0160208091040260200160405190810160405280929190818152602001828054620011c590620025c3565b8015620012165780601f10620011ea5761010080835404028352916020019162001216565b820191906000526020600020905b815481529060010190602001808311620011f857829003601f168201915b505050505081565b600062001270833562001235602086018662002c1e565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506200158592505050565b6001600160a01b03811660009081526020819052604090205490915060ff16620012ae5760405162461bcd60e51b8152600401620006ab90620028a4565b6001600160a01b03811660009081526001602052604090205460ff16620012e95760405162461bcd60e51b8152600401620006ab9062002bde565b620012f48362001648565b6040517fd6555bff8670bd3008dc064c30bb56d6ac7cb14ae801e36146fe4e7c6a504a5890620013279085359062001b7d565b60405180910390a1505050565b600080805b8351811015620013ad5781848281518110620013595762001359620028b6565b60200260200101516200136c90620028d7565b6040516020016200137f92919062002911565b6040516020818303038152906040528051906020012091508080620013a49062002946565b91505062001339565b506000908152600d602052604090205460ff1692915050565b6001600160a01b03851660009081526020819052604090205460ff1680620014025760405162461bcd60e51b8152600401620006ab9062002cd2565b8115620014845760006200143b878786604051602001620014269392919062002d13565b604051602081830303815290604052620016f5565b905060006200144b828762001585565b9050876001600160a01b0316816001600160a01b031614620014815760405162461bcd60e51b8152600401620006ab9062002d96565b50505b5050506001600160a01b039091166000908152602081905260409020805460ff191660011790555050565b620014b96200150d565b6001600160a01b038116620014ff5760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401620006ab919062001fe5565b6200150a81620015b5565b50565b33620015407f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161462000d8857336040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401620006ab919062001fe5565b60008060008062001597868662001734565b925092509250620015a9828262001785565b50909150505b92915050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300805473ffffffffffffffffffffffffffffffffffffffff1981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6200163d6200189b565b6200150a8162001903565b80356000908152600660205260409020819062001666828262002f39565b505060095460009081526007602052604090208135908190556200168c60014362002f45565b40604051602001620016a092919062002911565b60408051601f198184030181529181528151602092830120600980546000908152600890945291832055805491620016d88362002946565b9190505550600554816040013511156200150a5760400135600555565b60006200170382516200190d565b826040516020016200171792919062002f5b565b604051602081830303815290604052805190602001209050919050565b60008060008351604103620017725760208401516040850151606086015160001a6200176388828585620019b5565b9550955095505050506200177e565b50508151600091506002905b9250925092565b60008260038111156200179c576200179c62002f9b565b03620017a6575050565b6001826003811115620017bd57620017bd62002f9b565b03620017f5576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028260038111156200180c576200180c62002f9b565b0362001848576040517ffce698f7000000000000000000000000000000000000000000000000000000008152620006ab90829060040162001b7d565b60038260038111156200185f576200185f62002f9b565b036200053957806040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600401620006ab919062001b7d565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff1662000d88576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620014b96200189b565b606060006200191c8362001a7e565b600101905060008167ffffffffffffffff8111156200193f576200193f62001b8d565b6040519080825280601f01601f1916602001820160405280156200196a576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508462001974575b509392505050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115620019f2575060009150600390508262001a74565b60006001888888886040516000815260200160405260405162001a19949392919062002fbb565b6020604051602081039080840390855afa15801562001a3c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811662001a6a5750600092506001915082905062001a74565b9250600091508190505b9450945094915050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831062001ac8577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef8100000000831062001af5576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831062001b1457662386f26fc10000830492506010015b6305f5e100831062001b2d576305f5e100830492506008015b612710831062001b4257612710830492506004015b6064831062001b55576064830492506002015b600a8310620015af5760010192915050565b611cd08062002ff983390190565b805b82525050565b60208101620015af828462001b75565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff8211171562001bcc5762001bcc62001b8d565b6040525050565b600062001bdf60405190565b905062001bed828262001ba3565b919050565b600067ffffffffffffffff82111562001c0f5762001c0f62001b8d565b601f19601f83011660200192915050565b82818337506000910152565b600062001c4362001c3d8462001bf2565b62001bd3565b90508281526020810184848401111562001c605762001c60600080fd5b620019ad84828562001c20565b600082601f83011262001c835762001c83600080fd5b813562001c9584826020860162001c2c565b949350505050565b60006001600160a01b038216620015af565b62001cba8162001c9d565b81146200150a57600080fd5b8035620015af8162001caf565b6000806040838503121562001ceb5762001ceb600080fd5b823567ffffffffffffffff81111562001d075762001d07600080fd5b62001d158582860162001c6d565b925050602062001d288582860162001cc6565b9150509250929050565b8062001cba565b8035620015af8162001d32565b600067ffffffffffffffff82111562001d635762001d6362001b8d565b5060209081020190565b600062001d7e62001c3d8462001d46565b8381529050602080820190840283018581111562001d9f5762001d9f600080fd5b835b8181101562001de457803567ffffffffffffffff81111562001dc65762001dc6600080fd5b850162001dd4888262001c6d565b8452506020928301920162001da1565b5050509392505050565b600082601f83011262001e045762001e04600080fd5b813562001c9584826020860162001d6d565b60008083601f84011262001e2d5762001e2d600080fd5b50813567ffffffffffffffff81111562001e4a5762001e4a600080fd5b60208301915083600182028301111562001e675762001e67600080fd5b9250929050565b60008060008060008060008060e0898b03121562001e8f5762001e8f600080fd5b600062001e9d8b8b62001d39565b985050602062001eb08b828c0162001d39565b975050604062001ec38b828c0162001d39565b965050606089013567ffffffffffffffff81111562001ee55762001ee5600080fd5b62001ef38b828c0162001dee565b955050608089013567ffffffffffffffff81111562001f155762001f15600080fd5b62001f238b828c0162001e16565b945094505060a062001f388b828c0162001d39565b92505060c062001f4b8b828c0162001d39565b9150509295985092959890939650565b60006020828403121562001f725762001f72600080fd5b600062001c95848462001d39565b80151562001b77565b60208101620015af828462001f80565b60006020828403121562001fb05762001fb0600080fd5b813567ffffffffffffffff81111562001fcc5762001fcc600080fd5b62001c958482850162001c6d565b62001b778162001c9d565b60208101620015af828462001fda565b6000602082840312156200200c576200200c600080fd5b600062001c95848462001cc6565b600060808284031215620020315762002031600080fd5b50919050565b60008083601f8401126200204e576200204e600080fd5b50813567ffffffffffffffff8111156200206b576200206b600080fd5b60208301915083602082028301111562001e675762001e67600080fd5b60008060008060c08587031215620020a357620020a3600080fd5b6000620020b187876200201a565b945050608085013567ffffffffffffffff811115620020d357620020d3600080fd5b620020e18782880162002037565b935093505060a0620020f68782880162001d39565b91505092959194509250565b60005b838110156200211f57818101518382015260200162002105565b50506000910152565b600062002133825190565b8084526020840193506200214c81856020860162002102565b601f01601f19169290920192915050565b8051600090606084019062002173858262001b75565b50602083015184820360208601526200218d828262002128565b9150506040830151620019ad604086018262001b75565b60408101620021b4828562001b75565b818103602083015262001c9581846200215d565b600080600080600060608688031215620021e557620021e5600080fd5b6000620021f3888862001cc6565b955050602086013567ffffffffffffffff811115620022155762002215600080fd5b620022238882890162001e16565b9450945050604086013567ffffffffffffffff811115620022475762002247600080fd5b620022558882890162001e16565b92509250509295509295909350565b600062002272838362002128565b9392505050565b60200190565b60006200228a825190565b80845260208401935083602082028501620022a58560200190565b60005b84811015620022dd5783830388528151620022c4848262002264565b93505060208201602098909801979150600101620022a8565b50909695505050505050565b602080825281016200227281846200227f565b60408101620021b4828562001f80565b6020808252810162002272818462002128565b6000620015af6001600160a01b03831662002338565b90565b6001600160a01b031690565b6000620015af826200231f565b6000620015af8262002344565b62001b778162002351565b60208101620015af82846200235e565b600060608284031215620020315762002031600080fd5b600060208284031215620020315762002031600080fd5b60008060408385031215620023bf57620023bf600080fd5b823567ffffffffffffffff811115620023db57620023db600080fd5b620023e98582860162002379565b925050602083013567ffffffffffffffff8111156200240b576200240b600080fd5b62001d288582860162002390565b600060208284031215620024305762002430600080fd5b813567ffffffffffffffff8111156200244c576200244c600080fd5b62001c958482850162001dee565b80151562001cba565b8035620015af816200245a565b600080600080600060a086880312156200248d576200248d600080fd5b60006200249b888862001cc6565b9550506020620024ae8882890162001cc6565b945050604086013567ffffffffffffffff811115620024d057620024d0600080fd5b620024de8882890162001c6d565b935050606086013567ffffffffffffffff811115620025005762002500600080fd5b6200250e8882890162001c6d565b9250506080620025218882890162002463565b9150509295509295909350565b60008060208385031215620025465762002546600080fd5b823567ffffffffffffffff811115620025625762002562600080fd5b620025708582860162001e16565b92509250509250929050565b600062002587825190565b6200259781856020860162002102565b9290920192915050565b620015af81836200257c565b634e487b7160e01b600052602260045260246000fd5b600281046001821680620025d857607f821691505b602082108103620020315762002031620025ad565b6000620015af620023358381565b6200260683620025ed565b815460001960089490940293841b1916921b91909117905550565b600062002630818484620025fb565b505050565b8181101562000539576200264b60008262002621565b60010162002635565b601f82111562002630576000818152602090206020601f850104810160208510156200267d5750805b62000ff86020601f86010483018262002635565b815167ffffffffffffffff811115620026ae57620026ae62001b8d565b620026ba8254620025c3565b620026c782828562002654565b506020601f821160018114620026ff5760008315620026e65750848201515b600019600885021c198116600285021785555062000ff8565b600084815260208120601f198516915b828110156200273157878501518255602094850194600190920191016200270f565b50848210156200274f5783870151600019601f87166008021c191681555b50505050600202600101905550565b6040808252810162002771818562002128565b905062002272602083018462001fda565b600e8152602081017f496e76616c696420666f726b49440000000000000000000000000000000000008152905062002279565b60208082528101620015af8162002782565b6000620027d2825190565b80845260208401935083602082028501620027ed8560200190565b60005b84811015620022dd57838303885281516200280c848262002264565b93505060208201602098909801979150600101620027f0565b6080810162002835828762001b75565b62002844602083018662001b75565b62002853604083018562001b75565b8181036060830152620028678184620027c7565b9695505050505050565b60168152602081017f656e636c6176654944206e6f74206174746573746564000000000000000000008152905062002279565b60208082528101620015af8162002871565b634e487b7160e01b600052603260045260246000fd5b6000620015af825190565b6000620028e2825190565b60208301620028f181620028cc565b925050602081101562002031576000196020919091036008021b16919050565b6040810162002921828562001b75565b62002272602083018462001b75565b634e487b7160e01b600052601160045260246000fd5b6000600182016200295b576200295b62002930565b5060010190565b506000620015af602083018362001cc6565b506000620015af602083018362001d39565b67ffffffffffffffff811662001cba565b8035620015af8162002986565b506000620015af602083018362002997565b67ffffffffffffffff811662001b77565b620029d3818062002962565b620029df838262001fda565b50620029ef602082018262002962565b620029fe602084018262001fda565b5062002a0e604082018262002974565b62002a1d604084018262001b75565b5062002a2d6060820182620029a4565b620026306060840182620029b6565b82818337505050565b81835260208301925060007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111562002a825762002a82600080fd5b60208302925062002a9583858462002a3c565b50500190565b60c0810162002aab8287620029c7565b818103608083015262002ac081858762002a45565b905062002ad160a083018462001b75565b95945050505050565b60808101620015af8284620029c7565b60188152602081017f7769746864726177616c20616c7265616479207370656e7400000000000000008152905062002279565b60208082528101620015af8162002aea565b6040810162002921828562001fda565b60228152602081017f6e6574776f726b2073656372657420616c726561647920696e697469616c697a81527f6564000000000000000000000000000000000000000000000000000000000000602082015290505b60400190565b60208082528101620015af8162002b3f565b60198152602081017f656e636c6176654944206e6f7420612073657175656e636572000000000000008152905062002279565b60208082528101620015af8162002bab565b600067ffffffffffffffff8216620015af565b62001b778162002bf0565b60208101620015af828462002c03565b6000808335601e193685900301811262002c3b5762002c3b600080fd5b8301915050803567ffffffffffffffff81111562002c5c5762002c5c600080fd5b60208201915060018102360382131562001e675762001e67600080fd5b60238152602081017f726573706f6e64696e67206174746573746572206973206e6f7420617474657381527f74656400000000000000000000000000000000000000000000000000000000006020820152905062002b93565b60208082528101620015af8162002c79565b6000620015af8260601b90565b6000620015af8262002ce4565b62001b7762002d0d8262001c9d565b62002cf1565b62002d1f818562002cfe565b60140162002d2e818462002cfe565b60140162001c9581836200257c565b602c8152602081017f63616c63756c61746564206164647265737320616e642061747465737465724981527f4420646f6e74206d6174636800000000000000000000000000000000000000006020820152905062002b93565b60208082528101620015af8162002d3d565b60008135620015af8162001d32565b600081620015af565b62002dcb8262002db7565b62002dda620023358262002db7565b8255505050565b8267ffffffffffffffff81111562002dfd5762002dfd62001b8d565b62002e098254620025c3565b62002e1682828562002654565b506000601f82116001811462002e4e576000831562002e355750848201355b600019600885021c198116600285021785555062002eab565b600084815260209020601f19841690835b8281101562002e81578785013582556020948501946001909201910162002e5f565b508482101562002e9f57600019601f86166008021c19848801351681555b50506001600284020184555b505050505050565b6200263083838362002de1565b62002ecb82620025ed565b8062002dda565b80828062002ee08162002da8565b905062002eee818462002dc0565b505050600181016020830162002f05818562002c1e565b915062002f1482828562002eb3565b50505060028101604083018062002f2b8262002da8565b905062000ff8818462002ec0565b62000539828262002ed2565b81810381811115620015af57620015af62002930565b7f19457468657265756d205369676e6564204d6573736167653a0a0000000000008152601a0162002f8d81846200257c565b90506200227281836200257c565b634e487b7160e01b600052602160045260246000fd5b60ff811662001b77565b6080810162002fcb828762001b75565b62002fda602083018662002fb1565b62002fe9604083018562001b75565b62002ad1606083018462001b7556fe60806040523480156200001157600080fd5b50338062000040576000604051631e4fbdf760e01b8152600401620000379190620000c6565b60405180910390fd5b6200004b8162000052565b50620000d6565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006001600160a01b0382165b92915050565b620000c081620000a2565b82525050565b60208101620000af8284620000b5565b611bea80620000e66000396000f3fe6080604052600436106100e15760003560e01c80639730886d1161007f578063b201246f11610059578063b201246f146102d4578063b6aed0cb146102f4578063e138a8d214610314578063f2fde38b1461033457610155565b80639730886d1461026757806399a3ad2114610287578063b1454caa146102a757610155565b8063346633fb116100bb578063346633fb146101f957806336d2da901461020c578063715018a61461022c5780638da5cb5b1461024157610155565b80630fcfbd11146101765780630fe9188e146101ac57806333a88c72146101cc57610155565b36610155576040517f346633fb000000000000000000000000000000000000000000000000000000008152309063346633fb9034906101269033908390600401610b86565b6000604051808303818588803b15801561013f57600080fd5b505af1158015610153573d6000803e3d6000fd5b005b60405162461bcd60e51b815260040161016d90610bd5565b60405180910390fd5b34801561018257600080fd5b50610196610191366004610c00565b610354565b6040516101a39190610c3b565b60405180910390f35b3480156101b857600080fd5b506101536101c7366004610c61565b6103b4565b3480156101d857600080fd5b506101ec6101e7366004610c00565b6103fa565b6040516101a39190610c8a565b610153610207366004610cac565b61044d565b34801561021857600080fd5b50610153610227366004610ce9565b6104d7565b34801561023857600080fd5b50610153610556565b34801561024d57600080fd5b506000546001600160a01b03166040516101a39190610d0a565b34801561027357600080fd5b50610153610282366004610d18565b61056a565b34801561029357600080fd5b506101536102a2366004610cac565b610666565b3480156102b357600080fd5b506102c76102c2366004610dd1565b6106e6565b6040516101a39190610e65565b3480156102e057600080fd5b506101536102ef366004610ed3565b61073f565b34801561030057600080fd5b5061015361030f366004610f43565b610840565b34801561032057600080fd5b5061015361032f366004610f65565b610886565b34801561034057600080fd5b5061015361034f366004610ce9565b610965565b600080826040516020016103689190611182565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806103ad5760405162461bcd60e51b815260040161016d906111d1565b9392505050565b6103bc6109bc565b60008181526004602052604081205490036103e95760405162461bcd60e51b815260040161016d90611213565b600090815260046020526040812055565b6000808260405160200161040e9190611182565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906104455750428111155b949350505050565b60003411801561045c57508034145b6104785760405162461bcd60e51b815260040161016d9061127b565b600061048333610a02565b9050826001600160a01b0316336001600160a01b03167f50c536ac33a920f00755865b831d17bf4cff0b2e0345f65b16d52bfc004068b634846040516104ca92919061128b565b60405180910390a3505050565b6104df6109bc565b6000816001600160a01b03164760405160006040518083038185875af1925050503d806000811461052c576040519150601f19603f3d011682016040523d82523d6000602084013e610531565b606091505b50509050806105525760405162461bcd60e51b815260040161016d906112d8565b5050565b61055e6109bc565b6105686000610a60565b565b6105726109bc565b600061057e82426112fe565b90506000836040516020016105939190611182565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156105d85760405162461bcd60e51b815260040161016d90611369565b60008181526001602090815260408220849055600291906105fb90870187610ce9565b6001600160a01b0316815260208101919091526040016000908120906106276080870160608801611379565b63ffffffff1681526020808201929092526040016000908120805460018101825590825291902085916004020161065e82826117e0565b505050505050565b61066e6109bc565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146106bb576040519150601f19603f3d011682016040523d82523d6000602084013e6106c0565b606091505b50509050806106e15760405162461bcd60e51b815260040161016d906112d8565b505050565b60006106f133610a02565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef7759373382888888888860405161072e97969594939291906117ea565b60405180910390a195945050505050565b600081815260046020526040812054900361076c5760405162461bcd60e51b815260040161016d906118a5565b60008181526004602052604090205442101561079a5760405162461bcd60e51b815260040161016d906118f1565b6000846040516020016107ad9190611976565b604051602081830303815290604052805190602001206040516020016107d391906119b6565b60405160208183030381529060405280519060200120905061081d8484848460405160200161080291906119d5565b60405160208183030381529060405280519060200120610ac8565b6108395760405162461bcd60e51b815260040161016d90611a3f565b5050505050565b6108486109bc565b600082815260046020526040902054156108745760405162461bcd60e51b815260040161016d90611aa7565b60009182526004602052604090912055565b60008181526004602052604081205490036108b35760405162461bcd60e51b815260040161016d906118a5565b6000818152600460205260409020544210156108e15760405162461bcd60e51b815260040161016d906118f1565b6000846040516020016108f49190611182565b6040516020818303038152906040528051906020012060405160200161091a9190611ae9565b6040516020818303038152906040528051906020012090506109498484848460405160200161080291906119d5565b6108395760405162461bcd60e51b815260040161016d90611b51565b61096d6109bc565b6001600160a01b0381166109b05760006040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161016d9190610d0a565b6109b981610a60565b50565b6000546001600160a01b0316331461056857336040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161016d9190610d0a565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff169160019190610a358385611b61565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600082610ad6868685610ae0565b1495945050505050565b600081815b84811015610b2357610b0f82878784818110610b0357610b03611b85565b90506020020135610b2c565b915080610b1b81611b9b565b915050610ae5565b50949350505050565b6000818310610b48576000828152602084905260409020610b57565b60008381526020839052604090205b90505b92915050565b60006001600160a01b038216610b5a565b610b7a81610b60565b82525050565b80610b7a565b60408101610b948285610b71565b6103ad6020830184610b80565b600b8152602081017f756e737570706f72746564000000000000000000000000000000000000000000815290505b60200190565b60208082528101610b5a81610ba1565b600060c08284031215610bfa57610bfa600080fd5b50919050565b600060208284031215610c1557610c15600080fd5b813567ffffffffffffffff811115610c2f57610c2f600080fd5b61044584828501610be5565b60208101610b5a8284610b80565b805b81146109b957600080fd5b8035610b5a81610c49565b600060208284031215610c7657610c76600080fd5b60006104458484610c56565b801515610b7a565b60208101610b5a8284610c82565b610c4b81610b60565b8035610b5a81610c98565b60008060408385031215610cc257610cc2600080fd5b6000610cce8585610ca1565b9250506020610cdf85828601610c56565b9150509250929050565b600060208284031215610cfe57610cfe600080fd5b60006104458484610ca1565b60208101610b5a8284610b71565b60008060408385031215610d2e57610d2e600080fd5b823567ffffffffffffffff811115610d4857610d48600080fd5b610cce85828601610be5565b63ffffffff8116610c4b565b8035610b5a81610d54565b60008083601f840112610d8057610d80600080fd5b50813567ffffffffffffffff811115610d9b57610d9b600080fd5b602083019150836001820283011115610db657610db6600080fd5b9250929050565b60ff8116610c4b565b8035610b5a81610dbd565b600080600080600060808688031215610dec57610dec600080fd5b6000610df88888610d60565b9550506020610e0988828901610d60565b945050604086013567ffffffffffffffff811115610e2957610e29600080fd5b610e3588828901610d6b565b93509350506060610e4888828901610dc6565b9150509295509295909350565b67ffffffffffffffff8116610b7a565b60208101610b5a8284610e55565b600060808284031215610bfa57610bfa600080fd5b60008083601f840112610e9d57610e9d600080fd5b50813567ffffffffffffffff811115610eb857610eb8600080fd5b602083019150836020820283011115610db657610db6600080fd5b60008060008060c08587031215610eec57610eec600080fd5b6000610ef88787610e73565b945050608085013567ffffffffffffffff811115610f1857610f18600080fd5b610f2487828801610e88565b935093505060a0610f3787828801610c56565b91505092959194509250565b60008060408385031215610f5957610f59600080fd5b6000610cce8585610c56565b60008060008060608587031215610f7e57610f7e600080fd5b843567ffffffffffffffff811115610f9857610f98600080fd5b610fa487828801610be5565b945050602085013567ffffffffffffffff811115610fc457610fc4600080fd5b610fd087828801610e88565b93509350506040610f3787828801610c56565b506000610b5a6020830183610ca1565b67ffffffffffffffff8116610c4b565b8035610b5a81610ff3565b506000610b5a6020830183611003565b506000610b5a6020830183610d60565b63ffffffff8116610b7a565b6000808335601e193685900301811261105557611055600080fd5b830160208101925035905067ffffffffffffffff81111561107857611078600080fd5b36819003821315610db657610db6600080fd5b82818337506000910152565b8183526020830192506110ab82848361108b565b50601f01601f19160190565b506000610b5a6020830183610dc6565b60ff8116610b7a565b600060c083016110e08380610fe3565b6110ea8582610b71565b506110f8602084018461100e565b6111056020860182610e55565b50611113604084018461101e565b611120604086018261102e565b5061112e606084018461101e565b61113b606086018261102e565b50611149608084018461103a565b858303608087015261115c838284611097565b9250505061116d60a08401846110b7565b61117a60a08601826110c7565b509392505050565b60208082528101610b5781846110d0565b60218152602081017f54686973206d65737361676520776173206e65766572207375626d69747465648152601760f91b602082015290505b60400190565b60208082528101610b5a81611193565b601a8152602081017f537461746520726f6f7420646f6573206e6f742065786973742e00000000000081529050610bcf565b60208082528101610b5a816111e1565b60308152602081017f417474656d7074696e6720746f2073656e642076616c756520776974686f757481527f2070726f766964696e6720457468657200000000000000000000000000000000602082015290506111cb565b60208082528101610b5a81611223565b604081016112998285610b80565b6103ad6020830184610e55565b60148152602081017f6661696c65642073656e64696e672076616c756500000000000000000000000081529050610bcf565b60208082528101610b5a816112a6565b634e487b7160e01b600052601160045260246000fd5b80820180821115610b5a57610b5a6112e8565b60218152602081017f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636581527f2100000000000000000000000000000000000000000000000000000000000000602082015290506111cb565b60208082528101610b5a81611311565b60006020828403121561138e5761138e600080fd5b60006104458484610d60565b60008135610b5a81610c98565b60006001600160a01b03835b81169019929092169190911792915050565b6000610b5a6001600160a01b0383166113dc565b90565b6001600160a01b031690565b6000610b5a826113c5565b6000610b5a826113e8565b611407826113f3565b6114128183546113a7565b8255505050565b60008135610b5a81610ff3565b60007bffffffffffffffff00000000000000000000000000000000000000006113b38460a01b90565b600067ffffffffffffffff8216610b5a565b61146a8261144f565b611412818354611426565b60008135610b5a81610d54565b60007fffffffff000000000000000000000000000000000000000000000000000000006113b38460e01b90565b600063ffffffff8216610b5a565b6114c6826114af565b611412818354611482565b600063ffffffff836113b3565b6114e7826114af565b6114128183546114d1565b6000808335601e193685900301811261150d5761150d600080fd5b8301915050803567ffffffffffffffff81111561152c5761152c600080fd5b602082019150600181023603821315610db657610db6600080fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052602260045260246000fd5b60028104600182168061158757607f821691505b602082108103610bfa57610bfa61155d565b6000610b5a6113d98381565b6115ae83611599565b815460001960089490940293841b1916921b91909117905550565b60006106e18184846115a5565b81811015610552576115e96000826115c9565b6001016115d6565b601f8211156106e1576000818152602090206020601f850104810160208510156116185750805b6108396020601f8601048301826115d6565b8267ffffffffffffffff81111561164357611643611547565b61164d8254611573565b6116588282856115f1565b506000601f82116001811461168d57600083156116755750848201355b600019600885021c198116600285021785555061065e565b600084815260209020601f19841690835b828110156116be578785013582556020948501946001909201910161169e565b50848210156116db57600019601f86166008021c19848801351681555b5050505060020260010190555050565b6106e183838361162a565b60008135610b5a81610dbd565b600060ff836113b3565b600060ff8216610b5a565b6117218261170d565b611412818354611703565b8082806117388161139a565b905061174481846113fe565b5050602083018061175482611419565b90506117608184611461565b5050604083018061177082611475565b905061177c81846114bd565b50505060018101606083018061179182611475565b905061179d81846114de565b50505060028101608083016117b281856114f2565b91506117bf8282856116eb565b5050506003810160a08301806117d4826116f6565b90506108398184611718565b610552828261172c565b60c081016117f8828a610b71565b6118056020830189610e55565b611812604083018861102e565b61181f606083018761102e565b8181036080830152611832818587611097565b905061184160a08301846110c7565b98975050505050505050565b602a8152602081017f526f6f74206973206e6f74207075626c6973686564206f6e2074686973206d6581527f7373616765206275732e00000000000000000000000000000000000000000000602082015290506111cb565b60208082528101610b5a8161184d565b60218152602081017f526f6f74206973206e6f7420636f6e736964657265642066696e616c207965748152601760f91b602082015290506111cb565b60208082528101610b5a816118b5565b506000610b5a6020830183610c56565b61191b8180610fe3565b6119258382610b71565b506119336020820182610fe3565b6119406020840182610b71565b5061194e6040820182611901565b61195b6040840182610b80565b50611969606082018261100e565b6106e16060840182610e55565b60808101610b5a8284611911565b60018152602081017f760000000000000000000000000000000000000000000000000000000000000081529050610bcf565b604080825281016119c681611984565b9050610b5a6020830184610b80565b6119df8183610b80565b602001919050565b60338152602081017f496e76616c696420696e636c7573696f6e2070726f6f6620666f722076616c7581527f65207472616e73666572206d6573736167652e00000000000000000000000000602082015290506111cb565b60208082528101610b5a816119e7565b60258152602081017f526f6f7420616c726561647920616464656420746f20746865206d657373616781527f6520627573000000000000000000000000000000000000000000000000000000602082015290506111cb565b60208082528101610b5a81611a4f565b60018152602081017f6d0000000000000000000000000000000000000000000000000000000000000081529050610bcf565b604080825281016119c681611ab7565b60308152602081017f496e76616c696420696e636c7573696f6e2070726f6f6620666f722063726f7381527f7320636861696e206d6573736167652e00000000000000000000000000000000602082015290506111cb565b60208082528101610b5a81611af9565b67ffffffffffffffff918216919081169082820190811115610b5a57610b5a6112e8565b634e487b7160e01b600052603260045260246000fd5b600060018201611bad57611bad6112e8565b506001019056fea2646970667358221220c8293ff525ddcfd01a52b0bf26c4071757f9277603389aebc8011c7267aa4e7064736f6c63430008140033a2646970667358221220307774f9e39aef6bee804a0b42596a02f401aafd89ea5697b72f7adfd5d9696c64736f6c63430008140033 \ No newline at end of file +608060405234801561001057600080fd5b5061001a3361001f565b610090565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b614da480620000a06000396000f3fe60806040523480156200001157600080fd5b5060043610620002005760003560e01c80638129fc1c1162000119578063a25eb31c11620000af578063db5d91b1116200007a578063db5d91b114620004f9578063e34fbfc81462000528578063e874eb20146200053d578063f2fde38b146200055157600080fd5b8063a25eb31c14620004a3578063a4ab2faa14620004ba578063a52f433c14620004d1578063d4fab88714620004e257600080fd5b806387059edb11620000f057806387059edb14620004125780638da5cb5b146200042957806398077e86146200045a578063a1a227fa146200048057600080fd5b80638129fc1c14620003bb5780638236a7ba14620003c55780638415482614620003ec57600080fd5b806347665738116200019b5780636a30d26c11620001665780636a30d26c14620003775780636b9707d61462000390578063715018a614620003a75780637281099614620003b157600080fd5b806347665738146200030b5780635371a2161462000322578063568699c8146200033957806368e10383146200036057600080fd5b80632f0cb9e311620001dc5780632f0cb9e314620002575780633e60a22f146200028c57806343348b2f14620002d2578063440c953b146200030157600080fd5b80620ddd27146200020557806303e72e481462000227578063073b6ef31462000240575b600080fd5b6200020f600e5481565b6040516200021e919062001b7d565b60405180910390f35b6200023e6200023836600462001cd3565b62000568565b005b6200023e6200025136600462001e6e565b6200067b565b6200027d6200026836600462001f5b565b600c6020526000908152604090205460ff1681565b6040516200021e919062001f89565b620002c36200029d36600462001f99565b80516020818301810180516003825292820191909301209152546001600160a01b031681565b6040516200021e919062001fe5565b6200027d620002e336600462001ff5565b6001600160a01b031660009081526020819052604090205460ff1690565b6200020f60055481565b6200023e6200031c36600462001ff5565b62000899565b6200023e6200033336600462002088565b62000940565b620003506200034a36600462001f5b565b62000af6565b6040516200021e929190620021a4565b6200023e62000371366004620021c8565b62000b4f565b6200038162000bf8565b6040516200021e9190620022e9565b6200023e620003a136600462001ff5565b62000cdb565b6200023e62000d72565b6200023e62000d8a565b6200023e62000e15565b620003dc620003d636600462001f5b565b62000fff565b6040516200021e929190620022fc565b6200027d620003fd36600462001f5b565b600d6020526000908152604090205460ff1681565b620003dc6200042336600462001f5b565b620010ef565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b0316620002c3565b620004716200046b36600462001f5b565b62001169565b6040516200021e91906200230c565b600a5462000494906001600160a01b031681565b6040516200021e919062002369565b6200023e620004b4366004620023a7565b6200121e565b6200027d620004cb36600462002419565b62001334565b600454610100900460ff166200027d565b6200023e620004f336600462002470565b620013c6565b6200027d6200050a36600462001ff5565b6001600160a01b031660009081526001602052604090205460ff1690565b6200023e620005393660046200252e565b5050565b600b5462000494906001600160a01b031681565b6200023e6200056236600462001ff5565b620014af565b620005726200150d565b60006001600160a01b03166003836040516200058f9190620025a1565b908152604051908190036020019020546001600160a01b031603620005ee57600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01620005ec838262002691565b505b80600383604051620006019190620025a1565b90815260405190819003602001812080546001600160a01b039390931673ffffffffffffffffffffffffffffffffffffffff19909316929092179091557f17b2f9f5748931099ffee882b5b64f4a560b5c55da9b4f4e396dae3bb9f98cb5906200066f90849084906200275e565b60405180910390a15050565b6000828152600860205260409020548114620006b45760405162461bcd60e51b8152600401620006ab90620027b5565b60405180910390fd5b60006200072689898989604051602001620006d3949392919062002825565b6040516020818303038152906040528051906020012086868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506200158592505050565b6001600160a01b03811660009081526020819052604090205490915060ff16620007645760405162461bcd60e51b8152600401620006ab90620028a4565b600e8990556000805b87518110156200087457600b5488516001600160a01b039091169063b6aed0cb908a9084908110620007a357620007a3620028b6565b6020026020010151620007b690620028d7565b426040518363ffffffff1660e01b8152600401620007d692919062002911565b600060405180830381600087803b158015620007f157600080fd5b505af115801562000806573d6000803e3d6000fd5b5050505081888281518110620008205762000820620028b6565b60200260200101516200083390620028d7565b6040516020016200084692919062002911565b60405160208183030381529060405280519060200120915080806200086b9062002946565b9150506200076d565b506000908152600d60205260409020805460ff19166001179055505050505050505050565b620008a36200150d565b6001600160a01b03811660009081526020819052604090205460ff16620008de5760405162461bcd60e51b8152600401620006ab90620028a4565b6001600160a01b038116600090815260016020819052604091829020805460ff19169091179055517ffe64c7181f0fc60e300dc02cca368cdfa94d7ca45902de3b9a9d80070e760936906200093590839062001fe5565b60405180910390a150565b600b546040517fb201246f0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063b201246f906200099190879087908790879060040162002a9b565b60006040518083038186803b158015620009aa57600080fd5b505afa158015620009bf573d6000803e3d6000fd5b50505050600084604051602001620009d8919062002ada565b60408051601f1981840301815291815281516020928301206000818152600c90935291205490915060ff161562000a235760405162461bcd60e51b8152600401620006ab9062002b1d565b6001600c60008760405160200162000a3c919062002ada565b60408051808303601f190181529181528151602092830120835282820193909352908201600020805460ff191693151593909317909255600a546001600160a01b0316916399a3ad219162000a979190890190890162001ff5565b87604001356040518363ffffffff1660e01b815260040162000abb92919062002b2f565b600060405180830381600087803b15801562000ad657600080fd5b505af115801562000aeb573d6000803e3d6000fd5b505050505050505050565b60408051606080820183526000808352602083019190915291810182905260008062000b2285620010ef565b915091508162000b385760009590945092505050565b600094855260086020526040909420549492505050565b60045460ff161562000b755760405162461bcd60e51b8152600401620006ab9062002b99565b60048054600160ff1991821681179092556001600160a01b0387166000908152602081815260408083208054851686179055908490529081902080549092169092179055517ffe64c7181f0fc60e300dc02cca368cdfa94d7ca45902de3b9a9d80070e7609369062000be990879062001fe5565b60405180910390a15050505050565b60606002805480602002602001604051908101604052809291908181526020016000905b8282101562000cd257838290600052602060002001805462000c3e90620025c3565b80601f016020809104026020016040519081016040528092919081815260200182805462000c6c90620025c3565b801562000cbd5780601f1062000c915761010080835404028352916020019162000cbd565b820191906000526020600020905b81548152906001019060200180831162000c9f57829003601f168201915b50505050508152602001906001019062000c1c565b50505050905090565b62000ce56200150d565b6001600160a01b03811660009081526001602052604090205460ff1662000d205760405162461bcd60e51b8152600401620006ab9062002bde565b6001600160a01b03811660009081526001602052604090819020805460ff19169055517f0f279980343c7ca542fde9fa5396555068efb5cd560d9cf9c191aa2911079b47906200093590839062001fe5565b62000d7c6200150d565b62000d886000620015b5565b565b62000d946200150d565b600a546040517f36d2da900000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906336d2da909062000ddf90339060040162001fe5565b600060405180830381600087803b15801562000dfa57600080fd5b505af115801562000e0f573d6000803e3d6000fd5b50505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff1660008115801562000e615750825b905060008267ffffffffffffffff16600114801562000e7f5750303b155b90508115801562000e8e575080155b1562000ec6576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831562000efb57845468ff00000000000000001916680100000000000000001785555b62000f063362001633565b6000600555600160095560405162000f1e9062001b67565b604051809103906000f08015801562000f3b573d6000803e3d6000fd5b50600b80546001600160a01b039290921673ffffffffffffffffffffffffffffffffffffffff199283168117909155600a805490921681179091556040517fbd726cf82ac9c3260b1495107182e336e0654b25c10915648c0cc15b2bb72cbf9162000fa69162001fe5565b60405180910390a1831562000ff857845468ff0000000000000000191685556040517fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29062000be99060019062002c0e565b5050505050565b6040805160608082018352600080835260208084018390528385018290528582526006815284822085519384019095528454835260018501805492958694939092840191906200104f90620025c3565b80601f01602080910402602001604051908101604052809291908181526020018280546200107d90620025c3565b8015620010ce5780601f10620010a257610100808354040283529160200191620010ce565b820191906000526020600020905b815481529060010190602001808311620010b057829003601f168201915b50505091835250506002919091015460209091015280519094149492505050565b604080516060808201835260008083526020830191909152918101829052600083815260076020526040812054908190036200115457505060408051606081018252600080825282516020818101855282825283015291810182905290939092509050565b6200115f8162000fff565b9250925050915091565b600281815481106200117a57600080fd5b9060005260206000200160009150905080546200119790620025c3565b80601f0160208091040260200160405190810160405280929190818152602001828054620011c590620025c3565b8015620012165780601f10620011ea5761010080835404028352916020019162001216565b820191906000526020600020905b815481529060010190602001808311620011f857829003601f168201915b505050505081565b600062001270833562001235602086018662002c1e565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506200158592505050565b6001600160a01b03811660009081526020819052604090205490915060ff16620012ae5760405162461bcd60e51b8152600401620006ab90620028a4565b6001600160a01b03811660009081526001602052604090205460ff16620012e95760405162461bcd60e51b8152600401620006ab9062002bde565b620012f48362001648565b6040517fd6555bff8670bd3008dc064c30bb56d6ac7cb14ae801e36146fe4e7c6a504a5890620013279085359062001b7d565b60405180910390a1505050565b600080805b8351811015620013ad5781848281518110620013595762001359620028b6565b60200260200101516200136c90620028d7565b6040516020016200137f92919062002911565b6040516020818303038152906040528051906020012091508080620013a49062002946565b91505062001339565b506000908152600d602052604090205460ff1692915050565b6001600160a01b03851660009081526020819052604090205460ff1680620014025760405162461bcd60e51b8152600401620006ab9062002cd2565b8115620014845760006200143b878786604051602001620014269392919062002d13565b604051602081830303815290604052620016f5565b905060006200144b828762001585565b9050876001600160a01b0316816001600160a01b031614620014815760405162461bcd60e51b8152600401620006ab9062002d96565b50505b5050506001600160a01b039091166000908152602081905260409020805460ff191660011790555050565b620014b96200150d565b6001600160a01b038116620014ff5760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401620006ab919062001fe5565b6200150a81620015b5565b50565b33620015407f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161462000d8857336040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401620006ab919062001fe5565b60008060008062001597868662001734565b925092509250620015a9828262001785565b50909150505b92915050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300805473ffffffffffffffffffffffffffffffffffffffff1981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6200163d6200189b565b6200150a8162001903565b80356000908152600660205260409020819062001666828262002f39565b505060095460009081526007602052604090208135908190556200168c60014362002f45565b40604051602001620016a092919062002911565b60408051601f198184030181529181528151602092830120600980546000908152600890945291832055805491620016d88362002946565b9190505550600554816040013511156200150a5760400135600555565b60006200170382516200190d565b826040516020016200171792919062002f5b565b604051602081830303815290604052805190602001209050919050565b60008060008351604103620017725760208401516040850151606086015160001a6200176388828585620019b5565b9550955095505050506200177e565b50508151600091506002905b9250925092565b60008260038111156200179c576200179c62002f9b565b03620017a6575050565b6001826003811115620017bd57620017bd62002f9b565b03620017f5576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028260038111156200180c576200180c62002f9b565b0362001848576040517ffce698f7000000000000000000000000000000000000000000000000000000008152620006ab90829060040162001b7d565b60038260038111156200185f576200185f62002f9b565b036200053957806040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600401620006ab919062001b7d565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff1662000d88576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620014b96200189b565b606060006200191c8362001a7e565b600101905060008167ffffffffffffffff8111156200193f576200193f62001b8d565b6040519080825280601f01601f1916602001820160405280156200196a576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508462001974575b509392505050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115620019f2575060009150600390508262001a74565b60006001888888886040516000815260200160405260405162001a19949392919062002fbb565b6020604051602081039080840390855afa15801562001a3c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811662001a6a5750600092506001915082905062001a74565b9250600091508190505b9450945094915050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831062001ac8577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef8100000000831062001af5576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831062001b1457662386f26fc10000830492506010015b6305f5e100831062001b2d576305f5e100830492506008015b612710831062001b4257612710830492506004015b6064831062001b55576064830492506002015b600a8310620015af5760010192915050565b611d768062002ff983390190565b805b82525050565b60208101620015af828462001b75565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff8211171562001bcc5762001bcc62001b8d565b6040525050565b600062001bdf60405190565b905062001bed828262001ba3565b919050565b600067ffffffffffffffff82111562001c0f5762001c0f62001b8d565b601f19601f83011660200192915050565b82818337506000910152565b600062001c4362001c3d8462001bf2565b62001bd3565b90508281526020810184848401111562001c605762001c60600080fd5b620019ad84828562001c20565b600082601f83011262001c835762001c83600080fd5b813562001c9584826020860162001c2c565b949350505050565b60006001600160a01b038216620015af565b62001cba8162001c9d565b81146200150a57600080fd5b8035620015af8162001caf565b6000806040838503121562001ceb5762001ceb600080fd5b823567ffffffffffffffff81111562001d075762001d07600080fd5b62001d158582860162001c6d565b925050602062001d288582860162001cc6565b9150509250929050565b8062001cba565b8035620015af8162001d32565b600067ffffffffffffffff82111562001d635762001d6362001b8d565b5060209081020190565b600062001d7e62001c3d8462001d46565b8381529050602080820190840283018581111562001d9f5762001d9f600080fd5b835b8181101562001de457803567ffffffffffffffff81111562001dc65762001dc6600080fd5b850162001dd4888262001c6d565b8452506020928301920162001da1565b5050509392505050565b600082601f83011262001e045762001e04600080fd5b813562001c9584826020860162001d6d565b60008083601f84011262001e2d5762001e2d600080fd5b50813567ffffffffffffffff81111562001e4a5762001e4a600080fd5b60208301915083600182028301111562001e675762001e67600080fd5b9250929050565b60008060008060008060008060e0898b03121562001e8f5762001e8f600080fd5b600062001e9d8b8b62001d39565b985050602062001eb08b828c0162001d39565b975050604062001ec38b828c0162001d39565b965050606089013567ffffffffffffffff81111562001ee55762001ee5600080fd5b62001ef38b828c0162001dee565b955050608089013567ffffffffffffffff81111562001f155762001f15600080fd5b62001f238b828c0162001e16565b945094505060a062001f388b828c0162001d39565b92505060c062001f4b8b828c0162001d39565b9150509295985092959890939650565b60006020828403121562001f725762001f72600080fd5b600062001c95848462001d39565b80151562001b77565b60208101620015af828462001f80565b60006020828403121562001fb05762001fb0600080fd5b813567ffffffffffffffff81111562001fcc5762001fcc600080fd5b62001c958482850162001c6d565b62001b778162001c9d565b60208101620015af828462001fda565b6000602082840312156200200c576200200c600080fd5b600062001c95848462001cc6565b600060808284031215620020315762002031600080fd5b50919050565b60008083601f8401126200204e576200204e600080fd5b50813567ffffffffffffffff8111156200206b576200206b600080fd5b60208301915083602082028301111562001e675762001e67600080fd5b60008060008060c08587031215620020a357620020a3600080fd5b6000620020b187876200201a565b945050608085013567ffffffffffffffff811115620020d357620020d3600080fd5b620020e18782880162002037565b935093505060a0620020f68782880162001d39565b91505092959194509250565b60005b838110156200211f57818101518382015260200162002105565b50506000910152565b600062002133825190565b8084526020840193506200214c81856020860162002102565b601f01601f19169290920192915050565b8051600090606084019062002173858262001b75565b50602083015184820360208601526200218d828262002128565b9150506040830151620019ad604086018262001b75565b60408101620021b4828562001b75565b818103602083015262001c9581846200215d565b600080600080600060608688031215620021e557620021e5600080fd5b6000620021f3888862001cc6565b955050602086013567ffffffffffffffff811115620022155762002215600080fd5b620022238882890162001e16565b9450945050604086013567ffffffffffffffff811115620022475762002247600080fd5b620022558882890162001e16565b92509250509295509295909350565b600062002272838362002128565b9392505050565b60200190565b60006200228a825190565b80845260208401935083602082028501620022a58560200190565b60005b84811015620022dd5783830388528151620022c4848262002264565b93505060208201602098909801979150600101620022a8565b50909695505050505050565b602080825281016200227281846200227f565b60408101620021b4828562001f80565b6020808252810162002272818462002128565b6000620015af6001600160a01b03831662002338565b90565b6001600160a01b031690565b6000620015af826200231f565b6000620015af8262002344565b62001b778162002351565b60208101620015af82846200235e565b600060608284031215620020315762002031600080fd5b600060208284031215620020315762002031600080fd5b60008060408385031215620023bf57620023bf600080fd5b823567ffffffffffffffff811115620023db57620023db600080fd5b620023e98582860162002379565b925050602083013567ffffffffffffffff8111156200240b576200240b600080fd5b62001d288582860162002390565b600060208284031215620024305762002430600080fd5b813567ffffffffffffffff8111156200244c576200244c600080fd5b62001c958482850162001dee565b80151562001cba565b8035620015af816200245a565b600080600080600060a086880312156200248d576200248d600080fd5b60006200249b888862001cc6565b9550506020620024ae8882890162001cc6565b945050604086013567ffffffffffffffff811115620024d057620024d0600080fd5b620024de8882890162001c6d565b935050606086013567ffffffffffffffff811115620025005762002500600080fd5b6200250e8882890162001c6d565b9250506080620025218882890162002463565b9150509295509295909350565b60008060208385031215620025465762002546600080fd5b823567ffffffffffffffff811115620025625762002562600080fd5b620025708582860162001e16565b92509250509250929050565b600062002587825190565b6200259781856020860162002102565b9290920192915050565b620015af81836200257c565b634e487b7160e01b600052602260045260246000fd5b600281046001821680620025d857607f821691505b602082108103620020315762002031620025ad565b6000620015af620023358381565b6200260683620025ed565b815460001960089490940293841b1916921b91909117905550565b600062002630818484620025fb565b505050565b8181101562000539576200264b60008262002621565b60010162002635565b601f82111562002630576000818152602090206020601f850104810160208510156200267d5750805b62000ff86020601f86010483018262002635565b815167ffffffffffffffff811115620026ae57620026ae62001b8d565b620026ba8254620025c3565b620026c782828562002654565b506020601f821160018114620026ff5760008315620026e65750848201515b600019600885021c198116600285021785555062000ff8565b600084815260208120601f198516915b828110156200273157878501518255602094850194600190920191016200270f565b50848210156200274f5783870151600019601f87166008021c191681555b50505050600202600101905550565b6040808252810162002771818562002128565b905062002272602083018462001fda565b600e8152602081017f496e76616c696420666f726b49440000000000000000000000000000000000008152905062002279565b60208082528101620015af8162002782565b6000620027d2825190565b80845260208401935083602082028501620027ed8560200190565b60005b84811015620022dd57838303885281516200280c848262002264565b93505060208201602098909801979150600101620027f0565b6080810162002835828762001b75565b62002844602083018662001b75565b62002853604083018562001b75565b8181036060830152620028678184620027c7565b9695505050505050565b60168152602081017f656e636c6176654944206e6f74206174746573746564000000000000000000008152905062002279565b60208082528101620015af8162002871565b634e487b7160e01b600052603260045260246000fd5b6000620015af825190565b6000620028e2825190565b60208301620028f181620028cc565b925050602081101562002031576000196020919091036008021b16919050565b6040810162002921828562001b75565b62002272602083018462001b75565b634e487b7160e01b600052601160045260246000fd5b6000600182016200295b576200295b62002930565b5060010190565b506000620015af602083018362001cc6565b506000620015af602083018362001d39565b67ffffffffffffffff811662001cba565b8035620015af8162002986565b506000620015af602083018362002997565b67ffffffffffffffff811662001b77565b620029d3818062002962565b620029df838262001fda565b50620029ef602082018262002962565b620029fe602084018262001fda565b5062002a0e604082018262002974565b62002a1d604084018262001b75565b5062002a2d6060820182620029a4565b620026306060840182620029b6565b82818337505050565b81835260208301925060007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111562002a825762002a82600080fd5b60208302925062002a9583858462002a3c565b50500190565b60c0810162002aab8287620029c7565b818103608083015262002ac081858762002a45565b905062002ad160a083018462001b75565b95945050505050565b60808101620015af8284620029c7565b60188152602081017f7769746864726177616c20616c7265616479207370656e7400000000000000008152905062002279565b60208082528101620015af8162002aea565b6040810162002921828562001fda565b60228152602081017f6e6574776f726b2073656372657420616c726561647920696e697469616c697a81527f6564000000000000000000000000000000000000000000000000000000000000602082015290505b60400190565b60208082528101620015af8162002b3f565b60198152602081017f656e636c6176654944206e6f7420612073657175656e636572000000000000008152905062002279565b60208082528101620015af8162002bab565b600067ffffffffffffffff8216620015af565b62001b778162002bf0565b60208101620015af828462002c03565b6000808335601e193685900301811262002c3b5762002c3b600080fd5b8301915050803567ffffffffffffffff81111562002c5c5762002c5c600080fd5b60208201915060018102360382131562001e675762001e67600080fd5b60238152602081017f726573706f6e64696e67206174746573746572206973206e6f7420617474657381527f74656400000000000000000000000000000000000000000000000000000000006020820152905062002b93565b60208082528101620015af8162002c79565b6000620015af8260601b90565b6000620015af8262002ce4565b62001b7762002d0d8262001c9d565b62002cf1565b62002d1f818562002cfe565b60140162002d2e818462002cfe565b60140162001c9581836200257c565b602c8152602081017f63616c63756c61746564206164647265737320616e642061747465737465724981527f4420646f6e74206d6174636800000000000000000000000000000000000000006020820152905062002b93565b60208082528101620015af8162002d3d565b60008135620015af8162001d32565b600081620015af565b62002dcb8262002db7565b62002dda620023358262002db7565b8255505050565b8267ffffffffffffffff81111562002dfd5762002dfd62001b8d565b62002e098254620025c3565b62002e1682828562002654565b506000601f82116001811462002e4e576000831562002e355750848201355b600019600885021c198116600285021785555062002eab565b600084815260209020601f19841690835b8281101562002e81578785013582556020948501946001909201910162002e5f565b508482101562002e9f57600019601f86166008021c19848801351681555b50506001600284020184555b505050505050565b6200263083838362002de1565b62002ecb82620025ed565b8062002dda565b80828062002ee08162002da8565b905062002eee818462002dc0565b505050600181016020830162002f05818562002c1e565b915062002f1482828562002eb3565b50505060028101604083018062002f2b8262002da8565b905062000ff8818462002ec0565b62000539828262002ed2565b81810381811115620015af57620015af62002930565b7f19457468657265756d205369676e6564204d6573736167653a0a0000000000008152601a0162002f8d81846200257c565b90506200227281836200257c565b634e487b7160e01b600052602160045260246000fd5b60ff811662001b77565b6080810162002fcb828762001b75565b62002fda602083018662002fb1565b62002fe9604083018562001b75565b62002ad1606083018462001b7556fe60806040523480156200001157600080fd5b50338062000040576000604051631e4fbdf760e01b8152600401620000379190620000c6565b60405180910390fd5b6200004b8162000052565b50620000d6565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006001600160a01b0382165b92915050565b620000c081620000a2565b82525050565b60208101620000af8284620000b5565b611c9080620000e66000396000f3fe6080604052600436106100e15760003560e01c80639730886d1161007f578063b201246f11610059578063b201246f146102d4578063b6aed0cb146102f4578063e138a8d214610314578063f2fde38b1461033457610155565b80639730886d1461026757806399a3ad2114610287578063b1454caa146102a757610155565b8063346633fb116100bb578063346633fb146101f957806336d2da901461020c578063715018a61461022c5780638da5cb5b1461024157610155565b80630fcfbd11146101765780630fe9188e146101ac57806333a88c72146101cc57610155565b36610155576040517f346633fb000000000000000000000000000000000000000000000000000000008152309063346633fb9034906101269033908390600401610bea565b6000604051808303818588803b15801561013f57600080fd5b505af1158015610153573d6000803e3d6000fd5b005b60405162461bcd60e51b815260040161016d90610c39565b60405180910390fd5b34801561018257600080fd5b50610196610191366004610c64565b610354565b6040516101a39190610c9f565b60405180910390f35b3480156101b857600080fd5b506101536101c7366004610cc5565b6103b4565b3480156101d857600080fd5b506101ec6101e7366004610c64565b6103fa565b6040516101a39190610cee565b610153610207366004610d10565b61044d565b34801561021857600080fd5b50610153610227366004610d4d565b6104d7565b34801561023857600080fd5b50610153610556565b34801561024d57600080fd5b506000546001600160a01b03166040516101a39190610d6e565b34801561027357600080fd5b50610153610282366004610d7c565b61056a565b34801561029357600080fd5b506101536102a2366004610d10565b610666565b3480156102b357600080fd5b506102c76102c2366004610e35565b6106e6565b6040516101a39190610ec9565b3480156102e057600080fd5b506101536102ef366004610f37565b61073f565b34801561030057600080fd5b5061015361030f366004610fa7565b610840565b34801561032057600080fd5b5061015361032f366004610fc9565b610886565b34801561034057600080fd5b5061015361034f366004610d4d565b6109c9565b6000808260405160200161036891906111e6565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806103ad5760405162461bcd60e51b815260040161016d90611235565b9392505050565b6103bc610a20565b60008181526004602052604081205490036103e95760405162461bcd60e51b815260040161016d90611277565b600090815260046020526040812055565b6000808260405160200161040e91906111e6565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906104455750428111155b949350505050565b60003411801561045c57508034145b6104785760405162461bcd60e51b815260040161016d906112df565b600061048333610a66565b9050826001600160a01b0316336001600160a01b03167f50c536ac33a920f00755865b831d17bf4cff0b2e0345f65b16d52bfc004068b634846040516104ca9291906112ef565b60405180910390a3505050565b6104df610a20565b6000816001600160a01b03164760405160006040518083038185875af1925050503d806000811461052c576040519150601f19603f3d011682016040523d82523d6000602084013e610531565b606091505b50509050806105525760405162461bcd60e51b815260040161016d9061133c565b5050565b61055e610a20565b6105686000610ac4565b565b610572610a20565b600061057e8242611362565b905060008360405160200161059391906111e6565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156105d85760405162461bcd60e51b815260040161016d906113cd565b60008181526001602090815260408220849055600291906105fb90870187610d4d565b6001600160a01b03168152602081019190915260400160009081209061062760808701606088016113dd565b63ffffffff1681526020808201929092526040016000908120805460018101825590825291902085916004020161065e8282611844565b505050505050565b61066e610a20565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146106bb576040519150601f19603f3d011682016040523d82523d6000602084013e6106c0565b606091505b50509050806106e15760405162461bcd60e51b815260040161016d9061133c565b505050565b60006106f133610a66565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef7759373382888888888860405161072e979695949392919061184e565b60405180910390a195945050505050565b600081815260046020526040812054900361076c5760405162461bcd60e51b815260040161016d90611909565b60008181526004602052604090205442101561079a5760405162461bcd60e51b815260040161016d90611955565b6000846040516020016107ad91906119da565b604051602081830303815290604052805190602001206040516020016107d39190611a1a565b60405160208183030381529060405280519060200120905061081d848484846040516020016108029190611a39565b60405160208183030381529060405280519060200120610b2c565b6108395760405162461bcd60e51b815260040161016d90611aa3565b5050505050565b610848610a20565b600082815260046020526040902054156108745760405162461bcd60e51b815260040161016d90611b0b565b60009182526004602052604090912055565b60008181526004602052604081205490036108b35760405162461bcd60e51b815260040161016d90611909565b6000818152600460205260409020544210156108e15760405162461bcd60e51b815260040161016d90611955565b60006108f06020860186610d4d565b6109006040870160208801611b1b565b61091060608801604089016113dd565b6109206080890160608a016113dd565b61092d60808a018a611556565b61093d60c08c0160a08d01611b3c565b604051602001610953979695949392919061184e565b60405160208183030381529060405280519060200120905060008160405160200161097e9190611b8f565b6040516020818303038152906040528051906020012090506109ad858585846040516020016108029190611a39565b61065e5760405162461bcd60e51b815260040161016d90611bf7565b6109d1610a20565b6001600160a01b038116610a145760006040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161016d9190610d6e565b610a1d81610ac4565b50565b6000546001600160a01b0316331461056857336040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161016d9190610d6e565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff169160019190610a998385611c07565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600082610b3a868685610b44565b1495945050505050565b600081815b84811015610b8757610b7382878784818110610b6757610b67611c2b565b90506020020135610b90565b915080610b7f81611c41565b915050610b49565b50949350505050565b6000818310610bac576000828152602084905260409020610bbb565b60008381526020839052604090205b90505b92915050565b60006001600160a01b038216610bbe565b610bde81610bc4565b82525050565b80610bde565b60408101610bf88285610bd5565b6103ad6020830184610be4565b600b8152602081017f756e737570706f72746564000000000000000000000000000000000000000000815290505b60200190565b60208082528101610bbe81610c05565b600060c08284031215610c5e57610c5e600080fd5b50919050565b600060208284031215610c7957610c79600080fd5b813567ffffffffffffffff811115610c9357610c93600080fd5b61044584828501610c49565b60208101610bbe8284610be4565b805b8114610a1d57600080fd5b8035610bbe81610cad565b600060208284031215610cda57610cda600080fd5b60006104458484610cba565b801515610bde565b60208101610bbe8284610ce6565b610caf81610bc4565b8035610bbe81610cfc565b60008060408385031215610d2657610d26600080fd5b6000610d328585610d05565b9250506020610d4385828601610cba565b9150509250929050565b600060208284031215610d6257610d62600080fd5b60006104458484610d05565b60208101610bbe8284610bd5565b60008060408385031215610d9257610d92600080fd5b823567ffffffffffffffff811115610dac57610dac600080fd5b610d3285828601610c49565b63ffffffff8116610caf565b8035610bbe81610db8565b60008083601f840112610de457610de4600080fd5b50813567ffffffffffffffff811115610dff57610dff600080fd5b602083019150836001820283011115610e1a57610e1a600080fd5b9250929050565b60ff8116610caf565b8035610bbe81610e21565b600080600080600060808688031215610e5057610e50600080fd5b6000610e5c8888610dc4565b9550506020610e6d88828901610dc4565b945050604086013567ffffffffffffffff811115610e8d57610e8d600080fd5b610e9988828901610dcf565b93509350506060610eac88828901610e2a565b9150509295509295909350565b67ffffffffffffffff8116610bde565b60208101610bbe8284610eb9565b600060808284031215610c5e57610c5e600080fd5b60008083601f840112610f0157610f01600080fd5b50813567ffffffffffffffff811115610f1c57610f1c600080fd5b602083019150836020820283011115610e1a57610e1a600080fd5b60008060008060c08587031215610f5057610f50600080fd5b6000610f5c8787610ed7565b945050608085013567ffffffffffffffff811115610f7c57610f7c600080fd5b610f8887828801610eec565b935093505060a0610f9b87828801610cba565b91505092959194509250565b60008060408385031215610fbd57610fbd600080fd5b6000610d328585610cba565b60008060008060608587031215610fe257610fe2600080fd5b843567ffffffffffffffff811115610ffc57610ffc600080fd5b61100887828801610c49565b945050602085013567ffffffffffffffff81111561102857611028600080fd5b61103487828801610eec565b93509350506040610f9b87828801610cba565b506000610bbe6020830183610d05565b67ffffffffffffffff8116610caf565b8035610bbe81611057565b506000610bbe6020830183611067565b506000610bbe6020830183610dc4565b63ffffffff8116610bde565b6000808335601e19368590030181126110b9576110b9600080fd5b830160208101925035905067ffffffffffffffff8111156110dc576110dc600080fd5b36819003821315610e1a57610e1a600080fd5b82818337506000910152565b81835260208301925061110f8284836110ef565b50601f01601f19160190565b506000610bbe6020830183610e2a565b60ff8116610bde565b600060c083016111448380611047565b61114e8582610bd5565b5061115c6020840184611072565b6111696020860182610eb9565b506111776040840184611082565b6111846040860182611092565b506111926060840184611082565b61119f6060860182611092565b506111ad608084018461109e565b85830360808701526111c08382846110fb565b925050506111d160a084018461111b565b6111de60a086018261112b565b509392505050565b60208082528101610bbb8184611134565b60218152602081017f54686973206d65737361676520776173206e65766572207375626d69747465648152601760f91b602082015290505b60400190565b60208082528101610bbe816111f7565b601a8152602081017f537461746520726f6f7420646f6573206e6f742065786973742e00000000000081529050610c33565b60208082528101610bbe81611245565b60308152602081017f417474656d7074696e6720746f2073656e642076616c756520776974686f757481527f2070726f766964696e67204574686572000000000000000000000000000000006020820152905061122f565b60208082528101610bbe81611287565b604081016112fd8285610be4565b6103ad6020830184610eb9565b60148152602081017f6661696c65642073656e64696e672076616c756500000000000000000000000081529050610c33565b60208082528101610bbe8161130a565b634e487b7160e01b600052601160045260246000fd5b80820180821115610bbe57610bbe61134c565b60218152602081017f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636581527f21000000000000000000000000000000000000000000000000000000000000006020820152905061122f565b60208082528101610bbe81611375565b6000602082840312156113f2576113f2600080fd5b60006104458484610dc4565b60008135610bbe81610cfc565b60006001600160a01b03835b81169019929092169190911792915050565b6000610bbe6001600160a01b038316611440565b90565b6001600160a01b031690565b6000610bbe82611429565b6000610bbe8261144c565b61146b82611457565b61147681835461140b565b8255505050565b60008135610bbe81611057565b60007bffffffffffffffff00000000000000000000000000000000000000006114178460a01b90565b600067ffffffffffffffff8216610bbe565b6114ce826114b3565b61147681835461148a565b60008135610bbe81610db8565b60007fffffffff000000000000000000000000000000000000000000000000000000006114178460e01b90565b600063ffffffff8216610bbe565b61152a82611513565b6114768183546114e6565b600063ffffffff83611417565b61154b82611513565b611476818354611535565b6000808335601e193685900301811261157157611571600080fd5b8301915050803567ffffffffffffffff81111561159057611590600080fd5b602082019150600181023603821315610e1a57610e1a600080fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052602260045260246000fd5b6002810460018216806115eb57607f821691505b602082108103610c5e57610c5e6115c1565b6000610bbe61143d8381565b611612836115fd565b815460001960089490940293841b1916921b91909117905550565b60006106e1818484611609565b818110156105525761164d60008261162d565b60010161163a565b601f8211156106e1576000818152602090206020601f8501048101602085101561167c5750805b6108396020601f86010483018261163a565b8267ffffffffffffffff8111156116a7576116a76115ab565b6116b182546115d7565b6116bc828285611655565b506000601f8211600181146116f157600083156116d95750848201355b600019600885021c198116600285021785555061065e565b600084815260209020601f19841690835b828110156117225787850135825560209485019460019092019101611702565b508482101561173f57600019601f86166008021c19848801351681555b5050505060020260010190555050565b6106e183838361168e565b60008135610bbe81610e21565b600060ff83611417565b600060ff8216610bbe565b61178582611771565b611476818354611767565b80828061179c816113fe565b90506117a88184611462565b505060208301806117b88261147d565b90506117c481846114c5565b505060408301806117d4826114d9565b90506117e08184611521565b5050506001810160608301806117f5826114d9565b90506118018184611542565b50505060028101608083016118168185611556565b915061182382828561174f565b5050506003810160a08301806118388261175a565b9050610839818461177c565b6105528282611790565b60c0810161185c828a610bd5565b6118696020830189610eb9565b6118766040830188611092565b6118836060830187611092565b81810360808301526118968185876110fb565b90506118a560a083018461112b565b98975050505050505050565b602a8152602081017f526f6f74206973206e6f74207075626c6973686564206f6e2074686973206d6581527f7373616765206275732e000000000000000000000000000000000000000000006020820152905061122f565b60208082528101610bbe816118b1565b60218152602081017f526f6f74206973206e6f7420636f6e736964657265642066696e616c207965748152601760f91b6020820152905061122f565b60208082528101610bbe81611919565b506000610bbe6020830183610cba565b61197f8180611047565b6119898382610bd5565b506119976020820182611047565b6119a46020840182610bd5565b506119b26040820182611965565b6119bf6040840182610be4565b506119cd6060820182611072565b6106e16060840182610eb9565b60808101610bbe8284611975565b60018152602081017f760000000000000000000000000000000000000000000000000000000000000081529050610c33565b60408082528101611a2a816119e8565b9050610bbe6020830184610be4565b611a438183610be4565b602001919050565b60338152602081017f496e76616c696420696e636c7573696f6e2070726f6f6620666f722076616c7581527f65207472616e73666572206d6573736167652e000000000000000000000000006020820152905061122f565b60208082528101610bbe81611a4b565b60258152602081017f526f6f7420616c726561647920616464656420746f20746865206d657373616781527f65206275730000000000000000000000000000000000000000000000000000006020820152905061122f565b60208082528101610bbe81611ab3565b600060208284031215611b3057611b30600080fd5b60006104458484611067565b600060208284031215611b5157611b51600080fd5b60006104458484610e2a565b60018152602081017f6d0000000000000000000000000000000000000000000000000000000000000081529050610c33565b60408082528101611a2a81611b5d565b60308152602081017f496e76616c696420696e636c7573696f6e2070726f6f6620666f722063726f7381527f7320636861696e206d6573736167652e000000000000000000000000000000006020820152905061122f565b60208082528101610bbe81611b9f565b67ffffffffffffffff918216919081169082820190811115610bbe57610bbe61134c565b634e487b7160e01b600052603260045260246000fd5b600060018201611c5357611c5361134c565b506001019056fea2646970667358221220c14e2710742599f7771122ca1f57bd3ae8ca32813cfd99de41e7782f2b9bc44a64736f6c63430008140033a26469706673582212209e8550c9691566b4539cf49821bdbd4b9b45bebd4a23bbb4bf77f10c91230a7064736f6c63430008140033 \ No newline at end of file diff --git a/contracts/exported/src/messaging/MerkleTreeMessageBus.sol/MerkleTreeMessageBus.bin b/contracts/exported/src/messaging/MerkleTreeMessageBus.sol/MerkleTreeMessageBus.bin index 711fdc836c..67bd5235dd 100644 --- a/contracts/exported/src/messaging/MerkleTreeMessageBus.sol/MerkleTreeMessageBus.bin +++ b/contracts/exported/src/messaging/MerkleTreeMessageBus.sol/MerkleTreeMessageBus.bin @@ -1 +1 @@ -60806040523480156200001157600080fd5b50338062000040576000604051631e4fbdf760e01b8152600401620000379190620000c6565b60405180910390fd5b6200004b8162000052565b50620000d6565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006001600160a01b0382165b92915050565b620000c081620000a2565b82525050565b60208101620000af8284620000b5565b611bea80620000e66000396000f3fe6080604052600436106100e15760003560e01c80639730886d1161007f578063b201246f11610059578063b201246f146102d4578063b6aed0cb146102f4578063e138a8d214610314578063f2fde38b1461033457610155565b80639730886d1461026757806399a3ad2114610287578063b1454caa146102a757610155565b8063346633fb116100bb578063346633fb146101f957806336d2da901461020c578063715018a61461022c5780638da5cb5b1461024157610155565b80630fcfbd11146101765780630fe9188e146101ac57806333a88c72146101cc57610155565b36610155576040517f346633fb000000000000000000000000000000000000000000000000000000008152309063346633fb9034906101269033908390600401610b86565b6000604051808303818588803b15801561013f57600080fd5b505af1158015610153573d6000803e3d6000fd5b005b60405162461bcd60e51b815260040161016d90610bd5565b60405180910390fd5b34801561018257600080fd5b50610196610191366004610c00565b610354565b6040516101a39190610c3b565b60405180910390f35b3480156101b857600080fd5b506101536101c7366004610c61565b6103b4565b3480156101d857600080fd5b506101ec6101e7366004610c00565b6103fa565b6040516101a39190610c8a565b610153610207366004610cac565b61044d565b34801561021857600080fd5b50610153610227366004610ce9565b6104d7565b34801561023857600080fd5b50610153610556565b34801561024d57600080fd5b506000546001600160a01b03166040516101a39190610d0a565b34801561027357600080fd5b50610153610282366004610d18565b61056a565b34801561029357600080fd5b506101536102a2366004610cac565b610666565b3480156102b357600080fd5b506102c76102c2366004610dd1565b6106e6565b6040516101a39190610e65565b3480156102e057600080fd5b506101536102ef366004610ed3565b61073f565b34801561030057600080fd5b5061015361030f366004610f43565b610840565b34801561032057600080fd5b5061015361032f366004610f65565b610886565b34801561034057600080fd5b5061015361034f366004610ce9565b610965565b600080826040516020016103689190611182565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806103ad5760405162461bcd60e51b815260040161016d906111d1565b9392505050565b6103bc6109bc565b60008181526004602052604081205490036103e95760405162461bcd60e51b815260040161016d90611213565b600090815260046020526040812055565b6000808260405160200161040e9190611182565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906104455750428111155b949350505050565b60003411801561045c57508034145b6104785760405162461bcd60e51b815260040161016d9061127b565b600061048333610a02565b9050826001600160a01b0316336001600160a01b03167f50c536ac33a920f00755865b831d17bf4cff0b2e0345f65b16d52bfc004068b634846040516104ca92919061128b565b60405180910390a3505050565b6104df6109bc565b6000816001600160a01b03164760405160006040518083038185875af1925050503d806000811461052c576040519150601f19603f3d011682016040523d82523d6000602084013e610531565b606091505b50509050806105525760405162461bcd60e51b815260040161016d906112d8565b5050565b61055e6109bc565b6105686000610a60565b565b6105726109bc565b600061057e82426112fe565b90506000836040516020016105939190611182565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156105d85760405162461bcd60e51b815260040161016d90611369565b60008181526001602090815260408220849055600291906105fb90870187610ce9565b6001600160a01b0316815260208101919091526040016000908120906106276080870160608801611379565b63ffffffff1681526020808201929092526040016000908120805460018101825590825291902085916004020161065e82826117e0565b505050505050565b61066e6109bc565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146106bb576040519150601f19603f3d011682016040523d82523d6000602084013e6106c0565b606091505b50509050806106e15760405162461bcd60e51b815260040161016d906112d8565b505050565b60006106f133610a02565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef7759373382888888888860405161072e97969594939291906117ea565b60405180910390a195945050505050565b600081815260046020526040812054900361076c5760405162461bcd60e51b815260040161016d906118a5565b60008181526004602052604090205442101561079a5760405162461bcd60e51b815260040161016d906118f1565b6000846040516020016107ad9190611976565b604051602081830303815290604052805190602001206040516020016107d391906119b6565b60405160208183030381529060405280519060200120905061081d8484848460405160200161080291906119d5565b60405160208183030381529060405280519060200120610ac8565b6108395760405162461bcd60e51b815260040161016d90611a3f565b5050505050565b6108486109bc565b600082815260046020526040902054156108745760405162461bcd60e51b815260040161016d90611aa7565b60009182526004602052604090912055565b60008181526004602052604081205490036108b35760405162461bcd60e51b815260040161016d906118a5565b6000818152600460205260409020544210156108e15760405162461bcd60e51b815260040161016d906118f1565b6000846040516020016108f49190611182565b6040516020818303038152906040528051906020012060405160200161091a9190611ae9565b6040516020818303038152906040528051906020012090506109498484848460405160200161080291906119d5565b6108395760405162461bcd60e51b815260040161016d90611b51565b61096d6109bc565b6001600160a01b0381166109b05760006040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161016d9190610d0a565b6109b981610a60565b50565b6000546001600160a01b0316331461056857336040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161016d9190610d0a565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff169160019190610a358385611b61565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600082610ad6868685610ae0565b1495945050505050565b600081815b84811015610b2357610b0f82878784818110610b0357610b03611b85565b90506020020135610b2c565b915080610b1b81611b9b565b915050610ae5565b50949350505050565b6000818310610b48576000828152602084905260409020610b57565b60008381526020839052604090205b90505b92915050565b60006001600160a01b038216610b5a565b610b7a81610b60565b82525050565b80610b7a565b60408101610b948285610b71565b6103ad6020830184610b80565b600b8152602081017f756e737570706f72746564000000000000000000000000000000000000000000815290505b60200190565b60208082528101610b5a81610ba1565b600060c08284031215610bfa57610bfa600080fd5b50919050565b600060208284031215610c1557610c15600080fd5b813567ffffffffffffffff811115610c2f57610c2f600080fd5b61044584828501610be5565b60208101610b5a8284610b80565b805b81146109b957600080fd5b8035610b5a81610c49565b600060208284031215610c7657610c76600080fd5b60006104458484610c56565b801515610b7a565b60208101610b5a8284610c82565b610c4b81610b60565b8035610b5a81610c98565b60008060408385031215610cc257610cc2600080fd5b6000610cce8585610ca1565b9250506020610cdf85828601610c56565b9150509250929050565b600060208284031215610cfe57610cfe600080fd5b60006104458484610ca1565b60208101610b5a8284610b71565b60008060408385031215610d2e57610d2e600080fd5b823567ffffffffffffffff811115610d4857610d48600080fd5b610cce85828601610be5565b63ffffffff8116610c4b565b8035610b5a81610d54565b60008083601f840112610d8057610d80600080fd5b50813567ffffffffffffffff811115610d9b57610d9b600080fd5b602083019150836001820283011115610db657610db6600080fd5b9250929050565b60ff8116610c4b565b8035610b5a81610dbd565b600080600080600060808688031215610dec57610dec600080fd5b6000610df88888610d60565b9550506020610e0988828901610d60565b945050604086013567ffffffffffffffff811115610e2957610e29600080fd5b610e3588828901610d6b565b93509350506060610e4888828901610dc6565b9150509295509295909350565b67ffffffffffffffff8116610b7a565b60208101610b5a8284610e55565b600060808284031215610bfa57610bfa600080fd5b60008083601f840112610e9d57610e9d600080fd5b50813567ffffffffffffffff811115610eb857610eb8600080fd5b602083019150836020820283011115610db657610db6600080fd5b60008060008060c08587031215610eec57610eec600080fd5b6000610ef88787610e73565b945050608085013567ffffffffffffffff811115610f1857610f18600080fd5b610f2487828801610e88565b935093505060a0610f3787828801610c56565b91505092959194509250565b60008060408385031215610f5957610f59600080fd5b6000610cce8585610c56565b60008060008060608587031215610f7e57610f7e600080fd5b843567ffffffffffffffff811115610f9857610f98600080fd5b610fa487828801610be5565b945050602085013567ffffffffffffffff811115610fc457610fc4600080fd5b610fd087828801610e88565b93509350506040610f3787828801610c56565b506000610b5a6020830183610ca1565b67ffffffffffffffff8116610c4b565b8035610b5a81610ff3565b506000610b5a6020830183611003565b506000610b5a6020830183610d60565b63ffffffff8116610b7a565b6000808335601e193685900301811261105557611055600080fd5b830160208101925035905067ffffffffffffffff81111561107857611078600080fd5b36819003821315610db657610db6600080fd5b82818337506000910152565b8183526020830192506110ab82848361108b565b50601f01601f19160190565b506000610b5a6020830183610dc6565b60ff8116610b7a565b600060c083016110e08380610fe3565b6110ea8582610b71565b506110f8602084018461100e565b6111056020860182610e55565b50611113604084018461101e565b611120604086018261102e565b5061112e606084018461101e565b61113b606086018261102e565b50611149608084018461103a565b858303608087015261115c838284611097565b9250505061116d60a08401846110b7565b61117a60a08601826110c7565b509392505050565b60208082528101610b5781846110d0565b60218152602081017f54686973206d65737361676520776173206e65766572207375626d69747465648152601760f91b602082015290505b60400190565b60208082528101610b5a81611193565b601a8152602081017f537461746520726f6f7420646f6573206e6f742065786973742e00000000000081529050610bcf565b60208082528101610b5a816111e1565b60308152602081017f417474656d7074696e6720746f2073656e642076616c756520776974686f757481527f2070726f766964696e6720457468657200000000000000000000000000000000602082015290506111cb565b60208082528101610b5a81611223565b604081016112998285610b80565b6103ad6020830184610e55565b60148152602081017f6661696c65642073656e64696e672076616c756500000000000000000000000081529050610bcf565b60208082528101610b5a816112a6565b634e487b7160e01b600052601160045260246000fd5b80820180821115610b5a57610b5a6112e8565b60218152602081017f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636581527f2100000000000000000000000000000000000000000000000000000000000000602082015290506111cb565b60208082528101610b5a81611311565b60006020828403121561138e5761138e600080fd5b60006104458484610d60565b60008135610b5a81610c98565b60006001600160a01b03835b81169019929092169190911792915050565b6000610b5a6001600160a01b0383166113dc565b90565b6001600160a01b031690565b6000610b5a826113c5565b6000610b5a826113e8565b611407826113f3565b6114128183546113a7565b8255505050565b60008135610b5a81610ff3565b60007bffffffffffffffff00000000000000000000000000000000000000006113b38460a01b90565b600067ffffffffffffffff8216610b5a565b61146a8261144f565b611412818354611426565b60008135610b5a81610d54565b60007fffffffff000000000000000000000000000000000000000000000000000000006113b38460e01b90565b600063ffffffff8216610b5a565b6114c6826114af565b611412818354611482565b600063ffffffff836113b3565b6114e7826114af565b6114128183546114d1565b6000808335601e193685900301811261150d5761150d600080fd5b8301915050803567ffffffffffffffff81111561152c5761152c600080fd5b602082019150600181023603821315610db657610db6600080fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052602260045260246000fd5b60028104600182168061158757607f821691505b602082108103610bfa57610bfa61155d565b6000610b5a6113d98381565b6115ae83611599565b815460001960089490940293841b1916921b91909117905550565b60006106e18184846115a5565b81811015610552576115e96000826115c9565b6001016115d6565b601f8211156106e1576000818152602090206020601f850104810160208510156116185750805b6108396020601f8601048301826115d6565b8267ffffffffffffffff81111561164357611643611547565b61164d8254611573565b6116588282856115f1565b506000601f82116001811461168d57600083156116755750848201355b600019600885021c198116600285021785555061065e565b600084815260209020601f19841690835b828110156116be578785013582556020948501946001909201910161169e565b50848210156116db57600019601f86166008021c19848801351681555b5050505060020260010190555050565b6106e183838361162a565b60008135610b5a81610dbd565b600060ff836113b3565b600060ff8216610b5a565b6117218261170d565b611412818354611703565b8082806117388161139a565b905061174481846113fe565b5050602083018061175482611419565b90506117608184611461565b5050604083018061177082611475565b905061177c81846114bd565b50505060018101606083018061179182611475565b905061179d81846114de565b50505060028101608083016117b281856114f2565b91506117bf8282856116eb565b5050506003810160a08301806117d4826116f6565b90506108398184611718565b610552828261172c565b60c081016117f8828a610b71565b6118056020830189610e55565b611812604083018861102e565b61181f606083018761102e565b8181036080830152611832818587611097565b905061184160a08301846110c7565b98975050505050505050565b602a8152602081017f526f6f74206973206e6f74207075626c6973686564206f6e2074686973206d6581527f7373616765206275732e00000000000000000000000000000000000000000000602082015290506111cb565b60208082528101610b5a8161184d565b60218152602081017f526f6f74206973206e6f7420636f6e736964657265642066696e616c207965748152601760f91b602082015290506111cb565b60208082528101610b5a816118b5565b506000610b5a6020830183610c56565b61191b8180610fe3565b6119258382610b71565b506119336020820182610fe3565b6119406020840182610b71565b5061194e6040820182611901565b61195b6040840182610b80565b50611969606082018261100e565b6106e16060840182610e55565b60808101610b5a8284611911565b60018152602081017f760000000000000000000000000000000000000000000000000000000000000081529050610bcf565b604080825281016119c681611984565b9050610b5a6020830184610b80565b6119df8183610b80565b602001919050565b60338152602081017f496e76616c696420696e636c7573696f6e2070726f6f6620666f722076616c7581527f65207472616e73666572206d6573736167652e00000000000000000000000000602082015290506111cb565b60208082528101610b5a816119e7565b60258152602081017f526f6f7420616c726561647920616464656420746f20746865206d657373616781527f6520627573000000000000000000000000000000000000000000000000000000602082015290506111cb565b60208082528101610b5a81611a4f565b60018152602081017f6d0000000000000000000000000000000000000000000000000000000000000081529050610bcf565b604080825281016119c681611ab7565b60308152602081017f496e76616c696420696e636c7573696f6e2070726f6f6620666f722063726f7381527f7320636861696e206d6573736167652e00000000000000000000000000000000602082015290506111cb565b60208082528101610b5a81611af9565b67ffffffffffffffff918216919081169082820190811115610b5a57610b5a6112e8565b634e487b7160e01b600052603260045260246000fd5b600060018201611bad57611bad6112e8565b506001019056fea2646970667358221220c8293ff525ddcfd01a52b0bf26c4071757f9277603389aebc8011c7267aa4e7064736f6c63430008140033 \ No newline at end of file +60806040523480156200001157600080fd5b50338062000040576000604051631e4fbdf760e01b8152600401620000379190620000c6565b60405180910390fd5b6200004b8162000052565b50620000d6565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006001600160a01b0382165b92915050565b620000c081620000a2565b82525050565b60208101620000af8284620000b5565b611c9080620000e66000396000f3fe6080604052600436106100e15760003560e01c80639730886d1161007f578063b201246f11610059578063b201246f146102d4578063b6aed0cb146102f4578063e138a8d214610314578063f2fde38b1461033457610155565b80639730886d1461026757806399a3ad2114610287578063b1454caa146102a757610155565b8063346633fb116100bb578063346633fb146101f957806336d2da901461020c578063715018a61461022c5780638da5cb5b1461024157610155565b80630fcfbd11146101765780630fe9188e146101ac57806333a88c72146101cc57610155565b36610155576040517f346633fb000000000000000000000000000000000000000000000000000000008152309063346633fb9034906101269033908390600401610bea565b6000604051808303818588803b15801561013f57600080fd5b505af1158015610153573d6000803e3d6000fd5b005b60405162461bcd60e51b815260040161016d90610c39565b60405180910390fd5b34801561018257600080fd5b50610196610191366004610c64565b610354565b6040516101a39190610c9f565b60405180910390f35b3480156101b857600080fd5b506101536101c7366004610cc5565b6103b4565b3480156101d857600080fd5b506101ec6101e7366004610c64565b6103fa565b6040516101a39190610cee565b610153610207366004610d10565b61044d565b34801561021857600080fd5b50610153610227366004610d4d565b6104d7565b34801561023857600080fd5b50610153610556565b34801561024d57600080fd5b506000546001600160a01b03166040516101a39190610d6e565b34801561027357600080fd5b50610153610282366004610d7c565b61056a565b34801561029357600080fd5b506101536102a2366004610d10565b610666565b3480156102b357600080fd5b506102c76102c2366004610e35565b6106e6565b6040516101a39190610ec9565b3480156102e057600080fd5b506101536102ef366004610f37565b61073f565b34801561030057600080fd5b5061015361030f366004610fa7565b610840565b34801561032057600080fd5b5061015361032f366004610fc9565b610886565b34801561034057600080fd5b5061015361034f366004610d4d565b6109c9565b6000808260405160200161036891906111e6565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806103ad5760405162461bcd60e51b815260040161016d90611235565b9392505050565b6103bc610a20565b60008181526004602052604081205490036103e95760405162461bcd60e51b815260040161016d90611277565b600090815260046020526040812055565b6000808260405160200161040e91906111e6565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906104455750428111155b949350505050565b60003411801561045c57508034145b6104785760405162461bcd60e51b815260040161016d906112df565b600061048333610a66565b9050826001600160a01b0316336001600160a01b03167f50c536ac33a920f00755865b831d17bf4cff0b2e0345f65b16d52bfc004068b634846040516104ca9291906112ef565b60405180910390a3505050565b6104df610a20565b6000816001600160a01b03164760405160006040518083038185875af1925050503d806000811461052c576040519150601f19603f3d011682016040523d82523d6000602084013e610531565b606091505b50509050806105525760405162461bcd60e51b815260040161016d9061133c565b5050565b61055e610a20565b6105686000610ac4565b565b610572610a20565b600061057e8242611362565b905060008360405160200161059391906111e6565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156105d85760405162461bcd60e51b815260040161016d906113cd565b60008181526001602090815260408220849055600291906105fb90870187610d4d565b6001600160a01b03168152602081019190915260400160009081209061062760808701606088016113dd565b63ffffffff1681526020808201929092526040016000908120805460018101825590825291902085916004020161065e8282611844565b505050505050565b61066e610a20565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146106bb576040519150601f19603f3d011682016040523d82523d6000602084013e6106c0565b606091505b50509050806106e15760405162461bcd60e51b815260040161016d9061133c565b505050565b60006106f133610a66565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef7759373382888888888860405161072e979695949392919061184e565b60405180910390a195945050505050565b600081815260046020526040812054900361076c5760405162461bcd60e51b815260040161016d90611909565b60008181526004602052604090205442101561079a5760405162461bcd60e51b815260040161016d90611955565b6000846040516020016107ad91906119da565b604051602081830303815290604052805190602001206040516020016107d39190611a1a565b60405160208183030381529060405280519060200120905061081d848484846040516020016108029190611a39565b60405160208183030381529060405280519060200120610b2c565b6108395760405162461bcd60e51b815260040161016d90611aa3565b5050505050565b610848610a20565b600082815260046020526040902054156108745760405162461bcd60e51b815260040161016d90611b0b565b60009182526004602052604090912055565b60008181526004602052604081205490036108b35760405162461bcd60e51b815260040161016d90611909565b6000818152600460205260409020544210156108e15760405162461bcd60e51b815260040161016d90611955565b60006108f06020860186610d4d565b6109006040870160208801611b1b565b61091060608801604089016113dd565b6109206080890160608a016113dd565b61092d60808a018a611556565b61093d60c08c0160a08d01611b3c565b604051602001610953979695949392919061184e565b60405160208183030381529060405280519060200120905060008160405160200161097e9190611b8f565b6040516020818303038152906040528051906020012090506109ad858585846040516020016108029190611a39565b61065e5760405162461bcd60e51b815260040161016d90611bf7565b6109d1610a20565b6001600160a01b038116610a145760006040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161016d9190610d6e565b610a1d81610ac4565b50565b6000546001600160a01b0316331461056857336040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161016d9190610d6e565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff169160019190610a998385611c07565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600082610b3a868685610b44565b1495945050505050565b600081815b84811015610b8757610b7382878784818110610b6757610b67611c2b565b90506020020135610b90565b915080610b7f81611c41565b915050610b49565b50949350505050565b6000818310610bac576000828152602084905260409020610bbb565b60008381526020839052604090205b90505b92915050565b60006001600160a01b038216610bbe565b610bde81610bc4565b82525050565b80610bde565b60408101610bf88285610bd5565b6103ad6020830184610be4565b600b8152602081017f756e737570706f72746564000000000000000000000000000000000000000000815290505b60200190565b60208082528101610bbe81610c05565b600060c08284031215610c5e57610c5e600080fd5b50919050565b600060208284031215610c7957610c79600080fd5b813567ffffffffffffffff811115610c9357610c93600080fd5b61044584828501610c49565b60208101610bbe8284610be4565b805b8114610a1d57600080fd5b8035610bbe81610cad565b600060208284031215610cda57610cda600080fd5b60006104458484610cba565b801515610bde565b60208101610bbe8284610ce6565b610caf81610bc4565b8035610bbe81610cfc565b60008060408385031215610d2657610d26600080fd5b6000610d328585610d05565b9250506020610d4385828601610cba565b9150509250929050565b600060208284031215610d6257610d62600080fd5b60006104458484610d05565b60208101610bbe8284610bd5565b60008060408385031215610d9257610d92600080fd5b823567ffffffffffffffff811115610dac57610dac600080fd5b610d3285828601610c49565b63ffffffff8116610caf565b8035610bbe81610db8565b60008083601f840112610de457610de4600080fd5b50813567ffffffffffffffff811115610dff57610dff600080fd5b602083019150836001820283011115610e1a57610e1a600080fd5b9250929050565b60ff8116610caf565b8035610bbe81610e21565b600080600080600060808688031215610e5057610e50600080fd5b6000610e5c8888610dc4565b9550506020610e6d88828901610dc4565b945050604086013567ffffffffffffffff811115610e8d57610e8d600080fd5b610e9988828901610dcf565b93509350506060610eac88828901610e2a565b9150509295509295909350565b67ffffffffffffffff8116610bde565b60208101610bbe8284610eb9565b600060808284031215610c5e57610c5e600080fd5b60008083601f840112610f0157610f01600080fd5b50813567ffffffffffffffff811115610f1c57610f1c600080fd5b602083019150836020820283011115610e1a57610e1a600080fd5b60008060008060c08587031215610f5057610f50600080fd5b6000610f5c8787610ed7565b945050608085013567ffffffffffffffff811115610f7c57610f7c600080fd5b610f8887828801610eec565b935093505060a0610f9b87828801610cba565b91505092959194509250565b60008060408385031215610fbd57610fbd600080fd5b6000610d328585610cba565b60008060008060608587031215610fe257610fe2600080fd5b843567ffffffffffffffff811115610ffc57610ffc600080fd5b61100887828801610c49565b945050602085013567ffffffffffffffff81111561102857611028600080fd5b61103487828801610eec565b93509350506040610f9b87828801610cba565b506000610bbe6020830183610d05565b67ffffffffffffffff8116610caf565b8035610bbe81611057565b506000610bbe6020830183611067565b506000610bbe6020830183610dc4565b63ffffffff8116610bde565b6000808335601e19368590030181126110b9576110b9600080fd5b830160208101925035905067ffffffffffffffff8111156110dc576110dc600080fd5b36819003821315610e1a57610e1a600080fd5b82818337506000910152565b81835260208301925061110f8284836110ef565b50601f01601f19160190565b506000610bbe6020830183610e2a565b60ff8116610bde565b600060c083016111448380611047565b61114e8582610bd5565b5061115c6020840184611072565b6111696020860182610eb9565b506111776040840184611082565b6111846040860182611092565b506111926060840184611082565b61119f6060860182611092565b506111ad608084018461109e565b85830360808701526111c08382846110fb565b925050506111d160a084018461111b565b6111de60a086018261112b565b509392505050565b60208082528101610bbb8184611134565b60218152602081017f54686973206d65737361676520776173206e65766572207375626d69747465648152601760f91b602082015290505b60400190565b60208082528101610bbe816111f7565b601a8152602081017f537461746520726f6f7420646f6573206e6f742065786973742e00000000000081529050610c33565b60208082528101610bbe81611245565b60308152602081017f417474656d7074696e6720746f2073656e642076616c756520776974686f757481527f2070726f766964696e67204574686572000000000000000000000000000000006020820152905061122f565b60208082528101610bbe81611287565b604081016112fd8285610be4565b6103ad6020830184610eb9565b60148152602081017f6661696c65642073656e64696e672076616c756500000000000000000000000081529050610c33565b60208082528101610bbe8161130a565b634e487b7160e01b600052601160045260246000fd5b80820180821115610bbe57610bbe61134c565b60218152602081017f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636581527f21000000000000000000000000000000000000000000000000000000000000006020820152905061122f565b60208082528101610bbe81611375565b6000602082840312156113f2576113f2600080fd5b60006104458484610dc4565b60008135610bbe81610cfc565b60006001600160a01b03835b81169019929092169190911792915050565b6000610bbe6001600160a01b038316611440565b90565b6001600160a01b031690565b6000610bbe82611429565b6000610bbe8261144c565b61146b82611457565b61147681835461140b565b8255505050565b60008135610bbe81611057565b60007bffffffffffffffff00000000000000000000000000000000000000006114178460a01b90565b600067ffffffffffffffff8216610bbe565b6114ce826114b3565b61147681835461148a565b60008135610bbe81610db8565b60007fffffffff000000000000000000000000000000000000000000000000000000006114178460e01b90565b600063ffffffff8216610bbe565b61152a82611513565b6114768183546114e6565b600063ffffffff83611417565b61154b82611513565b611476818354611535565b6000808335601e193685900301811261157157611571600080fd5b8301915050803567ffffffffffffffff81111561159057611590600080fd5b602082019150600181023603821315610e1a57610e1a600080fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052602260045260246000fd5b6002810460018216806115eb57607f821691505b602082108103610c5e57610c5e6115c1565b6000610bbe61143d8381565b611612836115fd565b815460001960089490940293841b1916921b91909117905550565b60006106e1818484611609565b818110156105525761164d60008261162d565b60010161163a565b601f8211156106e1576000818152602090206020601f8501048101602085101561167c5750805b6108396020601f86010483018261163a565b8267ffffffffffffffff8111156116a7576116a76115ab565b6116b182546115d7565b6116bc828285611655565b506000601f8211600181146116f157600083156116d95750848201355b600019600885021c198116600285021785555061065e565b600084815260209020601f19841690835b828110156117225787850135825560209485019460019092019101611702565b508482101561173f57600019601f86166008021c19848801351681555b5050505060020260010190555050565b6106e183838361168e565b60008135610bbe81610e21565b600060ff83611417565b600060ff8216610bbe565b61178582611771565b611476818354611767565b80828061179c816113fe565b90506117a88184611462565b505060208301806117b88261147d565b90506117c481846114c5565b505060408301806117d4826114d9565b90506117e08184611521565b5050506001810160608301806117f5826114d9565b90506118018184611542565b50505060028101608083016118168185611556565b915061182382828561174f565b5050506003810160a08301806118388261175a565b9050610839818461177c565b6105528282611790565b60c0810161185c828a610bd5565b6118696020830189610eb9565b6118766040830188611092565b6118836060830187611092565b81810360808301526118968185876110fb565b90506118a560a083018461112b565b98975050505050505050565b602a8152602081017f526f6f74206973206e6f74207075626c6973686564206f6e2074686973206d6581527f7373616765206275732e000000000000000000000000000000000000000000006020820152905061122f565b60208082528101610bbe816118b1565b60218152602081017f526f6f74206973206e6f7420636f6e736964657265642066696e616c207965748152601760f91b6020820152905061122f565b60208082528101610bbe81611919565b506000610bbe6020830183610cba565b61197f8180611047565b6119898382610bd5565b506119976020820182611047565b6119a46020840182610bd5565b506119b26040820182611965565b6119bf6040840182610be4565b506119cd6060820182611072565b6106e16060840182610eb9565b60808101610bbe8284611975565b60018152602081017f760000000000000000000000000000000000000000000000000000000000000081529050610c33565b60408082528101611a2a816119e8565b9050610bbe6020830184610be4565b611a438183610be4565b602001919050565b60338152602081017f496e76616c696420696e636c7573696f6e2070726f6f6620666f722076616c7581527f65207472616e73666572206d6573736167652e000000000000000000000000006020820152905061122f565b60208082528101610bbe81611a4b565b60258152602081017f526f6f7420616c726561647920616464656420746f20746865206d657373616781527f65206275730000000000000000000000000000000000000000000000000000006020820152905061122f565b60208082528101610bbe81611ab3565b600060208284031215611b3057611b30600080fd5b60006104458484611067565b600060208284031215611b5157611b51600080fd5b60006104458484610e2a565b60018152602081017f6d0000000000000000000000000000000000000000000000000000000000000081529050610c33565b60408082528101611a2a81611b5d565b60308152602081017f496e76616c696420696e636c7573696f6e2070726f6f6620666f722063726f7381527f7320636861696e206d6573736167652e000000000000000000000000000000006020820152905061122f565b60208082528101610bbe81611b9f565b67ffffffffffffffff918216919081169082820190811115610bbe57610bbe61134c565b634e487b7160e01b600052603260045260246000fd5b600060018201611c5357611c5361134c565b506001019056fea2646970667358221220c14e2710742599f7771122ca1f57bd3ae8ca32813cfd99de41e7782f2b9bc44a64736f6c63430008140033 \ No newline at end of file diff --git a/contracts/generated/ManagementContract/ManagementContract.go b/contracts/generated/ManagementContract/ManagementContract.go index 6668599744..017eaee461 100644 --- a/contracts/generated/ManagementContract/ManagementContract.go +++ b/contracts/generated/ManagementContract/ManagementContract.go @@ -62,7 +62,7 @@ type StructsValueTransferMessage struct { // ManagementContractMetaData contains all meta data concerning the ManagementContract contract. var ManagementContractMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"ImportantContractAddressUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"messageBusAddress\",\"type\":\"address\"}],\"name\":\"LogManagementContractCreated\",\"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\":false,\"internalType\":\"bytes32\",\"name\":\"rollupHash\",\"type\":\"bytes32\"}],\"name\":\"RollupAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"enclaveID\",\"type\":\"address\"}],\"name\":\"SequencerEnclaveGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"enclaveID\",\"type\":\"address\"}],\"name\":\"SequencerEnclaveRevoked\",\"type\":\"event\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"Signature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"r\",\"type\":\"tuple\"},{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage[]\",\"name\":\"messages\",\"type\":\"tuple[]\"}],\"internalType\":\"structStructs.HeaderCrossChainData\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"AddRollup\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"Attested\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"}],\"internalType\":\"structStructs.ValueTransferMessage\",\"name\":\"_msg\",\"type\":\"tuple\"},{\"internalType\":\"bytes32[]\",\"name\":\"proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"name\":\"ExtractNativeValue\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GetImportantContractKeys\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rollupHash\",\"type\":\"bytes32\"}],\"name\":\"GetRollupByHash\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"Signature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"name\":\"GetRollupByNumber\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"Signature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"name\":\"GetUniqueForkID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"Signature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"GrantSequencerEnclave\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_enclaveID\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_initSecret\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_genesisAttestation\",\"type\":\"string\"}],\"name\":\"InitializeNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"IsSequencerEnclave\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"IsWithdrawalAvailable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"requestReport\",\"type\":\"string\"}],\"name\":\"RequestNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attesterID\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"requesterID\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"attesterSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"responseSecret\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"verifyAttester\",\"type\":\"bool\"}],\"name\":\"RespondNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RetrieveAllBridgeFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"RevokeSequencerEnclave\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"SetImportantContractAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_lastBatchHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"crossChainHashes\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"rollupNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"forkID\",\"type\":\"bytes32\"}],\"name\":\"addCrossChainMessagesRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"importantContractAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"importantContractKeys\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"crossChainHashes\",\"type\":\"bytes[]\"}],\"name\":\"isBundleAvailable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"isBundleSaved\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"isWithdrawalSpent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastBatchHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastBatchSeqNo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"merkleMessageBus\",\"outputs\":[{\"internalType\":\"contractIMerkleTreeMessageBus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageBus\",\"outputs\":[{\"internalType\":\"contractIMessageBus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b5061001a3361001f565b610090565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b614cfe80620000a06000396000f3fe60806040523480156200001157600080fd5b5060043610620002005760003560e01c80638129fc1c1162000119578063a25eb31c11620000af578063db5d91b1116200007a578063db5d91b114620004f9578063e34fbfc81462000528578063e874eb20146200053d578063f2fde38b146200055157600080fd5b8063a25eb31c14620004a3578063a4ab2faa14620004ba578063a52f433c14620004d1578063d4fab88714620004e257600080fd5b806387059edb11620000f057806387059edb14620004125780638da5cb5b146200042957806398077e86146200045a578063a1a227fa146200048057600080fd5b80638129fc1c14620003bb5780638236a7ba14620003c55780638415482614620003ec57600080fd5b806347665738116200019b5780636a30d26c11620001665780636a30d26c14620003775780636b9707d61462000390578063715018a614620003a75780637281099614620003b157600080fd5b806347665738146200030b5780635371a2161462000322578063568699c8146200033957806368e10383146200036057600080fd5b80632f0cb9e311620001dc5780632f0cb9e314620002575780633e60a22f146200028c57806343348b2f14620002d2578063440c953b146200030157600080fd5b80620ddd27146200020557806303e72e481462000227578063073b6ef31462000240575b600080fd5b6200020f600e5481565b6040516200021e919062001b7d565b60405180910390f35b6200023e6200023836600462001cd3565b62000568565b005b6200023e6200025136600462001e6e565b6200067b565b6200027d6200026836600462001f5b565b600c6020526000908152604090205460ff1681565b6040516200021e919062001f89565b620002c36200029d36600462001f99565b80516020818301810180516003825292820191909301209152546001600160a01b031681565b6040516200021e919062001fe5565b6200027d620002e336600462001ff5565b6001600160a01b031660009081526020819052604090205460ff1690565b6200020f60055481565b6200023e6200031c36600462001ff5565b62000899565b6200023e6200033336600462002088565b62000940565b620003506200034a36600462001f5b565b62000af6565b6040516200021e929190620021a4565b6200023e62000371366004620021c8565b62000b4f565b6200038162000bf8565b6040516200021e9190620022e9565b6200023e620003a136600462001ff5565b62000cdb565b6200023e62000d72565b6200023e62000d8a565b6200023e62000e15565b620003dc620003d636600462001f5b565b62000fff565b6040516200021e929190620022fc565b6200027d620003fd36600462001f5b565b600d6020526000908152604090205460ff1681565b620003dc6200042336600462001f5b565b620010ef565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b0316620002c3565b620004716200046b36600462001f5b565b62001169565b6040516200021e91906200230c565b600a5462000494906001600160a01b031681565b6040516200021e919062002369565b6200023e620004b4366004620023a7565b6200121e565b6200027d620004cb36600462002419565b62001334565b600454610100900460ff166200027d565b6200023e620004f336600462002470565b620013c6565b6200027d6200050a36600462001ff5565b6001600160a01b031660009081526001602052604090205460ff1690565b6200023e620005393660046200252e565b5050565b600b5462000494906001600160a01b031681565b6200023e6200056236600462001ff5565b620014af565b620005726200150d565b60006001600160a01b03166003836040516200058f9190620025a1565b908152604051908190036020019020546001600160a01b031603620005ee57600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01620005ec838262002691565b505b80600383604051620006019190620025a1565b90815260405190819003602001812080546001600160a01b039390931673ffffffffffffffffffffffffffffffffffffffff19909316929092179091557f17b2f9f5748931099ffee882b5b64f4a560b5c55da9b4f4e396dae3bb9f98cb5906200066f90849084906200275e565b60405180910390a15050565b6000828152600860205260409020548114620006b45760405162461bcd60e51b8152600401620006ab90620027b5565b60405180910390fd5b60006200072689898989604051602001620006d3949392919062002825565b6040516020818303038152906040528051906020012086868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506200158592505050565b6001600160a01b03811660009081526020819052604090205490915060ff16620007645760405162461bcd60e51b8152600401620006ab90620028a4565b600e8990556000805b87518110156200087457600b5488516001600160a01b039091169063b6aed0cb908a9084908110620007a357620007a3620028b6565b6020026020010151620007b690620028d7565b426040518363ffffffff1660e01b8152600401620007d692919062002911565b600060405180830381600087803b158015620007f157600080fd5b505af115801562000806573d6000803e3d6000fd5b5050505081888281518110620008205762000820620028b6565b60200260200101516200083390620028d7565b6040516020016200084692919062002911565b60405160208183030381529060405280519060200120915080806200086b9062002946565b9150506200076d565b506000908152600d60205260409020805460ff19166001179055505050505050505050565b620008a36200150d565b6001600160a01b03811660009081526020819052604090205460ff16620008de5760405162461bcd60e51b8152600401620006ab90620028a4565b6001600160a01b038116600090815260016020819052604091829020805460ff19169091179055517ffe64c7181f0fc60e300dc02cca368cdfa94d7ca45902de3b9a9d80070e760936906200093590839062001fe5565b60405180910390a150565b600b546040517fb201246f0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063b201246f906200099190879087908790879060040162002a9b565b60006040518083038186803b158015620009aa57600080fd5b505afa158015620009bf573d6000803e3d6000fd5b50505050600084604051602001620009d8919062002ada565b60408051601f1981840301815291815281516020928301206000818152600c90935291205490915060ff161562000a235760405162461bcd60e51b8152600401620006ab9062002b1d565b6001600c60008760405160200162000a3c919062002ada565b60408051808303601f190181529181528151602092830120835282820193909352908201600020805460ff191693151593909317909255600a546001600160a01b0316916399a3ad219162000a979190890190890162001ff5565b87604001356040518363ffffffff1660e01b815260040162000abb92919062002b2f565b600060405180830381600087803b15801562000ad657600080fd5b505af115801562000aeb573d6000803e3d6000fd5b505050505050505050565b60408051606080820183526000808352602083019190915291810182905260008062000b2285620010ef565b915091508162000b385760009590945092505050565b600094855260086020526040909420549492505050565b60045460ff161562000b755760405162461bcd60e51b8152600401620006ab9062002b99565b60048054600160ff1991821681179092556001600160a01b0387166000908152602081815260408083208054851686179055908490529081902080549092169092179055517ffe64c7181f0fc60e300dc02cca368cdfa94d7ca45902de3b9a9d80070e7609369062000be990879062001fe5565b60405180910390a15050505050565b60606002805480602002602001604051908101604052809291908181526020016000905b8282101562000cd257838290600052602060002001805462000c3e90620025c3565b80601f016020809104026020016040519081016040528092919081815260200182805462000c6c90620025c3565b801562000cbd5780601f1062000c915761010080835404028352916020019162000cbd565b820191906000526020600020905b81548152906001019060200180831162000c9f57829003601f168201915b50505050508152602001906001019062000c1c565b50505050905090565b62000ce56200150d565b6001600160a01b03811660009081526001602052604090205460ff1662000d205760405162461bcd60e51b8152600401620006ab9062002bde565b6001600160a01b03811660009081526001602052604090819020805460ff19169055517f0f279980343c7ca542fde9fa5396555068efb5cd560d9cf9c191aa2911079b47906200093590839062001fe5565b62000d7c6200150d565b62000d886000620015b5565b565b62000d946200150d565b600a546040517f36d2da900000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906336d2da909062000ddf90339060040162001fe5565b600060405180830381600087803b15801562000dfa57600080fd5b505af115801562000e0f573d6000803e3d6000fd5b50505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff1660008115801562000e615750825b905060008267ffffffffffffffff16600114801562000e7f5750303b155b90508115801562000e8e575080155b1562000ec6576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831562000efb57845468ff00000000000000001916680100000000000000001785555b62000f063362001633565b6000600555600160095560405162000f1e9062001b67565b604051809103906000f08015801562000f3b573d6000803e3d6000fd5b50600b80546001600160a01b039290921673ffffffffffffffffffffffffffffffffffffffff199283168117909155600a805490921681179091556040517fbd726cf82ac9c3260b1495107182e336e0654b25c10915648c0cc15b2bb72cbf9162000fa69162001fe5565b60405180910390a1831562000ff857845468ff0000000000000000191685556040517fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29062000be99060019062002c0e565b5050505050565b6040805160608082018352600080835260208084018390528385018290528582526006815284822085519384019095528454835260018501805492958694939092840191906200104f90620025c3565b80601f01602080910402602001604051908101604052809291908181526020018280546200107d90620025c3565b8015620010ce5780601f10620010a257610100808354040283529160200191620010ce565b820191906000526020600020905b815481529060010190602001808311620010b057829003601f168201915b50505091835250506002919091015460209091015280519094149492505050565b604080516060808201835260008083526020830191909152918101829052600083815260076020526040812054908190036200115457505060408051606081018252600080825282516020818101855282825283015291810182905290939092509050565b6200115f8162000fff565b9250925050915091565b600281815481106200117a57600080fd5b9060005260206000200160009150905080546200119790620025c3565b80601f0160208091040260200160405190810160405280929190818152602001828054620011c590620025c3565b8015620012165780601f10620011ea5761010080835404028352916020019162001216565b820191906000526020600020905b815481529060010190602001808311620011f857829003601f168201915b505050505081565b600062001270833562001235602086018662002c1e565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506200158592505050565b6001600160a01b03811660009081526020819052604090205490915060ff16620012ae5760405162461bcd60e51b8152600401620006ab90620028a4565b6001600160a01b03811660009081526001602052604090205460ff16620012e95760405162461bcd60e51b8152600401620006ab9062002bde565b620012f48362001648565b6040517fd6555bff8670bd3008dc064c30bb56d6ac7cb14ae801e36146fe4e7c6a504a5890620013279085359062001b7d565b60405180910390a1505050565b600080805b8351811015620013ad5781848281518110620013595762001359620028b6565b60200260200101516200136c90620028d7565b6040516020016200137f92919062002911565b6040516020818303038152906040528051906020012091508080620013a49062002946565b91505062001339565b506000908152600d602052604090205460ff1692915050565b6001600160a01b03851660009081526020819052604090205460ff1680620014025760405162461bcd60e51b8152600401620006ab9062002cd2565b8115620014845760006200143b878786604051602001620014269392919062002d13565b604051602081830303815290604052620016f5565b905060006200144b828762001585565b9050876001600160a01b0316816001600160a01b031614620014815760405162461bcd60e51b8152600401620006ab9062002d96565b50505b5050506001600160a01b039091166000908152602081905260409020805460ff191660011790555050565b620014b96200150d565b6001600160a01b038116620014ff5760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401620006ab919062001fe5565b6200150a81620015b5565b50565b33620015407f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161462000d8857336040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401620006ab919062001fe5565b60008060008062001597868662001734565b925092509250620015a9828262001785565b50909150505b92915050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300805473ffffffffffffffffffffffffffffffffffffffff1981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6200163d6200189b565b6200150a8162001903565b80356000908152600660205260409020819062001666828262002f39565b505060095460009081526007602052604090208135908190556200168c60014362002f45565b40604051602001620016a092919062002911565b60408051601f198184030181529181528151602092830120600980546000908152600890945291832055805491620016d88362002946565b9190505550600554816040013511156200150a5760400135600555565b60006200170382516200190d565b826040516020016200171792919062002f5b565b604051602081830303815290604052805190602001209050919050565b60008060008351604103620017725760208401516040850151606086015160001a6200176388828585620019b5565b9550955095505050506200177e565b50508151600091506002905b9250925092565b60008260038111156200179c576200179c62002f9b565b03620017a6575050565b6001826003811115620017bd57620017bd62002f9b565b03620017f5576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028260038111156200180c576200180c62002f9b565b0362001848576040517ffce698f7000000000000000000000000000000000000000000000000000000008152620006ab90829060040162001b7d565b60038260038111156200185f576200185f62002f9b565b036200053957806040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600401620006ab919062001b7d565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff1662000d88576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620014b96200189b565b606060006200191c8362001a7e565b600101905060008167ffffffffffffffff8111156200193f576200193f62001b8d565b6040519080825280601f01601f1916602001820160405280156200196a576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508462001974575b509392505050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115620019f2575060009150600390508262001a74565b60006001888888886040516000815260200160405260405162001a19949392919062002fbb565b6020604051602081039080840390855afa15801562001a3c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811662001a6a5750600092506001915082905062001a74565b9250600091508190505b9450945094915050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831062001ac8577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef8100000000831062001af5576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831062001b1457662386f26fc10000830492506010015b6305f5e100831062001b2d576305f5e100830492506008015b612710831062001b4257612710830492506004015b6064831062001b55576064830492506002015b600a8310620015af5760010192915050565b611cd08062002ff983390190565b805b82525050565b60208101620015af828462001b75565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff8211171562001bcc5762001bcc62001b8d565b6040525050565b600062001bdf60405190565b905062001bed828262001ba3565b919050565b600067ffffffffffffffff82111562001c0f5762001c0f62001b8d565b601f19601f83011660200192915050565b82818337506000910152565b600062001c4362001c3d8462001bf2565b62001bd3565b90508281526020810184848401111562001c605762001c60600080fd5b620019ad84828562001c20565b600082601f83011262001c835762001c83600080fd5b813562001c9584826020860162001c2c565b949350505050565b60006001600160a01b038216620015af565b62001cba8162001c9d565b81146200150a57600080fd5b8035620015af8162001caf565b6000806040838503121562001ceb5762001ceb600080fd5b823567ffffffffffffffff81111562001d075762001d07600080fd5b62001d158582860162001c6d565b925050602062001d288582860162001cc6565b9150509250929050565b8062001cba565b8035620015af8162001d32565b600067ffffffffffffffff82111562001d635762001d6362001b8d565b5060209081020190565b600062001d7e62001c3d8462001d46565b8381529050602080820190840283018581111562001d9f5762001d9f600080fd5b835b8181101562001de457803567ffffffffffffffff81111562001dc65762001dc6600080fd5b850162001dd4888262001c6d565b8452506020928301920162001da1565b5050509392505050565b600082601f83011262001e045762001e04600080fd5b813562001c9584826020860162001d6d565b60008083601f84011262001e2d5762001e2d600080fd5b50813567ffffffffffffffff81111562001e4a5762001e4a600080fd5b60208301915083600182028301111562001e675762001e67600080fd5b9250929050565b60008060008060008060008060e0898b03121562001e8f5762001e8f600080fd5b600062001e9d8b8b62001d39565b985050602062001eb08b828c0162001d39565b975050604062001ec38b828c0162001d39565b965050606089013567ffffffffffffffff81111562001ee55762001ee5600080fd5b62001ef38b828c0162001dee565b955050608089013567ffffffffffffffff81111562001f155762001f15600080fd5b62001f238b828c0162001e16565b945094505060a062001f388b828c0162001d39565b92505060c062001f4b8b828c0162001d39565b9150509295985092959890939650565b60006020828403121562001f725762001f72600080fd5b600062001c95848462001d39565b80151562001b77565b60208101620015af828462001f80565b60006020828403121562001fb05762001fb0600080fd5b813567ffffffffffffffff81111562001fcc5762001fcc600080fd5b62001c958482850162001c6d565b62001b778162001c9d565b60208101620015af828462001fda565b6000602082840312156200200c576200200c600080fd5b600062001c95848462001cc6565b600060808284031215620020315762002031600080fd5b50919050565b60008083601f8401126200204e576200204e600080fd5b50813567ffffffffffffffff8111156200206b576200206b600080fd5b60208301915083602082028301111562001e675762001e67600080fd5b60008060008060c08587031215620020a357620020a3600080fd5b6000620020b187876200201a565b945050608085013567ffffffffffffffff811115620020d357620020d3600080fd5b620020e18782880162002037565b935093505060a0620020f68782880162001d39565b91505092959194509250565b60005b838110156200211f57818101518382015260200162002105565b50506000910152565b600062002133825190565b8084526020840193506200214c81856020860162002102565b601f01601f19169290920192915050565b8051600090606084019062002173858262001b75565b50602083015184820360208601526200218d828262002128565b9150506040830151620019ad604086018262001b75565b60408101620021b4828562001b75565b818103602083015262001c9581846200215d565b600080600080600060608688031215620021e557620021e5600080fd5b6000620021f3888862001cc6565b955050602086013567ffffffffffffffff811115620022155762002215600080fd5b620022238882890162001e16565b9450945050604086013567ffffffffffffffff811115620022475762002247600080fd5b620022558882890162001e16565b92509250509295509295909350565b600062002272838362002128565b9392505050565b60200190565b60006200228a825190565b80845260208401935083602082028501620022a58560200190565b60005b84811015620022dd5783830388528151620022c4848262002264565b93505060208201602098909801979150600101620022a8565b50909695505050505050565b602080825281016200227281846200227f565b60408101620021b4828562001f80565b6020808252810162002272818462002128565b6000620015af6001600160a01b03831662002338565b90565b6001600160a01b031690565b6000620015af826200231f565b6000620015af8262002344565b62001b778162002351565b60208101620015af82846200235e565b600060608284031215620020315762002031600080fd5b600060208284031215620020315762002031600080fd5b60008060408385031215620023bf57620023bf600080fd5b823567ffffffffffffffff811115620023db57620023db600080fd5b620023e98582860162002379565b925050602083013567ffffffffffffffff8111156200240b576200240b600080fd5b62001d288582860162002390565b600060208284031215620024305762002430600080fd5b813567ffffffffffffffff8111156200244c576200244c600080fd5b62001c958482850162001dee565b80151562001cba565b8035620015af816200245a565b600080600080600060a086880312156200248d576200248d600080fd5b60006200249b888862001cc6565b9550506020620024ae8882890162001cc6565b945050604086013567ffffffffffffffff811115620024d057620024d0600080fd5b620024de8882890162001c6d565b935050606086013567ffffffffffffffff811115620025005762002500600080fd5b6200250e8882890162001c6d565b9250506080620025218882890162002463565b9150509295509295909350565b60008060208385031215620025465762002546600080fd5b823567ffffffffffffffff811115620025625762002562600080fd5b620025708582860162001e16565b92509250509250929050565b600062002587825190565b6200259781856020860162002102565b9290920192915050565b620015af81836200257c565b634e487b7160e01b600052602260045260246000fd5b600281046001821680620025d857607f821691505b602082108103620020315762002031620025ad565b6000620015af620023358381565b6200260683620025ed565b815460001960089490940293841b1916921b91909117905550565b600062002630818484620025fb565b505050565b8181101562000539576200264b60008262002621565b60010162002635565b601f82111562002630576000818152602090206020601f850104810160208510156200267d5750805b62000ff86020601f86010483018262002635565b815167ffffffffffffffff811115620026ae57620026ae62001b8d565b620026ba8254620025c3565b620026c782828562002654565b506020601f821160018114620026ff5760008315620026e65750848201515b600019600885021c198116600285021785555062000ff8565b600084815260208120601f198516915b828110156200273157878501518255602094850194600190920191016200270f565b50848210156200274f5783870151600019601f87166008021c191681555b50505050600202600101905550565b6040808252810162002771818562002128565b905062002272602083018462001fda565b600e8152602081017f496e76616c696420666f726b49440000000000000000000000000000000000008152905062002279565b60208082528101620015af8162002782565b6000620027d2825190565b80845260208401935083602082028501620027ed8560200190565b60005b84811015620022dd57838303885281516200280c848262002264565b93505060208201602098909801979150600101620027f0565b6080810162002835828762001b75565b62002844602083018662001b75565b62002853604083018562001b75565b8181036060830152620028678184620027c7565b9695505050505050565b60168152602081017f656e636c6176654944206e6f74206174746573746564000000000000000000008152905062002279565b60208082528101620015af8162002871565b634e487b7160e01b600052603260045260246000fd5b6000620015af825190565b6000620028e2825190565b60208301620028f181620028cc565b925050602081101562002031576000196020919091036008021b16919050565b6040810162002921828562001b75565b62002272602083018462001b75565b634e487b7160e01b600052601160045260246000fd5b6000600182016200295b576200295b62002930565b5060010190565b506000620015af602083018362001cc6565b506000620015af602083018362001d39565b67ffffffffffffffff811662001cba565b8035620015af8162002986565b506000620015af602083018362002997565b67ffffffffffffffff811662001b77565b620029d3818062002962565b620029df838262001fda565b50620029ef602082018262002962565b620029fe602084018262001fda565b5062002a0e604082018262002974565b62002a1d604084018262001b75565b5062002a2d6060820182620029a4565b620026306060840182620029b6565b82818337505050565b81835260208301925060007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111562002a825762002a82600080fd5b60208302925062002a9583858462002a3c565b50500190565b60c0810162002aab8287620029c7565b818103608083015262002ac081858762002a45565b905062002ad160a083018462001b75565b95945050505050565b60808101620015af8284620029c7565b60188152602081017f7769746864726177616c20616c7265616479207370656e7400000000000000008152905062002279565b60208082528101620015af8162002aea565b6040810162002921828562001fda565b60228152602081017f6e6574776f726b2073656372657420616c726561647920696e697469616c697a81527f6564000000000000000000000000000000000000000000000000000000000000602082015290505b60400190565b60208082528101620015af8162002b3f565b60198152602081017f656e636c6176654944206e6f7420612073657175656e636572000000000000008152905062002279565b60208082528101620015af8162002bab565b600067ffffffffffffffff8216620015af565b62001b778162002bf0565b60208101620015af828462002c03565b6000808335601e193685900301811262002c3b5762002c3b600080fd5b8301915050803567ffffffffffffffff81111562002c5c5762002c5c600080fd5b60208201915060018102360382131562001e675762001e67600080fd5b60238152602081017f726573706f6e64696e67206174746573746572206973206e6f7420617474657381527f74656400000000000000000000000000000000000000000000000000000000006020820152905062002b93565b60208082528101620015af8162002c79565b6000620015af8260601b90565b6000620015af8262002ce4565b62001b7762002d0d8262001c9d565b62002cf1565b62002d1f818562002cfe565b60140162002d2e818462002cfe565b60140162001c9581836200257c565b602c8152602081017f63616c63756c61746564206164647265737320616e642061747465737465724981527f4420646f6e74206d6174636800000000000000000000000000000000000000006020820152905062002b93565b60208082528101620015af8162002d3d565b60008135620015af8162001d32565b600081620015af565b62002dcb8262002db7565b62002dda620023358262002db7565b8255505050565b8267ffffffffffffffff81111562002dfd5762002dfd62001b8d565b62002e098254620025c3565b62002e1682828562002654565b506000601f82116001811462002e4e576000831562002e355750848201355b600019600885021c198116600285021785555062002eab565b600084815260209020601f19841690835b8281101562002e81578785013582556020948501946001909201910162002e5f565b508482101562002e9f57600019601f86166008021c19848801351681555b50506001600284020184555b505050505050565b6200263083838362002de1565b62002ecb82620025ed565b8062002dda565b80828062002ee08162002da8565b905062002eee818462002dc0565b505050600181016020830162002f05818562002c1e565b915062002f1482828562002eb3565b50505060028101604083018062002f2b8262002da8565b905062000ff8818462002ec0565b62000539828262002ed2565b81810381811115620015af57620015af62002930565b7f19457468657265756d205369676e6564204d6573736167653a0a0000000000008152601a0162002f8d81846200257c565b90506200227281836200257c565b634e487b7160e01b600052602160045260246000fd5b60ff811662001b77565b6080810162002fcb828762001b75565b62002fda602083018662002fb1565b62002fe9604083018562001b75565b62002ad1606083018462001b7556fe60806040523480156200001157600080fd5b50338062000040576000604051631e4fbdf760e01b8152600401620000379190620000c6565b60405180910390fd5b6200004b8162000052565b50620000d6565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006001600160a01b0382165b92915050565b620000c081620000a2565b82525050565b60208101620000af8284620000b5565b611bea80620000e66000396000f3fe6080604052600436106100e15760003560e01c80639730886d1161007f578063b201246f11610059578063b201246f146102d4578063b6aed0cb146102f4578063e138a8d214610314578063f2fde38b1461033457610155565b80639730886d1461026757806399a3ad2114610287578063b1454caa146102a757610155565b8063346633fb116100bb578063346633fb146101f957806336d2da901461020c578063715018a61461022c5780638da5cb5b1461024157610155565b80630fcfbd11146101765780630fe9188e146101ac57806333a88c72146101cc57610155565b36610155576040517f346633fb000000000000000000000000000000000000000000000000000000008152309063346633fb9034906101269033908390600401610b86565b6000604051808303818588803b15801561013f57600080fd5b505af1158015610153573d6000803e3d6000fd5b005b60405162461bcd60e51b815260040161016d90610bd5565b60405180910390fd5b34801561018257600080fd5b50610196610191366004610c00565b610354565b6040516101a39190610c3b565b60405180910390f35b3480156101b857600080fd5b506101536101c7366004610c61565b6103b4565b3480156101d857600080fd5b506101ec6101e7366004610c00565b6103fa565b6040516101a39190610c8a565b610153610207366004610cac565b61044d565b34801561021857600080fd5b50610153610227366004610ce9565b6104d7565b34801561023857600080fd5b50610153610556565b34801561024d57600080fd5b506000546001600160a01b03166040516101a39190610d0a565b34801561027357600080fd5b50610153610282366004610d18565b61056a565b34801561029357600080fd5b506101536102a2366004610cac565b610666565b3480156102b357600080fd5b506102c76102c2366004610dd1565b6106e6565b6040516101a39190610e65565b3480156102e057600080fd5b506101536102ef366004610ed3565b61073f565b34801561030057600080fd5b5061015361030f366004610f43565b610840565b34801561032057600080fd5b5061015361032f366004610f65565b610886565b34801561034057600080fd5b5061015361034f366004610ce9565b610965565b600080826040516020016103689190611182565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806103ad5760405162461bcd60e51b815260040161016d906111d1565b9392505050565b6103bc6109bc565b60008181526004602052604081205490036103e95760405162461bcd60e51b815260040161016d90611213565b600090815260046020526040812055565b6000808260405160200161040e9190611182565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906104455750428111155b949350505050565b60003411801561045c57508034145b6104785760405162461bcd60e51b815260040161016d9061127b565b600061048333610a02565b9050826001600160a01b0316336001600160a01b03167f50c536ac33a920f00755865b831d17bf4cff0b2e0345f65b16d52bfc004068b634846040516104ca92919061128b565b60405180910390a3505050565b6104df6109bc565b6000816001600160a01b03164760405160006040518083038185875af1925050503d806000811461052c576040519150601f19603f3d011682016040523d82523d6000602084013e610531565b606091505b50509050806105525760405162461bcd60e51b815260040161016d906112d8565b5050565b61055e6109bc565b6105686000610a60565b565b6105726109bc565b600061057e82426112fe565b90506000836040516020016105939190611182565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156105d85760405162461bcd60e51b815260040161016d90611369565b60008181526001602090815260408220849055600291906105fb90870187610ce9565b6001600160a01b0316815260208101919091526040016000908120906106276080870160608801611379565b63ffffffff1681526020808201929092526040016000908120805460018101825590825291902085916004020161065e82826117e0565b505050505050565b61066e6109bc565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146106bb576040519150601f19603f3d011682016040523d82523d6000602084013e6106c0565b606091505b50509050806106e15760405162461bcd60e51b815260040161016d906112d8565b505050565b60006106f133610a02565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef7759373382888888888860405161072e97969594939291906117ea565b60405180910390a195945050505050565b600081815260046020526040812054900361076c5760405162461bcd60e51b815260040161016d906118a5565b60008181526004602052604090205442101561079a5760405162461bcd60e51b815260040161016d906118f1565b6000846040516020016107ad9190611976565b604051602081830303815290604052805190602001206040516020016107d391906119b6565b60405160208183030381529060405280519060200120905061081d8484848460405160200161080291906119d5565b60405160208183030381529060405280519060200120610ac8565b6108395760405162461bcd60e51b815260040161016d90611a3f565b5050505050565b6108486109bc565b600082815260046020526040902054156108745760405162461bcd60e51b815260040161016d90611aa7565b60009182526004602052604090912055565b60008181526004602052604081205490036108b35760405162461bcd60e51b815260040161016d906118a5565b6000818152600460205260409020544210156108e15760405162461bcd60e51b815260040161016d906118f1565b6000846040516020016108f49190611182565b6040516020818303038152906040528051906020012060405160200161091a9190611ae9565b6040516020818303038152906040528051906020012090506109498484848460405160200161080291906119d5565b6108395760405162461bcd60e51b815260040161016d90611b51565b61096d6109bc565b6001600160a01b0381166109b05760006040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161016d9190610d0a565b6109b981610a60565b50565b6000546001600160a01b0316331461056857336040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161016d9190610d0a565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff169160019190610a358385611b61565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600082610ad6868685610ae0565b1495945050505050565b600081815b84811015610b2357610b0f82878784818110610b0357610b03611b85565b90506020020135610b2c565b915080610b1b81611b9b565b915050610ae5565b50949350505050565b6000818310610b48576000828152602084905260409020610b57565b60008381526020839052604090205b90505b92915050565b60006001600160a01b038216610b5a565b610b7a81610b60565b82525050565b80610b7a565b60408101610b948285610b71565b6103ad6020830184610b80565b600b8152602081017f756e737570706f72746564000000000000000000000000000000000000000000815290505b60200190565b60208082528101610b5a81610ba1565b600060c08284031215610bfa57610bfa600080fd5b50919050565b600060208284031215610c1557610c15600080fd5b813567ffffffffffffffff811115610c2f57610c2f600080fd5b61044584828501610be5565b60208101610b5a8284610b80565b805b81146109b957600080fd5b8035610b5a81610c49565b600060208284031215610c7657610c76600080fd5b60006104458484610c56565b801515610b7a565b60208101610b5a8284610c82565b610c4b81610b60565b8035610b5a81610c98565b60008060408385031215610cc257610cc2600080fd5b6000610cce8585610ca1565b9250506020610cdf85828601610c56565b9150509250929050565b600060208284031215610cfe57610cfe600080fd5b60006104458484610ca1565b60208101610b5a8284610b71565b60008060408385031215610d2e57610d2e600080fd5b823567ffffffffffffffff811115610d4857610d48600080fd5b610cce85828601610be5565b63ffffffff8116610c4b565b8035610b5a81610d54565b60008083601f840112610d8057610d80600080fd5b50813567ffffffffffffffff811115610d9b57610d9b600080fd5b602083019150836001820283011115610db657610db6600080fd5b9250929050565b60ff8116610c4b565b8035610b5a81610dbd565b600080600080600060808688031215610dec57610dec600080fd5b6000610df88888610d60565b9550506020610e0988828901610d60565b945050604086013567ffffffffffffffff811115610e2957610e29600080fd5b610e3588828901610d6b565b93509350506060610e4888828901610dc6565b9150509295509295909350565b67ffffffffffffffff8116610b7a565b60208101610b5a8284610e55565b600060808284031215610bfa57610bfa600080fd5b60008083601f840112610e9d57610e9d600080fd5b50813567ffffffffffffffff811115610eb857610eb8600080fd5b602083019150836020820283011115610db657610db6600080fd5b60008060008060c08587031215610eec57610eec600080fd5b6000610ef88787610e73565b945050608085013567ffffffffffffffff811115610f1857610f18600080fd5b610f2487828801610e88565b935093505060a0610f3787828801610c56565b91505092959194509250565b60008060408385031215610f5957610f59600080fd5b6000610cce8585610c56565b60008060008060608587031215610f7e57610f7e600080fd5b843567ffffffffffffffff811115610f9857610f98600080fd5b610fa487828801610be5565b945050602085013567ffffffffffffffff811115610fc457610fc4600080fd5b610fd087828801610e88565b93509350506040610f3787828801610c56565b506000610b5a6020830183610ca1565b67ffffffffffffffff8116610c4b565b8035610b5a81610ff3565b506000610b5a6020830183611003565b506000610b5a6020830183610d60565b63ffffffff8116610b7a565b6000808335601e193685900301811261105557611055600080fd5b830160208101925035905067ffffffffffffffff81111561107857611078600080fd5b36819003821315610db657610db6600080fd5b82818337506000910152565b8183526020830192506110ab82848361108b565b50601f01601f19160190565b506000610b5a6020830183610dc6565b60ff8116610b7a565b600060c083016110e08380610fe3565b6110ea8582610b71565b506110f8602084018461100e565b6111056020860182610e55565b50611113604084018461101e565b611120604086018261102e565b5061112e606084018461101e565b61113b606086018261102e565b50611149608084018461103a565b858303608087015261115c838284611097565b9250505061116d60a08401846110b7565b61117a60a08601826110c7565b509392505050565b60208082528101610b5781846110d0565b60218152602081017f54686973206d65737361676520776173206e65766572207375626d69747465648152601760f91b602082015290505b60400190565b60208082528101610b5a81611193565b601a8152602081017f537461746520726f6f7420646f6573206e6f742065786973742e00000000000081529050610bcf565b60208082528101610b5a816111e1565b60308152602081017f417474656d7074696e6720746f2073656e642076616c756520776974686f757481527f2070726f766964696e6720457468657200000000000000000000000000000000602082015290506111cb565b60208082528101610b5a81611223565b604081016112998285610b80565b6103ad6020830184610e55565b60148152602081017f6661696c65642073656e64696e672076616c756500000000000000000000000081529050610bcf565b60208082528101610b5a816112a6565b634e487b7160e01b600052601160045260246000fd5b80820180821115610b5a57610b5a6112e8565b60218152602081017f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636581527f2100000000000000000000000000000000000000000000000000000000000000602082015290506111cb565b60208082528101610b5a81611311565b60006020828403121561138e5761138e600080fd5b60006104458484610d60565b60008135610b5a81610c98565b60006001600160a01b03835b81169019929092169190911792915050565b6000610b5a6001600160a01b0383166113dc565b90565b6001600160a01b031690565b6000610b5a826113c5565b6000610b5a826113e8565b611407826113f3565b6114128183546113a7565b8255505050565b60008135610b5a81610ff3565b60007bffffffffffffffff00000000000000000000000000000000000000006113b38460a01b90565b600067ffffffffffffffff8216610b5a565b61146a8261144f565b611412818354611426565b60008135610b5a81610d54565b60007fffffffff000000000000000000000000000000000000000000000000000000006113b38460e01b90565b600063ffffffff8216610b5a565b6114c6826114af565b611412818354611482565b600063ffffffff836113b3565b6114e7826114af565b6114128183546114d1565b6000808335601e193685900301811261150d5761150d600080fd5b8301915050803567ffffffffffffffff81111561152c5761152c600080fd5b602082019150600181023603821315610db657610db6600080fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052602260045260246000fd5b60028104600182168061158757607f821691505b602082108103610bfa57610bfa61155d565b6000610b5a6113d98381565b6115ae83611599565b815460001960089490940293841b1916921b91909117905550565b60006106e18184846115a5565b81811015610552576115e96000826115c9565b6001016115d6565b601f8211156106e1576000818152602090206020601f850104810160208510156116185750805b6108396020601f8601048301826115d6565b8267ffffffffffffffff81111561164357611643611547565b61164d8254611573565b6116588282856115f1565b506000601f82116001811461168d57600083156116755750848201355b600019600885021c198116600285021785555061065e565b600084815260209020601f19841690835b828110156116be578785013582556020948501946001909201910161169e565b50848210156116db57600019601f86166008021c19848801351681555b5050505060020260010190555050565b6106e183838361162a565b60008135610b5a81610dbd565b600060ff836113b3565b600060ff8216610b5a565b6117218261170d565b611412818354611703565b8082806117388161139a565b905061174481846113fe565b5050602083018061175482611419565b90506117608184611461565b5050604083018061177082611475565b905061177c81846114bd565b50505060018101606083018061179182611475565b905061179d81846114de565b50505060028101608083016117b281856114f2565b91506117bf8282856116eb565b5050506003810160a08301806117d4826116f6565b90506108398184611718565b610552828261172c565b60c081016117f8828a610b71565b6118056020830189610e55565b611812604083018861102e565b61181f606083018761102e565b8181036080830152611832818587611097565b905061184160a08301846110c7565b98975050505050505050565b602a8152602081017f526f6f74206973206e6f74207075626c6973686564206f6e2074686973206d6581527f7373616765206275732e00000000000000000000000000000000000000000000602082015290506111cb565b60208082528101610b5a8161184d565b60218152602081017f526f6f74206973206e6f7420636f6e736964657265642066696e616c207965748152601760f91b602082015290506111cb565b60208082528101610b5a816118b5565b506000610b5a6020830183610c56565b61191b8180610fe3565b6119258382610b71565b506119336020820182610fe3565b6119406020840182610b71565b5061194e6040820182611901565b61195b6040840182610b80565b50611969606082018261100e565b6106e16060840182610e55565b60808101610b5a8284611911565b60018152602081017f760000000000000000000000000000000000000000000000000000000000000081529050610bcf565b604080825281016119c681611984565b9050610b5a6020830184610b80565b6119df8183610b80565b602001919050565b60338152602081017f496e76616c696420696e636c7573696f6e2070726f6f6620666f722076616c7581527f65207472616e73666572206d6573736167652e00000000000000000000000000602082015290506111cb565b60208082528101610b5a816119e7565b60258152602081017f526f6f7420616c726561647920616464656420746f20746865206d657373616781527f6520627573000000000000000000000000000000000000000000000000000000602082015290506111cb565b60208082528101610b5a81611a4f565b60018152602081017f6d0000000000000000000000000000000000000000000000000000000000000081529050610bcf565b604080825281016119c681611ab7565b60308152602081017f496e76616c696420696e636c7573696f6e2070726f6f6620666f722063726f7381527f7320636861696e206d6573736167652e00000000000000000000000000000000602082015290506111cb565b60208082528101610b5a81611af9565b67ffffffffffffffff918216919081169082820190811115610b5a57610b5a6112e8565b634e487b7160e01b600052603260045260246000fd5b600060018201611bad57611bad6112e8565b506001019056fea2646970667358221220c8293ff525ddcfd01a52b0bf26c4071757f9277603389aebc8011c7267aa4e7064736f6c63430008140033a2646970667358221220307774f9e39aef6bee804a0b42596a02f401aafd89ea5697b72f7adfd5d9696c64736f6c63430008140033", + Bin: "0x608060405234801561001057600080fd5b5061001a3361001f565b610090565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b614da480620000a06000396000f3fe60806040523480156200001157600080fd5b5060043610620002005760003560e01c80638129fc1c1162000119578063a25eb31c11620000af578063db5d91b1116200007a578063db5d91b114620004f9578063e34fbfc81462000528578063e874eb20146200053d578063f2fde38b146200055157600080fd5b8063a25eb31c14620004a3578063a4ab2faa14620004ba578063a52f433c14620004d1578063d4fab88714620004e257600080fd5b806387059edb11620000f057806387059edb14620004125780638da5cb5b146200042957806398077e86146200045a578063a1a227fa146200048057600080fd5b80638129fc1c14620003bb5780638236a7ba14620003c55780638415482614620003ec57600080fd5b806347665738116200019b5780636a30d26c11620001665780636a30d26c14620003775780636b9707d61462000390578063715018a614620003a75780637281099614620003b157600080fd5b806347665738146200030b5780635371a2161462000322578063568699c8146200033957806368e10383146200036057600080fd5b80632f0cb9e311620001dc5780632f0cb9e314620002575780633e60a22f146200028c57806343348b2f14620002d2578063440c953b146200030157600080fd5b80620ddd27146200020557806303e72e481462000227578063073b6ef31462000240575b600080fd5b6200020f600e5481565b6040516200021e919062001b7d565b60405180910390f35b6200023e6200023836600462001cd3565b62000568565b005b6200023e6200025136600462001e6e565b6200067b565b6200027d6200026836600462001f5b565b600c6020526000908152604090205460ff1681565b6040516200021e919062001f89565b620002c36200029d36600462001f99565b80516020818301810180516003825292820191909301209152546001600160a01b031681565b6040516200021e919062001fe5565b6200027d620002e336600462001ff5565b6001600160a01b031660009081526020819052604090205460ff1690565b6200020f60055481565b6200023e6200031c36600462001ff5565b62000899565b6200023e6200033336600462002088565b62000940565b620003506200034a36600462001f5b565b62000af6565b6040516200021e929190620021a4565b6200023e62000371366004620021c8565b62000b4f565b6200038162000bf8565b6040516200021e9190620022e9565b6200023e620003a136600462001ff5565b62000cdb565b6200023e62000d72565b6200023e62000d8a565b6200023e62000e15565b620003dc620003d636600462001f5b565b62000fff565b6040516200021e929190620022fc565b6200027d620003fd36600462001f5b565b600d6020526000908152604090205460ff1681565b620003dc6200042336600462001f5b565b620010ef565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b0316620002c3565b620004716200046b36600462001f5b565b62001169565b6040516200021e91906200230c565b600a5462000494906001600160a01b031681565b6040516200021e919062002369565b6200023e620004b4366004620023a7565b6200121e565b6200027d620004cb36600462002419565b62001334565b600454610100900460ff166200027d565b6200023e620004f336600462002470565b620013c6565b6200027d6200050a36600462001ff5565b6001600160a01b031660009081526001602052604090205460ff1690565b6200023e620005393660046200252e565b5050565b600b5462000494906001600160a01b031681565b6200023e6200056236600462001ff5565b620014af565b620005726200150d565b60006001600160a01b03166003836040516200058f9190620025a1565b908152604051908190036020019020546001600160a01b031603620005ee57600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01620005ec838262002691565b505b80600383604051620006019190620025a1565b90815260405190819003602001812080546001600160a01b039390931673ffffffffffffffffffffffffffffffffffffffff19909316929092179091557f17b2f9f5748931099ffee882b5b64f4a560b5c55da9b4f4e396dae3bb9f98cb5906200066f90849084906200275e565b60405180910390a15050565b6000828152600860205260409020548114620006b45760405162461bcd60e51b8152600401620006ab90620027b5565b60405180910390fd5b60006200072689898989604051602001620006d3949392919062002825565b6040516020818303038152906040528051906020012086868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506200158592505050565b6001600160a01b03811660009081526020819052604090205490915060ff16620007645760405162461bcd60e51b8152600401620006ab90620028a4565b600e8990556000805b87518110156200087457600b5488516001600160a01b039091169063b6aed0cb908a9084908110620007a357620007a3620028b6565b6020026020010151620007b690620028d7565b426040518363ffffffff1660e01b8152600401620007d692919062002911565b600060405180830381600087803b158015620007f157600080fd5b505af115801562000806573d6000803e3d6000fd5b5050505081888281518110620008205762000820620028b6565b60200260200101516200083390620028d7565b6040516020016200084692919062002911565b60405160208183030381529060405280519060200120915080806200086b9062002946565b9150506200076d565b506000908152600d60205260409020805460ff19166001179055505050505050505050565b620008a36200150d565b6001600160a01b03811660009081526020819052604090205460ff16620008de5760405162461bcd60e51b8152600401620006ab90620028a4565b6001600160a01b038116600090815260016020819052604091829020805460ff19169091179055517ffe64c7181f0fc60e300dc02cca368cdfa94d7ca45902de3b9a9d80070e760936906200093590839062001fe5565b60405180910390a150565b600b546040517fb201246f0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063b201246f906200099190879087908790879060040162002a9b565b60006040518083038186803b158015620009aa57600080fd5b505afa158015620009bf573d6000803e3d6000fd5b50505050600084604051602001620009d8919062002ada565b60408051601f1981840301815291815281516020928301206000818152600c90935291205490915060ff161562000a235760405162461bcd60e51b8152600401620006ab9062002b1d565b6001600c60008760405160200162000a3c919062002ada565b60408051808303601f190181529181528151602092830120835282820193909352908201600020805460ff191693151593909317909255600a546001600160a01b0316916399a3ad219162000a979190890190890162001ff5565b87604001356040518363ffffffff1660e01b815260040162000abb92919062002b2f565b600060405180830381600087803b15801562000ad657600080fd5b505af115801562000aeb573d6000803e3d6000fd5b505050505050505050565b60408051606080820183526000808352602083019190915291810182905260008062000b2285620010ef565b915091508162000b385760009590945092505050565b600094855260086020526040909420549492505050565b60045460ff161562000b755760405162461bcd60e51b8152600401620006ab9062002b99565b60048054600160ff1991821681179092556001600160a01b0387166000908152602081815260408083208054851686179055908490529081902080549092169092179055517ffe64c7181f0fc60e300dc02cca368cdfa94d7ca45902de3b9a9d80070e7609369062000be990879062001fe5565b60405180910390a15050505050565b60606002805480602002602001604051908101604052809291908181526020016000905b8282101562000cd257838290600052602060002001805462000c3e90620025c3565b80601f016020809104026020016040519081016040528092919081815260200182805462000c6c90620025c3565b801562000cbd5780601f1062000c915761010080835404028352916020019162000cbd565b820191906000526020600020905b81548152906001019060200180831162000c9f57829003601f168201915b50505050508152602001906001019062000c1c565b50505050905090565b62000ce56200150d565b6001600160a01b03811660009081526001602052604090205460ff1662000d205760405162461bcd60e51b8152600401620006ab9062002bde565b6001600160a01b03811660009081526001602052604090819020805460ff19169055517f0f279980343c7ca542fde9fa5396555068efb5cd560d9cf9c191aa2911079b47906200093590839062001fe5565b62000d7c6200150d565b62000d886000620015b5565b565b62000d946200150d565b600a546040517f36d2da900000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906336d2da909062000ddf90339060040162001fe5565b600060405180830381600087803b15801562000dfa57600080fd5b505af115801562000e0f573d6000803e3d6000fd5b50505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff1660008115801562000e615750825b905060008267ffffffffffffffff16600114801562000e7f5750303b155b90508115801562000e8e575080155b1562000ec6576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831562000efb57845468ff00000000000000001916680100000000000000001785555b62000f063362001633565b6000600555600160095560405162000f1e9062001b67565b604051809103906000f08015801562000f3b573d6000803e3d6000fd5b50600b80546001600160a01b039290921673ffffffffffffffffffffffffffffffffffffffff199283168117909155600a805490921681179091556040517fbd726cf82ac9c3260b1495107182e336e0654b25c10915648c0cc15b2bb72cbf9162000fa69162001fe5565b60405180910390a1831562000ff857845468ff0000000000000000191685556040517fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29062000be99060019062002c0e565b5050505050565b6040805160608082018352600080835260208084018390528385018290528582526006815284822085519384019095528454835260018501805492958694939092840191906200104f90620025c3565b80601f01602080910402602001604051908101604052809291908181526020018280546200107d90620025c3565b8015620010ce5780601f10620010a257610100808354040283529160200191620010ce565b820191906000526020600020905b815481529060010190602001808311620010b057829003601f168201915b50505091835250506002919091015460209091015280519094149492505050565b604080516060808201835260008083526020830191909152918101829052600083815260076020526040812054908190036200115457505060408051606081018252600080825282516020818101855282825283015291810182905290939092509050565b6200115f8162000fff565b9250925050915091565b600281815481106200117a57600080fd5b9060005260206000200160009150905080546200119790620025c3565b80601f0160208091040260200160405190810160405280929190818152602001828054620011c590620025c3565b8015620012165780601f10620011ea5761010080835404028352916020019162001216565b820191906000526020600020905b815481529060010190602001808311620011f857829003601f168201915b505050505081565b600062001270833562001235602086018662002c1e565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506200158592505050565b6001600160a01b03811660009081526020819052604090205490915060ff16620012ae5760405162461bcd60e51b8152600401620006ab90620028a4565b6001600160a01b03811660009081526001602052604090205460ff16620012e95760405162461bcd60e51b8152600401620006ab9062002bde565b620012f48362001648565b6040517fd6555bff8670bd3008dc064c30bb56d6ac7cb14ae801e36146fe4e7c6a504a5890620013279085359062001b7d565b60405180910390a1505050565b600080805b8351811015620013ad5781848281518110620013595762001359620028b6565b60200260200101516200136c90620028d7565b6040516020016200137f92919062002911565b6040516020818303038152906040528051906020012091508080620013a49062002946565b91505062001339565b506000908152600d602052604090205460ff1692915050565b6001600160a01b03851660009081526020819052604090205460ff1680620014025760405162461bcd60e51b8152600401620006ab9062002cd2565b8115620014845760006200143b878786604051602001620014269392919062002d13565b604051602081830303815290604052620016f5565b905060006200144b828762001585565b9050876001600160a01b0316816001600160a01b031614620014815760405162461bcd60e51b8152600401620006ab9062002d96565b50505b5050506001600160a01b039091166000908152602081905260409020805460ff191660011790555050565b620014b96200150d565b6001600160a01b038116620014ff5760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401620006ab919062001fe5565b6200150a81620015b5565b50565b33620015407f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161462000d8857336040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401620006ab919062001fe5565b60008060008062001597868662001734565b925092509250620015a9828262001785565b50909150505b92915050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300805473ffffffffffffffffffffffffffffffffffffffff1981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6200163d6200189b565b6200150a8162001903565b80356000908152600660205260409020819062001666828262002f39565b505060095460009081526007602052604090208135908190556200168c60014362002f45565b40604051602001620016a092919062002911565b60408051601f198184030181529181528151602092830120600980546000908152600890945291832055805491620016d88362002946565b9190505550600554816040013511156200150a5760400135600555565b60006200170382516200190d565b826040516020016200171792919062002f5b565b604051602081830303815290604052805190602001209050919050565b60008060008351604103620017725760208401516040850151606086015160001a6200176388828585620019b5565b9550955095505050506200177e565b50508151600091506002905b9250925092565b60008260038111156200179c576200179c62002f9b565b03620017a6575050565b6001826003811115620017bd57620017bd62002f9b565b03620017f5576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028260038111156200180c576200180c62002f9b565b0362001848576040517ffce698f7000000000000000000000000000000000000000000000000000000008152620006ab90829060040162001b7d565b60038260038111156200185f576200185f62002f9b565b036200053957806040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600401620006ab919062001b7d565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff1662000d88576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620014b96200189b565b606060006200191c8362001a7e565b600101905060008167ffffffffffffffff8111156200193f576200193f62001b8d565b6040519080825280601f01601f1916602001820160405280156200196a576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508462001974575b509392505050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115620019f2575060009150600390508262001a74565b60006001888888886040516000815260200160405260405162001a19949392919062002fbb565b6020604051602081039080840390855afa15801562001a3c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811662001a6a5750600092506001915082905062001a74565b9250600091508190505b9450945094915050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831062001ac8577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef8100000000831062001af5576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831062001b1457662386f26fc10000830492506010015b6305f5e100831062001b2d576305f5e100830492506008015b612710831062001b4257612710830492506004015b6064831062001b55576064830492506002015b600a8310620015af5760010192915050565b611d768062002ff983390190565b805b82525050565b60208101620015af828462001b75565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff8211171562001bcc5762001bcc62001b8d565b6040525050565b600062001bdf60405190565b905062001bed828262001ba3565b919050565b600067ffffffffffffffff82111562001c0f5762001c0f62001b8d565b601f19601f83011660200192915050565b82818337506000910152565b600062001c4362001c3d8462001bf2565b62001bd3565b90508281526020810184848401111562001c605762001c60600080fd5b620019ad84828562001c20565b600082601f83011262001c835762001c83600080fd5b813562001c9584826020860162001c2c565b949350505050565b60006001600160a01b038216620015af565b62001cba8162001c9d565b81146200150a57600080fd5b8035620015af8162001caf565b6000806040838503121562001ceb5762001ceb600080fd5b823567ffffffffffffffff81111562001d075762001d07600080fd5b62001d158582860162001c6d565b925050602062001d288582860162001cc6565b9150509250929050565b8062001cba565b8035620015af8162001d32565b600067ffffffffffffffff82111562001d635762001d6362001b8d565b5060209081020190565b600062001d7e62001c3d8462001d46565b8381529050602080820190840283018581111562001d9f5762001d9f600080fd5b835b8181101562001de457803567ffffffffffffffff81111562001dc65762001dc6600080fd5b850162001dd4888262001c6d565b8452506020928301920162001da1565b5050509392505050565b600082601f83011262001e045762001e04600080fd5b813562001c9584826020860162001d6d565b60008083601f84011262001e2d5762001e2d600080fd5b50813567ffffffffffffffff81111562001e4a5762001e4a600080fd5b60208301915083600182028301111562001e675762001e67600080fd5b9250929050565b60008060008060008060008060e0898b03121562001e8f5762001e8f600080fd5b600062001e9d8b8b62001d39565b985050602062001eb08b828c0162001d39565b975050604062001ec38b828c0162001d39565b965050606089013567ffffffffffffffff81111562001ee55762001ee5600080fd5b62001ef38b828c0162001dee565b955050608089013567ffffffffffffffff81111562001f155762001f15600080fd5b62001f238b828c0162001e16565b945094505060a062001f388b828c0162001d39565b92505060c062001f4b8b828c0162001d39565b9150509295985092959890939650565b60006020828403121562001f725762001f72600080fd5b600062001c95848462001d39565b80151562001b77565b60208101620015af828462001f80565b60006020828403121562001fb05762001fb0600080fd5b813567ffffffffffffffff81111562001fcc5762001fcc600080fd5b62001c958482850162001c6d565b62001b778162001c9d565b60208101620015af828462001fda565b6000602082840312156200200c576200200c600080fd5b600062001c95848462001cc6565b600060808284031215620020315762002031600080fd5b50919050565b60008083601f8401126200204e576200204e600080fd5b50813567ffffffffffffffff8111156200206b576200206b600080fd5b60208301915083602082028301111562001e675762001e67600080fd5b60008060008060c08587031215620020a357620020a3600080fd5b6000620020b187876200201a565b945050608085013567ffffffffffffffff811115620020d357620020d3600080fd5b620020e18782880162002037565b935093505060a0620020f68782880162001d39565b91505092959194509250565b60005b838110156200211f57818101518382015260200162002105565b50506000910152565b600062002133825190565b8084526020840193506200214c81856020860162002102565b601f01601f19169290920192915050565b8051600090606084019062002173858262001b75565b50602083015184820360208601526200218d828262002128565b9150506040830151620019ad604086018262001b75565b60408101620021b4828562001b75565b818103602083015262001c9581846200215d565b600080600080600060608688031215620021e557620021e5600080fd5b6000620021f3888862001cc6565b955050602086013567ffffffffffffffff811115620022155762002215600080fd5b620022238882890162001e16565b9450945050604086013567ffffffffffffffff811115620022475762002247600080fd5b620022558882890162001e16565b92509250509295509295909350565b600062002272838362002128565b9392505050565b60200190565b60006200228a825190565b80845260208401935083602082028501620022a58560200190565b60005b84811015620022dd5783830388528151620022c4848262002264565b93505060208201602098909801979150600101620022a8565b50909695505050505050565b602080825281016200227281846200227f565b60408101620021b4828562001f80565b6020808252810162002272818462002128565b6000620015af6001600160a01b03831662002338565b90565b6001600160a01b031690565b6000620015af826200231f565b6000620015af8262002344565b62001b778162002351565b60208101620015af82846200235e565b600060608284031215620020315762002031600080fd5b600060208284031215620020315762002031600080fd5b60008060408385031215620023bf57620023bf600080fd5b823567ffffffffffffffff811115620023db57620023db600080fd5b620023e98582860162002379565b925050602083013567ffffffffffffffff8111156200240b576200240b600080fd5b62001d288582860162002390565b600060208284031215620024305762002430600080fd5b813567ffffffffffffffff8111156200244c576200244c600080fd5b62001c958482850162001dee565b80151562001cba565b8035620015af816200245a565b600080600080600060a086880312156200248d576200248d600080fd5b60006200249b888862001cc6565b9550506020620024ae8882890162001cc6565b945050604086013567ffffffffffffffff811115620024d057620024d0600080fd5b620024de8882890162001c6d565b935050606086013567ffffffffffffffff811115620025005762002500600080fd5b6200250e8882890162001c6d565b9250506080620025218882890162002463565b9150509295509295909350565b60008060208385031215620025465762002546600080fd5b823567ffffffffffffffff811115620025625762002562600080fd5b620025708582860162001e16565b92509250509250929050565b600062002587825190565b6200259781856020860162002102565b9290920192915050565b620015af81836200257c565b634e487b7160e01b600052602260045260246000fd5b600281046001821680620025d857607f821691505b602082108103620020315762002031620025ad565b6000620015af620023358381565b6200260683620025ed565b815460001960089490940293841b1916921b91909117905550565b600062002630818484620025fb565b505050565b8181101562000539576200264b60008262002621565b60010162002635565b601f82111562002630576000818152602090206020601f850104810160208510156200267d5750805b62000ff86020601f86010483018262002635565b815167ffffffffffffffff811115620026ae57620026ae62001b8d565b620026ba8254620025c3565b620026c782828562002654565b506020601f821160018114620026ff5760008315620026e65750848201515b600019600885021c198116600285021785555062000ff8565b600084815260208120601f198516915b828110156200273157878501518255602094850194600190920191016200270f565b50848210156200274f5783870151600019601f87166008021c191681555b50505050600202600101905550565b6040808252810162002771818562002128565b905062002272602083018462001fda565b600e8152602081017f496e76616c696420666f726b49440000000000000000000000000000000000008152905062002279565b60208082528101620015af8162002782565b6000620027d2825190565b80845260208401935083602082028501620027ed8560200190565b60005b84811015620022dd57838303885281516200280c848262002264565b93505060208201602098909801979150600101620027f0565b6080810162002835828762001b75565b62002844602083018662001b75565b62002853604083018562001b75565b8181036060830152620028678184620027c7565b9695505050505050565b60168152602081017f656e636c6176654944206e6f74206174746573746564000000000000000000008152905062002279565b60208082528101620015af8162002871565b634e487b7160e01b600052603260045260246000fd5b6000620015af825190565b6000620028e2825190565b60208301620028f181620028cc565b925050602081101562002031576000196020919091036008021b16919050565b6040810162002921828562001b75565b62002272602083018462001b75565b634e487b7160e01b600052601160045260246000fd5b6000600182016200295b576200295b62002930565b5060010190565b506000620015af602083018362001cc6565b506000620015af602083018362001d39565b67ffffffffffffffff811662001cba565b8035620015af8162002986565b506000620015af602083018362002997565b67ffffffffffffffff811662001b77565b620029d3818062002962565b620029df838262001fda565b50620029ef602082018262002962565b620029fe602084018262001fda565b5062002a0e604082018262002974565b62002a1d604084018262001b75565b5062002a2d6060820182620029a4565b620026306060840182620029b6565b82818337505050565b81835260208301925060007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111562002a825762002a82600080fd5b60208302925062002a9583858462002a3c565b50500190565b60c0810162002aab8287620029c7565b818103608083015262002ac081858762002a45565b905062002ad160a083018462001b75565b95945050505050565b60808101620015af8284620029c7565b60188152602081017f7769746864726177616c20616c7265616479207370656e7400000000000000008152905062002279565b60208082528101620015af8162002aea565b6040810162002921828562001fda565b60228152602081017f6e6574776f726b2073656372657420616c726561647920696e697469616c697a81527f6564000000000000000000000000000000000000000000000000000000000000602082015290505b60400190565b60208082528101620015af8162002b3f565b60198152602081017f656e636c6176654944206e6f7420612073657175656e636572000000000000008152905062002279565b60208082528101620015af8162002bab565b600067ffffffffffffffff8216620015af565b62001b778162002bf0565b60208101620015af828462002c03565b6000808335601e193685900301811262002c3b5762002c3b600080fd5b8301915050803567ffffffffffffffff81111562002c5c5762002c5c600080fd5b60208201915060018102360382131562001e675762001e67600080fd5b60238152602081017f726573706f6e64696e67206174746573746572206973206e6f7420617474657381527f74656400000000000000000000000000000000000000000000000000000000006020820152905062002b93565b60208082528101620015af8162002c79565b6000620015af8260601b90565b6000620015af8262002ce4565b62001b7762002d0d8262001c9d565b62002cf1565b62002d1f818562002cfe565b60140162002d2e818462002cfe565b60140162001c9581836200257c565b602c8152602081017f63616c63756c61746564206164647265737320616e642061747465737465724981527f4420646f6e74206d6174636800000000000000000000000000000000000000006020820152905062002b93565b60208082528101620015af8162002d3d565b60008135620015af8162001d32565b600081620015af565b62002dcb8262002db7565b62002dda620023358262002db7565b8255505050565b8267ffffffffffffffff81111562002dfd5762002dfd62001b8d565b62002e098254620025c3565b62002e1682828562002654565b506000601f82116001811462002e4e576000831562002e355750848201355b600019600885021c198116600285021785555062002eab565b600084815260209020601f19841690835b8281101562002e81578785013582556020948501946001909201910162002e5f565b508482101562002e9f57600019601f86166008021c19848801351681555b50506001600284020184555b505050505050565b6200263083838362002de1565b62002ecb82620025ed565b8062002dda565b80828062002ee08162002da8565b905062002eee818462002dc0565b505050600181016020830162002f05818562002c1e565b915062002f1482828562002eb3565b50505060028101604083018062002f2b8262002da8565b905062000ff8818462002ec0565b62000539828262002ed2565b81810381811115620015af57620015af62002930565b7f19457468657265756d205369676e6564204d6573736167653a0a0000000000008152601a0162002f8d81846200257c565b90506200227281836200257c565b634e487b7160e01b600052602160045260246000fd5b60ff811662001b77565b6080810162002fcb828762001b75565b62002fda602083018662002fb1565b62002fe9604083018562001b75565b62002ad1606083018462001b7556fe60806040523480156200001157600080fd5b50338062000040576000604051631e4fbdf760e01b8152600401620000379190620000c6565b60405180910390fd5b6200004b8162000052565b50620000d6565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006001600160a01b0382165b92915050565b620000c081620000a2565b82525050565b60208101620000af8284620000b5565b611c9080620000e66000396000f3fe6080604052600436106100e15760003560e01c80639730886d1161007f578063b201246f11610059578063b201246f146102d4578063b6aed0cb146102f4578063e138a8d214610314578063f2fde38b1461033457610155565b80639730886d1461026757806399a3ad2114610287578063b1454caa146102a757610155565b8063346633fb116100bb578063346633fb146101f957806336d2da901461020c578063715018a61461022c5780638da5cb5b1461024157610155565b80630fcfbd11146101765780630fe9188e146101ac57806333a88c72146101cc57610155565b36610155576040517f346633fb000000000000000000000000000000000000000000000000000000008152309063346633fb9034906101269033908390600401610bea565b6000604051808303818588803b15801561013f57600080fd5b505af1158015610153573d6000803e3d6000fd5b005b60405162461bcd60e51b815260040161016d90610c39565b60405180910390fd5b34801561018257600080fd5b50610196610191366004610c64565b610354565b6040516101a39190610c9f565b60405180910390f35b3480156101b857600080fd5b506101536101c7366004610cc5565b6103b4565b3480156101d857600080fd5b506101ec6101e7366004610c64565b6103fa565b6040516101a39190610cee565b610153610207366004610d10565b61044d565b34801561021857600080fd5b50610153610227366004610d4d565b6104d7565b34801561023857600080fd5b50610153610556565b34801561024d57600080fd5b506000546001600160a01b03166040516101a39190610d6e565b34801561027357600080fd5b50610153610282366004610d7c565b61056a565b34801561029357600080fd5b506101536102a2366004610d10565b610666565b3480156102b357600080fd5b506102c76102c2366004610e35565b6106e6565b6040516101a39190610ec9565b3480156102e057600080fd5b506101536102ef366004610f37565b61073f565b34801561030057600080fd5b5061015361030f366004610fa7565b610840565b34801561032057600080fd5b5061015361032f366004610fc9565b610886565b34801561034057600080fd5b5061015361034f366004610d4d565b6109c9565b6000808260405160200161036891906111e6565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806103ad5760405162461bcd60e51b815260040161016d90611235565b9392505050565b6103bc610a20565b60008181526004602052604081205490036103e95760405162461bcd60e51b815260040161016d90611277565b600090815260046020526040812055565b6000808260405160200161040e91906111e6565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906104455750428111155b949350505050565b60003411801561045c57508034145b6104785760405162461bcd60e51b815260040161016d906112df565b600061048333610a66565b9050826001600160a01b0316336001600160a01b03167f50c536ac33a920f00755865b831d17bf4cff0b2e0345f65b16d52bfc004068b634846040516104ca9291906112ef565b60405180910390a3505050565b6104df610a20565b6000816001600160a01b03164760405160006040518083038185875af1925050503d806000811461052c576040519150601f19603f3d011682016040523d82523d6000602084013e610531565b606091505b50509050806105525760405162461bcd60e51b815260040161016d9061133c565b5050565b61055e610a20565b6105686000610ac4565b565b610572610a20565b600061057e8242611362565b905060008360405160200161059391906111e6565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156105d85760405162461bcd60e51b815260040161016d906113cd565b60008181526001602090815260408220849055600291906105fb90870187610d4d565b6001600160a01b03168152602081019190915260400160009081209061062760808701606088016113dd565b63ffffffff1681526020808201929092526040016000908120805460018101825590825291902085916004020161065e8282611844565b505050505050565b61066e610a20565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146106bb576040519150601f19603f3d011682016040523d82523d6000602084013e6106c0565b606091505b50509050806106e15760405162461bcd60e51b815260040161016d9061133c565b505050565b60006106f133610a66565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef7759373382888888888860405161072e979695949392919061184e565b60405180910390a195945050505050565b600081815260046020526040812054900361076c5760405162461bcd60e51b815260040161016d90611909565b60008181526004602052604090205442101561079a5760405162461bcd60e51b815260040161016d90611955565b6000846040516020016107ad91906119da565b604051602081830303815290604052805190602001206040516020016107d39190611a1a565b60405160208183030381529060405280519060200120905061081d848484846040516020016108029190611a39565b60405160208183030381529060405280519060200120610b2c565b6108395760405162461bcd60e51b815260040161016d90611aa3565b5050505050565b610848610a20565b600082815260046020526040902054156108745760405162461bcd60e51b815260040161016d90611b0b565b60009182526004602052604090912055565b60008181526004602052604081205490036108b35760405162461bcd60e51b815260040161016d90611909565b6000818152600460205260409020544210156108e15760405162461bcd60e51b815260040161016d90611955565b60006108f06020860186610d4d565b6109006040870160208801611b1b565b61091060608801604089016113dd565b6109206080890160608a016113dd565b61092d60808a018a611556565b61093d60c08c0160a08d01611b3c565b604051602001610953979695949392919061184e565b60405160208183030381529060405280519060200120905060008160405160200161097e9190611b8f565b6040516020818303038152906040528051906020012090506109ad858585846040516020016108029190611a39565b61065e5760405162461bcd60e51b815260040161016d90611bf7565b6109d1610a20565b6001600160a01b038116610a145760006040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161016d9190610d6e565b610a1d81610ac4565b50565b6000546001600160a01b0316331461056857336040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161016d9190610d6e565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff169160019190610a998385611c07565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600082610b3a868685610b44565b1495945050505050565b600081815b84811015610b8757610b7382878784818110610b6757610b67611c2b565b90506020020135610b90565b915080610b7f81611c41565b915050610b49565b50949350505050565b6000818310610bac576000828152602084905260409020610bbb565b60008381526020839052604090205b90505b92915050565b60006001600160a01b038216610bbe565b610bde81610bc4565b82525050565b80610bde565b60408101610bf88285610bd5565b6103ad6020830184610be4565b600b8152602081017f756e737570706f72746564000000000000000000000000000000000000000000815290505b60200190565b60208082528101610bbe81610c05565b600060c08284031215610c5e57610c5e600080fd5b50919050565b600060208284031215610c7957610c79600080fd5b813567ffffffffffffffff811115610c9357610c93600080fd5b61044584828501610c49565b60208101610bbe8284610be4565b805b8114610a1d57600080fd5b8035610bbe81610cad565b600060208284031215610cda57610cda600080fd5b60006104458484610cba565b801515610bde565b60208101610bbe8284610ce6565b610caf81610bc4565b8035610bbe81610cfc565b60008060408385031215610d2657610d26600080fd5b6000610d328585610d05565b9250506020610d4385828601610cba565b9150509250929050565b600060208284031215610d6257610d62600080fd5b60006104458484610d05565b60208101610bbe8284610bd5565b60008060408385031215610d9257610d92600080fd5b823567ffffffffffffffff811115610dac57610dac600080fd5b610d3285828601610c49565b63ffffffff8116610caf565b8035610bbe81610db8565b60008083601f840112610de457610de4600080fd5b50813567ffffffffffffffff811115610dff57610dff600080fd5b602083019150836001820283011115610e1a57610e1a600080fd5b9250929050565b60ff8116610caf565b8035610bbe81610e21565b600080600080600060808688031215610e5057610e50600080fd5b6000610e5c8888610dc4565b9550506020610e6d88828901610dc4565b945050604086013567ffffffffffffffff811115610e8d57610e8d600080fd5b610e9988828901610dcf565b93509350506060610eac88828901610e2a565b9150509295509295909350565b67ffffffffffffffff8116610bde565b60208101610bbe8284610eb9565b600060808284031215610c5e57610c5e600080fd5b60008083601f840112610f0157610f01600080fd5b50813567ffffffffffffffff811115610f1c57610f1c600080fd5b602083019150836020820283011115610e1a57610e1a600080fd5b60008060008060c08587031215610f5057610f50600080fd5b6000610f5c8787610ed7565b945050608085013567ffffffffffffffff811115610f7c57610f7c600080fd5b610f8887828801610eec565b935093505060a0610f9b87828801610cba565b91505092959194509250565b60008060408385031215610fbd57610fbd600080fd5b6000610d328585610cba565b60008060008060608587031215610fe257610fe2600080fd5b843567ffffffffffffffff811115610ffc57610ffc600080fd5b61100887828801610c49565b945050602085013567ffffffffffffffff81111561102857611028600080fd5b61103487828801610eec565b93509350506040610f9b87828801610cba565b506000610bbe6020830183610d05565b67ffffffffffffffff8116610caf565b8035610bbe81611057565b506000610bbe6020830183611067565b506000610bbe6020830183610dc4565b63ffffffff8116610bde565b6000808335601e19368590030181126110b9576110b9600080fd5b830160208101925035905067ffffffffffffffff8111156110dc576110dc600080fd5b36819003821315610e1a57610e1a600080fd5b82818337506000910152565b81835260208301925061110f8284836110ef565b50601f01601f19160190565b506000610bbe6020830183610e2a565b60ff8116610bde565b600060c083016111448380611047565b61114e8582610bd5565b5061115c6020840184611072565b6111696020860182610eb9565b506111776040840184611082565b6111846040860182611092565b506111926060840184611082565b61119f6060860182611092565b506111ad608084018461109e565b85830360808701526111c08382846110fb565b925050506111d160a084018461111b565b6111de60a086018261112b565b509392505050565b60208082528101610bbb8184611134565b60218152602081017f54686973206d65737361676520776173206e65766572207375626d69747465648152601760f91b602082015290505b60400190565b60208082528101610bbe816111f7565b601a8152602081017f537461746520726f6f7420646f6573206e6f742065786973742e00000000000081529050610c33565b60208082528101610bbe81611245565b60308152602081017f417474656d7074696e6720746f2073656e642076616c756520776974686f757481527f2070726f766964696e67204574686572000000000000000000000000000000006020820152905061122f565b60208082528101610bbe81611287565b604081016112fd8285610be4565b6103ad6020830184610eb9565b60148152602081017f6661696c65642073656e64696e672076616c756500000000000000000000000081529050610c33565b60208082528101610bbe8161130a565b634e487b7160e01b600052601160045260246000fd5b80820180821115610bbe57610bbe61134c565b60218152602081017f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636581527f21000000000000000000000000000000000000000000000000000000000000006020820152905061122f565b60208082528101610bbe81611375565b6000602082840312156113f2576113f2600080fd5b60006104458484610dc4565b60008135610bbe81610cfc565b60006001600160a01b03835b81169019929092169190911792915050565b6000610bbe6001600160a01b038316611440565b90565b6001600160a01b031690565b6000610bbe82611429565b6000610bbe8261144c565b61146b82611457565b61147681835461140b565b8255505050565b60008135610bbe81611057565b60007bffffffffffffffff00000000000000000000000000000000000000006114178460a01b90565b600067ffffffffffffffff8216610bbe565b6114ce826114b3565b61147681835461148a565b60008135610bbe81610db8565b60007fffffffff000000000000000000000000000000000000000000000000000000006114178460e01b90565b600063ffffffff8216610bbe565b61152a82611513565b6114768183546114e6565b600063ffffffff83611417565b61154b82611513565b611476818354611535565b6000808335601e193685900301811261157157611571600080fd5b8301915050803567ffffffffffffffff81111561159057611590600080fd5b602082019150600181023603821315610e1a57610e1a600080fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052602260045260246000fd5b6002810460018216806115eb57607f821691505b602082108103610c5e57610c5e6115c1565b6000610bbe61143d8381565b611612836115fd565b815460001960089490940293841b1916921b91909117905550565b60006106e1818484611609565b818110156105525761164d60008261162d565b60010161163a565b601f8211156106e1576000818152602090206020601f8501048101602085101561167c5750805b6108396020601f86010483018261163a565b8267ffffffffffffffff8111156116a7576116a76115ab565b6116b182546115d7565b6116bc828285611655565b506000601f8211600181146116f157600083156116d95750848201355b600019600885021c198116600285021785555061065e565b600084815260209020601f19841690835b828110156117225787850135825560209485019460019092019101611702565b508482101561173f57600019601f86166008021c19848801351681555b5050505060020260010190555050565b6106e183838361168e565b60008135610bbe81610e21565b600060ff83611417565b600060ff8216610bbe565b61178582611771565b611476818354611767565b80828061179c816113fe565b90506117a88184611462565b505060208301806117b88261147d565b90506117c481846114c5565b505060408301806117d4826114d9565b90506117e08184611521565b5050506001810160608301806117f5826114d9565b90506118018184611542565b50505060028101608083016118168185611556565b915061182382828561174f565b5050506003810160a08301806118388261175a565b9050610839818461177c565b6105528282611790565b60c0810161185c828a610bd5565b6118696020830189610eb9565b6118766040830188611092565b6118836060830187611092565b81810360808301526118968185876110fb565b90506118a560a083018461112b565b98975050505050505050565b602a8152602081017f526f6f74206973206e6f74207075626c6973686564206f6e2074686973206d6581527f7373616765206275732e000000000000000000000000000000000000000000006020820152905061122f565b60208082528101610bbe816118b1565b60218152602081017f526f6f74206973206e6f7420636f6e736964657265642066696e616c207965748152601760f91b6020820152905061122f565b60208082528101610bbe81611919565b506000610bbe6020830183610cba565b61197f8180611047565b6119898382610bd5565b506119976020820182611047565b6119a46020840182610bd5565b506119b26040820182611965565b6119bf6040840182610be4565b506119cd6060820182611072565b6106e16060840182610eb9565b60808101610bbe8284611975565b60018152602081017f760000000000000000000000000000000000000000000000000000000000000081529050610c33565b60408082528101611a2a816119e8565b9050610bbe6020830184610be4565b611a438183610be4565b602001919050565b60338152602081017f496e76616c696420696e636c7573696f6e2070726f6f6620666f722076616c7581527f65207472616e73666572206d6573736167652e000000000000000000000000006020820152905061122f565b60208082528101610bbe81611a4b565b60258152602081017f526f6f7420616c726561647920616464656420746f20746865206d657373616781527f65206275730000000000000000000000000000000000000000000000000000006020820152905061122f565b60208082528101610bbe81611ab3565b600060208284031215611b3057611b30600080fd5b60006104458484611067565b600060208284031215611b5157611b51600080fd5b60006104458484610e2a565b60018152602081017f6d0000000000000000000000000000000000000000000000000000000000000081529050610c33565b60408082528101611a2a81611b5d565b60308152602081017f496e76616c696420696e636c7573696f6e2070726f6f6620666f722063726f7381527f7320636861696e206d6573736167652e000000000000000000000000000000006020820152905061122f565b60208082528101610bbe81611b9f565b67ffffffffffffffff918216919081169082820190811115610bbe57610bbe61134c565b634e487b7160e01b600052603260045260246000fd5b600060018201611c5357611c5361134c565b506001019056fea2646970667358221220c14e2710742599f7771122ca1f57bd3ae8ca32813cfd99de41e7782f2b9bc44a64736f6c63430008140033a26469706673582212209e8550c9691566b4539cf49821bdbd4b9b45bebd4a23bbb4bf77f10c91230a7064736f6c63430008140033", } // ManagementContractABI is the input ABI used to generate the binding from. diff --git a/contracts/generated/MerkleTreeMessageBus/MerkleTreeMessageBus.go b/contracts/generated/MerkleTreeMessageBus/MerkleTreeMessageBus.go index 2c0183caf4..029d2f4512 100644 --- a/contracts/generated/MerkleTreeMessageBus/MerkleTreeMessageBus.go +++ b/contracts/generated/MerkleTreeMessageBus/MerkleTreeMessageBus.go @@ -50,7 +50,7 @@ type StructsValueTransferMessage struct { // MerkleTreeMessageBusMetaData contains all meta data concerning the MerkleTreeMessageBus contract. var MerkleTreeMessageBusMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"name\":\"LogMessagePublished\",\"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\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"}],\"name\":\"ValueTransfer\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"activationTime\",\"type\":\"uint256\"}],\"name\":\"addStateRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"}],\"name\":\"disableStateRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage\",\"name\":\"crossChainMessage\",\"type\":\"tuple\"}],\"name\":\"getMessageTimeOfFinality\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"name\":\"publishMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"receiveValueFromL2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"retrieveAllFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"sendValueToL2\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage\",\"name\":\"crossChainMessage\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"finalAfterTimestamp\",\"type\":\"uint256\"}],\"name\":\"storeCrossChainMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage\",\"name\":\"crossChainMessage\",\"type\":\"tuple\"}],\"name\":\"verifyMessageFinalized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"bytes32[]\",\"name\":\"proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"name\":\"verifyMessageInclusion\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"}],\"internalType\":\"structStructs.ValueTransferMessage\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"bytes32[]\",\"name\":\"proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"name\":\"verifyValueTransferInclusion\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - Bin: "0x60806040523480156200001157600080fd5b50338062000040576000604051631e4fbdf760e01b8152600401620000379190620000c6565b60405180910390fd5b6200004b8162000052565b50620000d6565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006001600160a01b0382165b92915050565b620000c081620000a2565b82525050565b60208101620000af8284620000b5565b611bea80620000e66000396000f3fe6080604052600436106100e15760003560e01c80639730886d1161007f578063b201246f11610059578063b201246f146102d4578063b6aed0cb146102f4578063e138a8d214610314578063f2fde38b1461033457610155565b80639730886d1461026757806399a3ad2114610287578063b1454caa146102a757610155565b8063346633fb116100bb578063346633fb146101f957806336d2da901461020c578063715018a61461022c5780638da5cb5b1461024157610155565b80630fcfbd11146101765780630fe9188e146101ac57806333a88c72146101cc57610155565b36610155576040517f346633fb000000000000000000000000000000000000000000000000000000008152309063346633fb9034906101269033908390600401610b86565b6000604051808303818588803b15801561013f57600080fd5b505af1158015610153573d6000803e3d6000fd5b005b60405162461bcd60e51b815260040161016d90610bd5565b60405180910390fd5b34801561018257600080fd5b50610196610191366004610c00565b610354565b6040516101a39190610c3b565b60405180910390f35b3480156101b857600080fd5b506101536101c7366004610c61565b6103b4565b3480156101d857600080fd5b506101ec6101e7366004610c00565b6103fa565b6040516101a39190610c8a565b610153610207366004610cac565b61044d565b34801561021857600080fd5b50610153610227366004610ce9565b6104d7565b34801561023857600080fd5b50610153610556565b34801561024d57600080fd5b506000546001600160a01b03166040516101a39190610d0a565b34801561027357600080fd5b50610153610282366004610d18565b61056a565b34801561029357600080fd5b506101536102a2366004610cac565b610666565b3480156102b357600080fd5b506102c76102c2366004610dd1565b6106e6565b6040516101a39190610e65565b3480156102e057600080fd5b506101536102ef366004610ed3565b61073f565b34801561030057600080fd5b5061015361030f366004610f43565b610840565b34801561032057600080fd5b5061015361032f366004610f65565b610886565b34801561034057600080fd5b5061015361034f366004610ce9565b610965565b600080826040516020016103689190611182565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806103ad5760405162461bcd60e51b815260040161016d906111d1565b9392505050565b6103bc6109bc565b60008181526004602052604081205490036103e95760405162461bcd60e51b815260040161016d90611213565b600090815260046020526040812055565b6000808260405160200161040e9190611182565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906104455750428111155b949350505050565b60003411801561045c57508034145b6104785760405162461bcd60e51b815260040161016d9061127b565b600061048333610a02565b9050826001600160a01b0316336001600160a01b03167f50c536ac33a920f00755865b831d17bf4cff0b2e0345f65b16d52bfc004068b634846040516104ca92919061128b565b60405180910390a3505050565b6104df6109bc565b6000816001600160a01b03164760405160006040518083038185875af1925050503d806000811461052c576040519150601f19603f3d011682016040523d82523d6000602084013e610531565b606091505b50509050806105525760405162461bcd60e51b815260040161016d906112d8565b5050565b61055e6109bc565b6105686000610a60565b565b6105726109bc565b600061057e82426112fe565b90506000836040516020016105939190611182565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156105d85760405162461bcd60e51b815260040161016d90611369565b60008181526001602090815260408220849055600291906105fb90870187610ce9565b6001600160a01b0316815260208101919091526040016000908120906106276080870160608801611379565b63ffffffff1681526020808201929092526040016000908120805460018101825590825291902085916004020161065e82826117e0565b505050505050565b61066e6109bc565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146106bb576040519150601f19603f3d011682016040523d82523d6000602084013e6106c0565b606091505b50509050806106e15760405162461bcd60e51b815260040161016d906112d8565b505050565b60006106f133610a02565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef7759373382888888888860405161072e97969594939291906117ea565b60405180910390a195945050505050565b600081815260046020526040812054900361076c5760405162461bcd60e51b815260040161016d906118a5565b60008181526004602052604090205442101561079a5760405162461bcd60e51b815260040161016d906118f1565b6000846040516020016107ad9190611976565b604051602081830303815290604052805190602001206040516020016107d391906119b6565b60405160208183030381529060405280519060200120905061081d8484848460405160200161080291906119d5565b60405160208183030381529060405280519060200120610ac8565b6108395760405162461bcd60e51b815260040161016d90611a3f565b5050505050565b6108486109bc565b600082815260046020526040902054156108745760405162461bcd60e51b815260040161016d90611aa7565b60009182526004602052604090912055565b60008181526004602052604081205490036108b35760405162461bcd60e51b815260040161016d906118a5565b6000818152600460205260409020544210156108e15760405162461bcd60e51b815260040161016d906118f1565b6000846040516020016108f49190611182565b6040516020818303038152906040528051906020012060405160200161091a9190611ae9565b6040516020818303038152906040528051906020012090506109498484848460405160200161080291906119d5565b6108395760405162461bcd60e51b815260040161016d90611b51565b61096d6109bc565b6001600160a01b0381166109b05760006040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161016d9190610d0a565b6109b981610a60565b50565b6000546001600160a01b0316331461056857336040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161016d9190610d0a565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff169160019190610a358385611b61565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600082610ad6868685610ae0565b1495945050505050565b600081815b84811015610b2357610b0f82878784818110610b0357610b03611b85565b90506020020135610b2c565b915080610b1b81611b9b565b915050610ae5565b50949350505050565b6000818310610b48576000828152602084905260409020610b57565b60008381526020839052604090205b90505b92915050565b60006001600160a01b038216610b5a565b610b7a81610b60565b82525050565b80610b7a565b60408101610b948285610b71565b6103ad6020830184610b80565b600b8152602081017f756e737570706f72746564000000000000000000000000000000000000000000815290505b60200190565b60208082528101610b5a81610ba1565b600060c08284031215610bfa57610bfa600080fd5b50919050565b600060208284031215610c1557610c15600080fd5b813567ffffffffffffffff811115610c2f57610c2f600080fd5b61044584828501610be5565b60208101610b5a8284610b80565b805b81146109b957600080fd5b8035610b5a81610c49565b600060208284031215610c7657610c76600080fd5b60006104458484610c56565b801515610b7a565b60208101610b5a8284610c82565b610c4b81610b60565b8035610b5a81610c98565b60008060408385031215610cc257610cc2600080fd5b6000610cce8585610ca1565b9250506020610cdf85828601610c56565b9150509250929050565b600060208284031215610cfe57610cfe600080fd5b60006104458484610ca1565b60208101610b5a8284610b71565b60008060408385031215610d2e57610d2e600080fd5b823567ffffffffffffffff811115610d4857610d48600080fd5b610cce85828601610be5565b63ffffffff8116610c4b565b8035610b5a81610d54565b60008083601f840112610d8057610d80600080fd5b50813567ffffffffffffffff811115610d9b57610d9b600080fd5b602083019150836001820283011115610db657610db6600080fd5b9250929050565b60ff8116610c4b565b8035610b5a81610dbd565b600080600080600060808688031215610dec57610dec600080fd5b6000610df88888610d60565b9550506020610e0988828901610d60565b945050604086013567ffffffffffffffff811115610e2957610e29600080fd5b610e3588828901610d6b565b93509350506060610e4888828901610dc6565b9150509295509295909350565b67ffffffffffffffff8116610b7a565b60208101610b5a8284610e55565b600060808284031215610bfa57610bfa600080fd5b60008083601f840112610e9d57610e9d600080fd5b50813567ffffffffffffffff811115610eb857610eb8600080fd5b602083019150836020820283011115610db657610db6600080fd5b60008060008060c08587031215610eec57610eec600080fd5b6000610ef88787610e73565b945050608085013567ffffffffffffffff811115610f1857610f18600080fd5b610f2487828801610e88565b935093505060a0610f3787828801610c56565b91505092959194509250565b60008060408385031215610f5957610f59600080fd5b6000610cce8585610c56565b60008060008060608587031215610f7e57610f7e600080fd5b843567ffffffffffffffff811115610f9857610f98600080fd5b610fa487828801610be5565b945050602085013567ffffffffffffffff811115610fc457610fc4600080fd5b610fd087828801610e88565b93509350506040610f3787828801610c56565b506000610b5a6020830183610ca1565b67ffffffffffffffff8116610c4b565b8035610b5a81610ff3565b506000610b5a6020830183611003565b506000610b5a6020830183610d60565b63ffffffff8116610b7a565b6000808335601e193685900301811261105557611055600080fd5b830160208101925035905067ffffffffffffffff81111561107857611078600080fd5b36819003821315610db657610db6600080fd5b82818337506000910152565b8183526020830192506110ab82848361108b565b50601f01601f19160190565b506000610b5a6020830183610dc6565b60ff8116610b7a565b600060c083016110e08380610fe3565b6110ea8582610b71565b506110f8602084018461100e565b6111056020860182610e55565b50611113604084018461101e565b611120604086018261102e565b5061112e606084018461101e565b61113b606086018261102e565b50611149608084018461103a565b858303608087015261115c838284611097565b9250505061116d60a08401846110b7565b61117a60a08601826110c7565b509392505050565b60208082528101610b5781846110d0565b60218152602081017f54686973206d65737361676520776173206e65766572207375626d69747465648152601760f91b602082015290505b60400190565b60208082528101610b5a81611193565b601a8152602081017f537461746520726f6f7420646f6573206e6f742065786973742e00000000000081529050610bcf565b60208082528101610b5a816111e1565b60308152602081017f417474656d7074696e6720746f2073656e642076616c756520776974686f757481527f2070726f766964696e6720457468657200000000000000000000000000000000602082015290506111cb565b60208082528101610b5a81611223565b604081016112998285610b80565b6103ad6020830184610e55565b60148152602081017f6661696c65642073656e64696e672076616c756500000000000000000000000081529050610bcf565b60208082528101610b5a816112a6565b634e487b7160e01b600052601160045260246000fd5b80820180821115610b5a57610b5a6112e8565b60218152602081017f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636581527f2100000000000000000000000000000000000000000000000000000000000000602082015290506111cb565b60208082528101610b5a81611311565b60006020828403121561138e5761138e600080fd5b60006104458484610d60565b60008135610b5a81610c98565b60006001600160a01b03835b81169019929092169190911792915050565b6000610b5a6001600160a01b0383166113dc565b90565b6001600160a01b031690565b6000610b5a826113c5565b6000610b5a826113e8565b611407826113f3565b6114128183546113a7565b8255505050565b60008135610b5a81610ff3565b60007bffffffffffffffff00000000000000000000000000000000000000006113b38460a01b90565b600067ffffffffffffffff8216610b5a565b61146a8261144f565b611412818354611426565b60008135610b5a81610d54565b60007fffffffff000000000000000000000000000000000000000000000000000000006113b38460e01b90565b600063ffffffff8216610b5a565b6114c6826114af565b611412818354611482565b600063ffffffff836113b3565b6114e7826114af565b6114128183546114d1565b6000808335601e193685900301811261150d5761150d600080fd5b8301915050803567ffffffffffffffff81111561152c5761152c600080fd5b602082019150600181023603821315610db657610db6600080fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052602260045260246000fd5b60028104600182168061158757607f821691505b602082108103610bfa57610bfa61155d565b6000610b5a6113d98381565b6115ae83611599565b815460001960089490940293841b1916921b91909117905550565b60006106e18184846115a5565b81811015610552576115e96000826115c9565b6001016115d6565b601f8211156106e1576000818152602090206020601f850104810160208510156116185750805b6108396020601f8601048301826115d6565b8267ffffffffffffffff81111561164357611643611547565b61164d8254611573565b6116588282856115f1565b506000601f82116001811461168d57600083156116755750848201355b600019600885021c198116600285021785555061065e565b600084815260209020601f19841690835b828110156116be578785013582556020948501946001909201910161169e565b50848210156116db57600019601f86166008021c19848801351681555b5050505060020260010190555050565b6106e183838361162a565b60008135610b5a81610dbd565b600060ff836113b3565b600060ff8216610b5a565b6117218261170d565b611412818354611703565b8082806117388161139a565b905061174481846113fe565b5050602083018061175482611419565b90506117608184611461565b5050604083018061177082611475565b905061177c81846114bd565b50505060018101606083018061179182611475565b905061179d81846114de565b50505060028101608083016117b281856114f2565b91506117bf8282856116eb565b5050506003810160a08301806117d4826116f6565b90506108398184611718565b610552828261172c565b60c081016117f8828a610b71565b6118056020830189610e55565b611812604083018861102e565b61181f606083018761102e565b8181036080830152611832818587611097565b905061184160a08301846110c7565b98975050505050505050565b602a8152602081017f526f6f74206973206e6f74207075626c6973686564206f6e2074686973206d6581527f7373616765206275732e00000000000000000000000000000000000000000000602082015290506111cb565b60208082528101610b5a8161184d565b60218152602081017f526f6f74206973206e6f7420636f6e736964657265642066696e616c207965748152601760f91b602082015290506111cb565b60208082528101610b5a816118b5565b506000610b5a6020830183610c56565b61191b8180610fe3565b6119258382610b71565b506119336020820182610fe3565b6119406020840182610b71565b5061194e6040820182611901565b61195b6040840182610b80565b50611969606082018261100e565b6106e16060840182610e55565b60808101610b5a8284611911565b60018152602081017f760000000000000000000000000000000000000000000000000000000000000081529050610bcf565b604080825281016119c681611984565b9050610b5a6020830184610b80565b6119df8183610b80565b602001919050565b60338152602081017f496e76616c696420696e636c7573696f6e2070726f6f6620666f722076616c7581527f65207472616e73666572206d6573736167652e00000000000000000000000000602082015290506111cb565b60208082528101610b5a816119e7565b60258152602081017f526f6f7420616c726561647920616464656420746f20746865206d657373616781527f6520627573000000000000000000000000000000000000000000000000000000602082015290506111cb565b60208082528101610b5a81611a4f565b60018152602081017f6d0000000000000000000000000000000000000000000000000000000000000081529050610bcf565b604080825281016119c681611ab7565b60308152602081017f496e76616c696420696e636c7573696f6e2070726f6f6620666f722063726f7381527f7320636861696e206d6573736167652e00000000000000000000000000000000602082015290506111cb565b60208082528101610b5a81611af9565b67ffffffffffffffff918216919081169082820190811115610b5a57610b5a6112e8565b634e487b7160e01b600052603260045260246000fd5b600060018201611bad57611bad6112e8565b506001019056fea2646970667358221220c8293ff525ddcfd01a52b0bf26c4071757f9277603389aebc8011c7267aa4e7064736f6c63430008140033", + Bin: "0x60806040523480156200001157600080fd5b50338062000040576000604051631e4fbdf760e01b8152600401620000379190620000c6565b60405180910390fd5b6200004b8162000052565b50620000d6565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006001600160a01b0382165b92915050565b620000c081620000a2565b82525050565b60208101620000af8284620000b5565b611c9080620000e66000396000f3fe6080604052600436106100e15760003560e01c80639730886d1161007f578063b201246f11610059578063b201246f146102d4578063b6aed0cb146102f4578063e138a8d214610314578063f2fde38b1461033457610155565b80639730886d1461026757806399a3ad2114610287578063b1454caa146102a757610155565b8063346633fb116100bb578063346633fb146101f957806336d2da901461020c578063715018a61461022c5780638da5cb5b1461024157610155565b80630fcfbd11146101765780630fe9188e146101ac57806333a88c72146101cc57610155565b36610155576040517f346633fb000000000000000000000000000000000000000000000000000000008152309063346633fb9034906101269033908390600401610bea565b6000604051808303818588803b15801561013f57600080fd5b505af1158015610153573d6000803e3d6000fd5b005b60405162461bcd60e51b815260040161016d90610c39565b60405180910390fd5b34801561018257600080fd5b50610196610191366004610c64565b610354565b6040516101a39190610c9f565b60405180910390f35b3480156101b857600080fd5b506101536101c7366004610cc5565b6103b4565b3480156101d857600080fd5b506101ec6101e7366004610c64565b6103fa565b6040516101a39190610cee565b610153610207366004610d10565b61044d565b34801561021857600080fd5b50610153610227366004610d4d565b6104d7565b34801561023857600080fd5b50610153610556565b34801561024d57600080fd5b506000546001600160a01b03166040516101a39190610d6e565b34801561027357600080fd5b50610153610282366004610d7c565b61056a565b34801561029357600080fd5b506101536102a2366004610d10565b610666565b3480156102b357600080fd5b506102c76102c2366004610e35565b6106e6565b6040516101a39190610ec9565b3480156102e057600080fd5b506101536102ef366004610f37565b61073f565b34801561030057600080fd5b5061015361030f366004610fa7565b610840565b34801561032057600080fd5b5061015361032f366004610fc9565b610886565b34801561034057600080fd5b5061015361034f366004610d4d565b6109c9565b6000808260405160200161036891906111e6565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806103ad5760405162461bcd60e51b815260040161016d90611235565b9392505050565b6103bc610a20565b60008181526004602052604081205490036103e95760405162461bcd60e51b815260040161016d90611277565b600090815260046020526040812055565b6000808260405160200161040e91906111e6565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906104455750428111155b949350505050565b60003411801561045c57508034145b6104785760405162461bcd60e51b815260040161016d906112df565b600061048333610a66565b9050826001600160a01b0316336001600160a01b03167f50c536ac33a920f00755865b831d17bf4cff0b2e0345f65b16d52bfc004068b634846040516104ca9291906112ef565b60405180910390a3505050565b6104df610a20565b6000816001600160a01b03164760405160006040518083038185875af1925050503d806000811461052c576040519150601f19603f3d011682016040523d82523d6000602084013e610531565b606091505b50509050806105525760405162461bcd60e51b815260040161016d9061133c565b5050565b61055e610a20565b6105686000610ac4565b565b610572610a20565b600061057e8242611362565b905060008360405160200161059391906111e6565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156105d85760405162461bcd60e51b815260040161016d906113cd565b60008181526001602090815260408220849055600291906105fb90870187610d4d565b6001600160a01b03168152602081019190915260400160009081209061062760808701606088016113dd565b63ffffffff1681526020808201929092526040016000908120805460018101825590825291902085916004020161065e8282611844565b505050505050565b61066e610a20565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146106bb576040519150601f19603f3d011682016040523d82523d6000602084013e6106c0565b606091505b50509050806106e15760405162461bcd60e51b815260040161016d9061133c565b505050565b60006106f133610a66565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef7759373382888888888860405161072e979695949392919061184e565b60405180910390a195945050505050565b600081815260046020526040812054900361076c5760405162461bcd60e51b815260040161016d90611909565b60008181526004602052604090205442101561079a5760405162461bcd60e51b815260040161016d90611955565b6000846040516020016107ad91906119da565b604051602081830303815290604052805190602001206040516020016107d39190611a1a565b60405160208183030381529060405280519060200120905061081d848484846040516020016108029190611a39565b60405160208183030381529060405280519060200120610b2c565b6108395760405162461bcd60e51b815260040161016d90611aa3565b5050505050565b610848610a20565b600082815260046020526040902054156108745760405162461bcd60e51b815260040161016d90611b0b565b60009182526004602052604090912055565b60008181526004602052604081205490036108b35760405162461bcd60e51b815260040161016d90611909565b6000818152600460205260409020544210156108e15760405162461bcd60e51b815260040161016d90611955565b60006108f06020860186610d4d565b6109006040870160208801611b1b565b61091060608801604089016113dd565b6109206080890160608a016113dd565b61092d60808a018a611556565b61093d60c08c0160a08d01611b3c565b604051602001610953979695949392919061184e565b60405160208183030381529060405280519060200120905060008160405160200161097e9190611b8f565b6040516020818303038152906040528051906020012090506109ad858585846040516020016108029190611a39565b61065e5760405162461bcd60e51b815260040161016d90611bf7565b6109d1610a20565b6001600160a01b038116610a145760006040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161016d9190610d6e565b610a1d81610ac4565b50565b6000546001600160a01b0316331461056857336040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161016d9190610d6e565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff169160019190610a998385611c07565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600082610b3a868685610b44565b1495945050505050565b600081815b84811015610b8757610b7382878784818110610b6757610b67611c2b565b90506020020135610b90565b915080610b7f81611c41565b915050610b49565b50949350505050565b6000818310610bac576000828152602084905260409020610bbb565b60008381526020839052604090205b90505b92915050565b60006001600160a01b038216610bbe565b610bde81610bc4565b82525050565b80610bde565b60408101610bf88285610bd5565b6103ad6020830184610be4565b600b8152602081017f756e737570706f72746564000000000000000000000000000000000000000000815290505b60200190565b60208082528101610bbe81610c05565b600060c08284031215610c5e57610c5e600080fd5b50919050565b600060208284031215610c7957610c79600080fd5b813567ffffffffffffffff811115610c9357610c93600080fd5b61044584828501610c49565b60208101610bbe8284610be4565b805b8114610a1d57600080fd5b8035610bbe81610cad565b600060208284031215610cda57610cda600080fd5b60006104458484610cba565b801515610bde565b60208101610bbe8284610ce6565b610caf81610bc4565b8035610bbe81610cfc565b60008060408385031215610d2657610d26600080fd5b6000610d328585610d05565b9250506020610d4385828601610cba565b9150509250929050565b600060208284031215610d6257610d62600080fd5b60006104458484610d05565b60208101610bbe8284610bd5565b60008060408385031215610d9257610d92600080fd5b823567ffffffffffffffff811115610dac57610dac600080fd5b610d3285828601610c49565b63ffffffff8116610caf565b8035610bbe81610db8565b60008083601f840112610de457610de4600080fd5b50813567ffffffffffffffff811115610dff57610dff600080fd5b602083019150836001820283011115610e1a57610e1a600080fd5b9250929050565b60ff8116610caf565b8035610bbe81610e21565b600080600080600060808688031215610e5057610e50600080fd5b6000610e5c8888610dc4565b9550506020610e6d88828901610dc4565b945050604086013567ffffffffffffffff811115610e8d57610e8d600080fd5b610e9988828901610dcf565b93509350506060610eac88828901610e2a565b9150509295509295909350565b67ffffffffffffffff8116610bde565b60208101610bbe8284610eb9565b600060808284031215610c5e57610c5e600080fd5b60008083601f840112610f0157610f01600080fd5b50813567ffffffffffffffff811115610f1c57610f1c600080fd5b602083019150836020820283011115610e1a57610e1a600080fd5b60008060008060c08587031215610f5057610f50600080fd5b6000610f5c8787610ed7565b945050608085013567ffffffffffffffff811115610f7c57610f7c600080fd5b610f8887828801610eec565b935093505060a0610f9b87828801610cba565b91505092959194509250565b60008060408385031215610fbd57610fbd600080fd5b6000610d328585610cba565b60008060008060608587031215610fe257610fe2600080fd5b843567ffffffffffffffff811115610ffc57610ffc600080fd5b61100887828801610c49565b945050602085013567ffffffffffffffff81111561102857611028600080fd5b61103487828801610eec565b93509350506040610f9b87828801610cba565b506000610bbe6020830183610d05565b67ffffffffffffffff8116610caf565b8035610bbe81611057565b506000610bbe6020830183611067565b506000610bbe6020830183610dc4565b63ffffffff8116610bde565b6000808335601e19368590030181126110b9576110b9600080fd5b830160208101925035905067ffffffffffffffff8111156110dc576110dc600080fd5b36819003821315610e1a57610e1a600080fd5b82818337506000910152565b81835260208301925061110f8284836110ef565b50601f01601f19160190565b506000610bbe6020830183610e2a565b60ff8116610bde565b600060c083016111448380611047565b61114e8582610bd5565b5061115c6020840184611072565b6111696020860182610eb9565b506111776040840184611082565b6111846040860182611092565b506111926060840184611082565b61119f6060860182611092565b506111ad608084018461109e565b85830360808701526111c08382846110fb565b925050506111d160a084018461111b565b6111de60a086018261112b565b509392505050565b60208082528101610bbb8184611134565b60218152602081017f54686973206d65737361676520776173206e65766572207375626d69747465648152601760f91b602082015290505b60400190565b60208082528101610bbe816111f7565b601a8152602081017f537461746520726f6f7420646f6573206e6f742065786973742e00000000000081529050610c33565b60208082528101610bbe81611245565b60308152602081017f417474656d7074696e6720746f2073656e642076616c756520776974686f757481527f2070726f766964696e67204574686572000000000000000000000000000000006020820152905061122f565b60208082528101610bbe81611287565b604081016112fd8285610be4565b6103ad6020830184610eb9565b60148152602081017f6661696c65642073656e64696e672076616c756500000000000000000000000081529050610c33565b60208082528101610bbe8161130a565b634e487b7160e01b600052601160045260246000fd5b80820180821115610bbe57610bbe61134c565b60218152602081017f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636581527f21000000000000000000000000000000000000000000000000000000000000006020820152905061122f565b60208082528101610bbe81611375565b6000602082840312156113f2576113f2600080fd5b60006104458484610dc4565b60008135610bbe81610cfc565b60006001600160a01b03835b81169019929092169190911792915050565b6000610bbe6001600160a01b038316611440565b90565b6001600160a01b031690565b6000610bbe82611429565b6000610bbe8261144c565b61146b82611457565b61147681835461140b565b8255505050565b60008135610bbe81611057565b60007bffffffffffffffff00000000000000000000000000000000000000006114178460a01b90565b600067ffffffffffffffff8216610bbe565b6114ce826114b3565b61147681835461148a565b60008135610bbe81610db8565b60007fffffffff000000000000000000000000000000000000000000000000000000006114178460e01b90565b600063ffffffff8216610bbe565b61152a82611513565b6114768183546114e6565b600063ffffffff83611417565b61154b82611513565b611476818354611535565b6000808335601e193685900301811261157157611571600080fd5b8301915050803567ffffffffffffffff81111561159057611590600080fd5b602082019150600181023603821315610e1a57610e1a600080fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052602260045260246000fd5b6002810460018216806115eb57607f821691505b602082108103610c5e57610c5e6115c1565b6000610bbe61143d8381565b611612836115fd565b815460001960089490940293841b1916921b91909117905550565b60006106e1818484611609565b818110156105525761164d60008261162d565b60010161163a565b601f8211156106e1576000818152602090206020601f8501048101602085101561167c5750805b6108396020601f86010483018261163a565b8267ffffffffffffffff8111156116a7576116a76115ab565b6116b182546115d7565b6116bc828285611655565b506000601f8211600181146116f157600083156116d95750848201355b600019600885021c198116600285021785555061065e565b600084815260209020601f19841690835b828110156117225787850135825560209485019460019092019101611702565b508482101561173f57600019601f86166008021c19848801351681555b5050505060020260010190555050565b6106e183838361168e565b60008135610bbe81610e21565b600060ff83611417565b600060ff8216610bbe565b61178582611771565b611476818354611767565b80828061179c816113fe565b90506117a88184611462565b505060208301806117b88261147d565b90506117c481846114c5565b505060408301806117d4826114d9565b90506117e08184611521565b5050506001810160608301806117f5826114d9565b90506118018184611542565b50505060028101608083016118168185611556565b915061182382828561174f565b5050506003810160a08301806118388261175a565b9050610839818461177c565b6105528282611790565b60c0810161185c828a610bd5565b6118696020830189610eb9565b6118766040830188611092565b6118836060830187611092565b81810360808301526118968185876110fb565b90506118a560a083018461112b565b98975050505050505050565b602a8152602081017f526f6f74206973206e6f74207075626c6973686564206f6e2074686973206d6581527f7373616765206275732e000000000000000000000000000000000000000000006020820152905061122f565b60208082528101610bbe816118b1565b60218152602081017f526f6f74206973206e6f7420636f6e736964657265642066696e616c207965748152601760f91b6020820152905061122f565b60208082528101610bbe81611919565b506000610bbe6020830183610cba565b61197f8180611047565b6119898382610bd5565b506119976020820182611047565b6119a46020840182610bd5565b506119b26040820182611965565b6119bf6040840182610be4565b506119cd6060820182611072565b6106e16060840182610eb9565b60808101610bbe8284611975565b60018152602081017f760000000000000000000000000000000000000000000000000000000000000081529050610c33565b60408082528101611a2a816119e8565b9050610bbe6020830184610be4565b611a438183610be4565b602001919050565b60338152602081017f496e76616c696420696e636c7573696f6e2070726f6f6620666f722076616c7581527f65207472616e73666572206d6573736167652e000000000000000000000000006020820152905061122f565b60208082528101610bbe81611a4b565b60258152602081017f526f6f7420616c726561647920616464656420746f20746865206d657373616781527f65206275730000000000000000000000000000000000000000000000000000006020820152905061122f565b60208082528101610bbe81611ab3565b600060208284031215611b3057611b30600080fd5b60006104458484611067565b600060208284031215611b5157611b51600080fd5b60006104458484610e2a565b60018152602081017f6d0000000000000000000000000000000000000000000000000000000000000081529050610c33565b60408082528101611a2a81611b5d565b60308152602081017f496e76616c696420696e636c7573696f6e2070726f6f6620666f722063726f7381527f7320636861696e206d6573736167652e000000000000000000000000000000006020820152905061122f565b60208082528101610bbe81611b9f565b67ffffffffffffffff918216919081169082820190811115610bbe57610bbe61134c565b634e487b7160e01b600052603260045260246000fd5b600060018201611c5357611c5361134c565b506001019056fea2646970667358221220c14e2710742599f7771122ca1f57bd3ae8ca32813cfd99de41e7782f2b9bc44a64736f6c63430008140033", } // MerkleTreeMessageBusABI is the input ABI used to generate the binding from. diff --git a/contracts/src/messaging/MerkleTreeMessageBus.sol b/contracts/src/messaging/MerkleTreeMessageBus.sol index cb9c92ba6d..628400685e 100644 --- a/contracts/src/messaging/MerkleTreeMessageBus.sol +++ b/contracts/src/messaging/MerkleTreeMessageBus.sol @@ -27,7 +27,15 @@ contract MerkleTreeMessageBus is IMerkleTreeMessageBus, MessageBus { require(rootValidAfter[root] != 0, "Root is not published on this message bus."); require(block.timestamp >= rootValidAfter[root], "Root is not considered final yet."); - bytes32 leaf = keccak256(abi.encode("m", keccak256(abi.encode(message)))); + bytes32 messageHash = keccak256(abi.encode( + message.sender, + message.sequence, + message.nonce, + message.topic, + message.payload, + message.consistencyLevel + )); + bytes32 leaf = keccak256(abi.encode("m", messageHash)); require(MerkleProof.verifyCalldata(proof, root, keccak256(abi.encodePacked(leaf))), "Invalid inclusion proof for cross chain message."); } From 46d94aefdbb4692de82824bf5b7368c9db943ede Mon Sep 17 00:00:00 2001 From: badgersrus <43809877+badgersrus@users.noreply.github.com> Date: Mon, 28 Oct 2024 11:08:54 +0100 Subject: [PATCH 10/19] Beacon process/ protodanksharding clean up tasks (#2101) * Sim flakiness fixes, clean up beacon processes & set beacon URL for different envs. --- .github/workflows/manual-deploy-testnet-l1.yml | 6 +++--- .github/workflows/manual-deploy-testnet-l2.yml | 14 ++++++++++++-- .github/workflows/manual-upgrade-testnet-l2.yml | 11 +++++++++++ dockerfiles/host.Dockerfile | 2 +- integration/eth2network/pos_eth2_network.go | 2 +- integration/simulation/network/socket.go | 2 +- integration/tenscan/tenscan_test.go | 2 +- 7 files changed, 30 insertions(+), 9 deletions(-) diff --git a/.github/workflows/manual-deploy-testnet-l1.yml b/.github/workflows/manual-deploy-testnet-l1.yml index 7f23f0689c..d7ca9f1bc1 100644 --- a/.github/workflows/manual-deploy-testnet-l1.yml +++ b/.github/workflows/manual-deploy-testnet-l1.yml @@ -94,7 +94,7 @@ jobs: uses: azure/CLI@v1 with: inlineScript: | - az vm open-port -g Testnet -n "${{ github.event.inputs.testnet_type }}-eth2network-${{ GITHUB.RUN_NUMBER }}" --port 8025,8026,9000,9001 + az vm open-port -g Testnet -n "${{ github.event.inputs.testnet_type }}-eth2network-${{ GITHUB.RUN_NUMBER }}" --port 8025,8026,9000,9001,12600 # To overcome issues with critical VM resources being unavailable, we need to wait for the VM to be ready - name: 'Allow time for VM initialization' @@ -158,7 +158,7 @@ jobs: grafana/promtail:latest \ -config.file=/etc/promtail/promtail-config.yaml -config.expand-env=true \ && docker run -d \ - -p 8025:8025 -p 8026:8026 -p 9000:9000 -p 9001:9001 \ + -p 8025:8025 -p 8026:8026 -p 9000:9000 -p 9001:9001 -p 12600:12600 \ --entrypoint /home/obscuro/go-obscuro/integration/eth2network/main/main ${{ vars.DOCKER_BUILD_TAG_ETH2NETWORK }} \ - --gethHTTPStartPort=8025 --gethWSStartPort=9000 \ + --gethHTTPStartPort=8025 --gethWSStartPort=9000 --prysmBeaconGatewayStartPort=12600 \ --prefundedAddrs="${{ vars.ACCOUNT_ADDR_WORKER }},${{ vars.ACCOUNT_ADDR_NODE_0 }},${{ vars.ACCOUNT_ADDR_NODE_1 }},${{ vars.ACCOUNT_ADDR_NODE_2 }},${{ vars.ACCOUNT_ADDR_L1_BRIDGE_TEST }}"' diff --git a/.github/workflows/manual-deploy-testnet-l2.yml b/.github/workflows/manual-deploy-testnet-l2.yml index 1bfcb887b0..adbbbe2017 100644 --- a/.github/workflows/manual-deploy-testnet-l2.yml +++ b/.github/workflows/manual-deploy-testnet-l2.yml @@ -215,7 +215,17 @@ jobs: - name: 'Allow time for VM initialization' shell: bash run: sleep 60 - + + # Set the beacon URL for the L1 chain based on the environment + - name: Set L1 Beacon URL + id: set_beacon_url + run: | + if [[ "${{ github.event.inputs.testnet_type }}" == "sepolia-testnet" ]]; then + echo "L1_BEACON_URL=${{ vars.L1_BEACON_URL }}" >> $GITHUB_OUTPUT + else + echo "L1_BEACON_URL=dev-testnet-eth2network.uksouth.cloudapp.azure.com:12600" >> $GITHUB_OUTPUT + fi + - name: 'Start Obscuro node-${{ matrix.host_id }} on Azure' uses: azure/CLI@v1 with: @@ -294,7 +304,7 @@ jobs: -max_batch_interval=${{ vars.L2_MAX_BATCH_INTERVAL }} \ -rollup_interval=${{ vars.L2_ROLLUP_INTERVAL }} \ -l1_chain_id=${{ vars.L1_CHAIN_ID }} \ - -l1_beacon_url=${{ vars.L1_BEACON_URL }} \ + -l1_beacon_url=${{ steps.set_beacon_url.outputs.L1_BEACON_URL }} \ -l1_blob_archive_url=${{ vars.L1_BLOB_ARCHIVE_URL }} \ -postgres_db_host=postgres://tenuser:${{ secrets.TEN_POSTGRES_USER_PWD }}@postgres-ten-${{ github.event.inputs.testnet_type }}.postgres.database.azure.com:5432/ \ start' diff --git a/.github/workflows/manual-upgrade-testnet-l2.yml b/.github/workflows/manual-upgrade-testnet-l2.yml index 5e2518cdc0..bb1c318385 100644 --- a/.github/workflows/manual-upgrade-testnet-l2.yml +++ b/.github/workflows/manual-upgrade-testnet-l2.yml @@ -147,6 +147,16 @@ jobs: with: creds: ${{ secrets.AZURE_CREDENTIALS }} + # Set the beacon URL for the L1 chain based on the environment + - name: Set L1 Beacon URL + id: set_beacon_url + run: | + if [[ "${{ github.event.inputs.testnet_type }}" == "sepolia-testnet" ]]; then + echo "L1_BEACON_URL=${{ vars.L1_BEACON_URL }}" >> $GITHUB_OUTPUT + else + echo "L1_BEACON_URL=dev-testnet-eth2network.uksouth.cloudapp.azure.com:12600" >> $GITHUB_OUTPUT + fi + - name: 'Update Obscuro node-${{ matrix.host_id }} on Azure' uses: azure/CLI@v1 with: @@ -177,6 +187,7 @@ jobs: -max_batch_interval=${{ vars.L2_MAX_BATCH_INTERVAL }} \ -rollup_interval=${{ vars.L2_ROLLUP_INTERVAL }} \ -l1_chain_id=${{ vars.L1_CHAIN_ID }} \ + -l1_beacon_url=${{ steps.set_beacon_url.outputs.L1_BEACON_URL }} \ -postgres_db_host=postgres://tenuser:${{ secrets.TEN_POSTGRES_USER_PWD }}@postgres-ten-${{ github.event.inputs.testnet_type }}.postgres.database.azure.com:5432/ \ upgrade' diff --git a/dockerfiles/host.Dockerfile b/dockerfiles/host.Dockerfile index 3877503ee4..e50a99c9c7 100644 --- a/dockerfiles/host.Dockerfile +++ b/dockerfiles/host.Dockerfile @@ -44,4 +44,4 @@ COPY --from=build-host \ WORKDIR /home/obscuro/go-obscuro/go/host/main # expose the http and the ws ports to the host -EXPOSE 8025 9000 12600 \ No newline at end of file +EXPOSE 8025 9000 \ No newline at end of file diff --git a/integration/eth2network/pos_eth2_network.go b/integration/eth2network/pos_eth2_network.go index c4b8981b71..afa4209194 100644 --- a/integration/eth2network/pos_eth2_network.go +++ b/integration/eth2network/pos_eth2_network.go @@ -177,8 +177,8 @@ func (n *PosImpl) Start() error { func (n *PosImpl) Stop() error { kill(n.gethProcessID) - kill(n.beaconProcessID) kill(n.validatorProcessID) + kill(n.beaconProcessID) time.Sleep(time.Second) return nil } diff --git a/integration/simulation/network/socket.go b/integration/simulation/network/socket.go index f4372c46e3..f77dd37e76 100644 --- a/integration/simulation/network/socket.go +++ b/integration/simulation/network/socket.go @@ -149,8 +149,8 @@ func (n *networkOfSocketNodes) Create(simParams *params.SimParams, _ *stats.Stat func (n *networkOfSocketNodes) TearDown() { // Stop the TEN nodes first (each host will attempt to shut down its enclave as part of shutdown). StopTenNodes(n.l2Clients) - StopEth2Network(n.gethClients, n.eth2Network) CheckHostRPCServersStopped(n.hostWebsocketURLs) + StopEth2Network(n.gethClients, n.eth2Network) } func (n *networkOfSocketNodes) createConnections(simParams *params.SimParams) error { diff --git a/integration/tenscan/tenscan_test.go b/integration/tenscan/tenscan_test.go index 2d701d3652..c575fbe57c 100644 --- a/integration/tenscan/tenscan_test.go +++ b/integration/tenscan/tenscan_test.go @@ -384,7 +384,7 @@ func issueTransactions(t *testing.T, hostWSAddr string, issuerWallet wallet.Wall } func waitForFirstRollup(serverAddress string) error { - for now := time.Now(); time.Since(now) < 3*time.Minute; time.Sleep(5 * time.Second) { + for now := time.Now(); time.Since(now) < 4*time.Minute; time.Sleep(5 * time.Second) { statusCode, _, err := fasthttp.Get(nil, fmt.Sprintf("%s/items/rollup/latest/", serverAddress)) if err != nil { if strings.Contains(err.Error(), "connection") { From b6e8b0fdb3edc1e3c3bd7868df092cbd554fb1d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=BDiga=20Kokelj?= Date: Mon, 28 Oct 2024 12:54:47 +0100 Subject: [PATCH 11/19] change default log option (#2110) --- testnet/launcher/gateway/docker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testnet/launcher/gateway/docker.go b/testnet/launcher/gateway/docker.go index b9dc38c397..9e8bd0c19f 100644 --- a/testnet/launcher/gateway/docker.go +++ b/testnet/launcher/gateway/docker.go @@ -32,7 +32,7 @@ func (n *DockerGateway) Start() error { "--nodePortWS", fmt.Sprintf("%d", n.cfg.tenNodeWSPort), "--nodeHost", n.cfg.tenNodeHost, "--dbType", "sqlite", - "--logPath", "sys_out", + "--logPath", "gateway_logs.log", "--rateLimitUserComputeTime", fmt.Sprintf("%d", n.cfg.rateLimitUserComputeTime), } From 0f990fc4404208b93c823f10419b41fa9e7084e7 Mon Sep 17 00:00:00 2001 From: Tudor Malene Date: Mon, 28 Oct 2024 13:21:25 +0000 Subject: [PATCH 12/19] fix debug log endpoint (#2112) --- tools/walletextension/rpcapi/debug_api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/walletextension/rpcapi/debug_api.go b/tools/walletextension/rpcapi/debug_api.go index b602f62b9c..f26277c174 100644 --- a/tools/walletextension/rpcapi/debug_api.go +++ b/tools/walletextension/rpcapi/debug_api.go @@ -64,7 +64,7 @@ func (api *DebugAPI) EventLogRelevancy(ctx context.Context, crit common.FilterCr tryUntilAuthorised: true, }, "debug_eventLogRelevancy", - crit, + common.SerializableFilterCriteria(crit), ) if err != nil { return nil, err From 8e5e572b6de262d55b851512636b4231de720544 Mon Sep 17 00:00:00 2001 From: Stefan Iliev <46542846+StefanIliev545@users.noreply.github.com> Date: Mon, 28 Oct 2024 17:17:59 +0200 Subject: [PATCH 13/19] Single pass gas estimation. (#2108) * Single pass gas estimation. * Lowered the fee 10 times. * Fix for the estimation. * Working version it seems?. * Some comments for PR review. * Expanded comment. * Fix for linter. * Removed /10 from initial base fee. --------- Co-authored-by: StefanIliev545 --- go/enclave/evm/evm_facade.go | 27 +++-- go/enclave/rpc/EstimateGas.go | 221 +++++++++++++++++++--------------- 2 files changed, 144 insertions(+), 104 deletions(-) diff --git a/go/enclave/evm/evm_facade.go b/go/enclave/evm/evm_facade.go index 8994e9e32d..0e7b9719c4 100644 --- a/go/enclave/evm/evm_facade.go +++ b/go/enclave/evm/evm_facade.go @@ -362,22 +362,25 @@ func ExecuteObsCall( noBaseFee = false } + ethHeader, err := gethEncodingService.CreateEthHeaderForBatch(ctx, header) + if err != nil { + return nil, err + } + + snapshot := s.Snapshot() + defer s.RevertToSnapshot(snapshot) // Always revert after simulation defer core.LogMethodDuration(logger, measure.NewStopwatch(), "evm_facade.go:ObsCall()") gp := gethcore.GasPool(gasEstimationCap) gp.SetGas(gasEstimationCap) - chain, vmCfg := initParams(storage, gethEncodingService, config, noBaseFee, nil) - ethHeader, err := gethEncodingService.CreateEthHeaderForBatch(ctx, header) - if err != nil { - return nil, err - } - blockContext := gethcore.NewEVMBlockContext(ethHeader, chain, nil) + cleanState := createCleanState(s, msg, ethHeader, chainConfig) + chain, vmCfg := initParams(storage, gethEncodingService, config, noBaseFee, nil) + blockContext := gethcore.NewEVMBlockContext(ethHeader, chain, nil) // sets TxKey.origin txContext := gethcore.NewEVMTxContext(msg) - vmenv := vm.NewEVM(blockContext, txContext, s, chainConfig, vmCfg) - + vmenv := vm.NewEVM(blockContext, txContext, cleanState, chainConfig, vmCfg) result, err := gethcore.ApplyMessage(vmenv, msg, &gp) // Follow the same error check structure as in geth // 1 - vmError / stateDB err check @@ -385,7 +388,7 @@ func ExecuteObsCall( // 3 - error check the ApplyMessage // Read the error stored in the database. - if dbErr := s.Error(); dbErr != nil { + if dbErr := cleanState.Error(); dbErr != nil { return nil, newErrorWithReasonAndCode(dbErr) } @@ -403,6 +406,12 @@ func ExecuteObsCall( return result, nil } +func createCleanState(s *state.StateDB, msg *gethcore.Message, ethHeader *types.Header, chainConfig *params.ChainConfig) *state.StateDB { + cleanState := s.Copy() + cleanState.Prepare(chainConfig.Rules(ethHeader.Number, true, 0), msg.From, ethHeader.Coinbase, msg.To, nil, msg.AccessList) + return cleanState +} + func initParams(storage storage.Storage, gethEncodingService gethencoding.EncodingService, config config.EnclaveConfig, noBaseFee bool, l gethlog.Logger) (*ObscuroChainContext, vm.Config) { vmCfg := vm.Config{ NoBaseFee: noBaseFee, diff --git a/go/enclave/rpc/EstimateGas.go b/go/enclave/rpc/EstimateGas.go index cbe47ec620..1af819a45b 100644 --- a/go/enclave/rpc/EstimateGas.go +++ b/go/enclave/rpc/EstimateGas.go @@ -8,7 +8,6 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/params" "github.com/ten-protocol/go-ten/go/common" "github.com/ten-protocol/go-ten/go/common/measure" "github.com/ten-protocol/go-ten/go/enclave/core" @@ -53,6 +52,8 @@ func EstimateGasValidate(reqParams []any, builder *CallBuilder[CallParamsWithBlo return nil } +// EstimateGasExecute - performs the gas estimation based on the provided parameters and the local environment configuration. +// Will accommodate l1 gas cost and stretch the final gas estimation. func EstimateGasExecute(builder *CallBuilder[CallParamsWithBlock, hexutil.Uint64], rpc *EncryptionManager) error { err := authenticateFrom(builder.VK, builder.From) if err != nil { @@ -94,7 +95,11 @@ func EstimateGasExecute(builder *CallBuilder[CallParamsWithBlock, hexutil.Uint64 // TODO: Change to fixed time period quotes, rather than this. publishingGas = publishingGas.Mul(publishingGas, gethcommon.Big2) - executionGasEstimate, gasPrice, err := rpc.doEstimateGas(builder.ctx, txArgs, blockNumber, rpc.config.GasLocalExecutionCapFlag) + // Run the execution simulation based on stateDB after head batch. + // Notice that unfortunately, some slots might ve considered warm, which skews the estimation. + // The single pass will run once at the highest gas cap and return gas used. Not completely reliable, + // but is quick. + executionGasEstimate, gasPrice, err := rpc.estimateGasSinglePass(builder.ctx, txArgs, blockNumber, rpc.config.GasLocalExecutionCapFlag) if err != nil { err = fmt.Errorf("unable to estimate transaction - %w", err) @@ -117,43 +122,123 @@ func EstimateGasExecute(builder *CallBuilder[CallParamsWithBlock, hexutil.Uint64 if balance.ToInt().Cmp(big.NewInt(0).Mul(gasPrice, big.NewInt(0).SetUint64(totalGasEstimateUint64))) < 0 { return fmt.Errorf("insufficient funds for gas estimate") } + rpc.logger.Debug("Estimation breakdown", "gasPrice", gasPrice, "executionGasEstimate", uint64(executionGasEstimate), "publishingGas", publishingGas, "totalGasEstimate", uint64(totalGasEstimate)) builder.ReturnValue = &totalGasEstimate return nil } -// DoEstimateGas returns the estimation of minimum gas required to execute transaction -// This is a copy of https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L1055 -// there's a high complexity to the method due to geth business rules (which is mimic'd here) -// once the work of obscuro gas mechanics is established this method should be simplified -func (rpc *EncryptionManager) doEstimateGas(ctx context.Context, args *gethapi.TransactionArgs, blkNumber *gethrpc.BlockNumber, gasCap uint64) (hexutil.Uint64, *big.Int, common.SystemError) { //nolint: gocognit - // Binary search the gas requirement, as it may be higher than the amount used - var ( //nolint: revive - lo = params.TxGas - 1 - hi uint64 - cap uint64 //nolint:predeclared - ) - // Use zero address if sender unspecified. - if args.From == nil { - args.From = new(gethcommon.Address) +func (rpc *EncryptionManager) calculateMaxGasCap(ctx context.Context, gasCap uint64, argsGas *hexutil.Uint64) uint64 { + // Fetch the current batch header to get the batch gas limit + batchHeader, err := rpc.storage.FetchHeadBatchHeader(ctx) + if err != nil { + rpc.logger.Error("Failed to fetch batch header", "error", err) + return gasCap } - // Determine the highest gas limit can be used during the estimation. - if args.Gas != nil && uint64(*args.Gas) >= params.TxGas { - hi = uint64(*args.Gas) - } else { - // todo (#627) - review this with the gas mechanics/tokenomics work - /* - //Retrieve the block to act as the gas ceiling - block, Err := b.BlockByNumberOrHash(ctx, blockNrOrHash) - if Err != nil { - return 0, Err - } - if block == nil { - return 0, errors.New("block not found") + + // Determine the gas limit based on the batch header + batchGasLimit := batchHeader.GasLimit + if batchGasLimit < gasCap { + gasCap = batchGasLimit + } + + // If args.Gas is specified, take the minimum of gasCap and args.Gas + if argsGas != nil { + argsGasUint64 := uint64(*argsGas) + if argsGasUint64 < gasCap { + rpc.logger.Debug("Gas cap adjusted based on args.Gas", + "argsGas", argsGasUint64, + "previousGasCap", gasCap, + "newGasCap", argsGasUint64, + ) + gasCap = argsGasUint64 + } + } + + return gasCap +} + +// This adds a bit of an overhead to gas estimation. Fixes issues when calling proxies, but needs more investigation. +// Not sure why simulation is non consistent. +func calculateProxyOverhead(txArgs *gethapi.TransactionArgs) uint64 { + if txArgs == nil || txArgs.Data == nil { + return 0 + } + + calldata := []byte(*txArgs.Data) + + // Base costs + overhead := uint64(2200) // SLOAD (cold) + DELEGATECALL + + // Memory operations + dataSize := uint64(len(calldata)) + memCost := (dataSize * 3) * 2 // calldatacopy in both contexts + + // Memory expansion + words := (dataSize + 31) / 32 + memCost += words * 3 + + return overhead + memCost +} + +// estimateGasSinglePass - deduces the simulation params from the call parameters and the local environment configuration. +// will override the gas limit with one provided in transaction if lower. Furthermore figures out the gas cap and the allowance +// for the from address. +// In the binary search approach geth uses, the high of the range for gas limit is where our single pass runs. +// For example, if you estimate gas for a swap, the simulation EVM will be configured to run at the highest possible gas cap. +// This allows the maximum gas for running the call. Then we look at the gas used and return this with a couple modifications. +// The modifications are an overhead buffer and a 20% increase to account for warm storage slots. This is because the stateDB +// for the head batch might not be fully clean in terms of the running call. Cold storage slots cost far more than warm ones to +// read and write. +func (rpc *EncryptionManager) estimateGasSinglePass(ctx context.Context, args *gethapi.TransactionArgs, blkNumber *gethrpc.BlockNumber, gasCap uint64) (hexutil.Uint64, *big.Int, common.SystemError) { + maxGasCap := rpc.calculateMaxGasCap(ctx, gasCap, args.Gas) + // allowance will either be the maxGasCap or the balance allowance. + // If the users funds are floaty, this might cause issues combined with the l1 pricing. + allowance, feeCap, err := rpc.normalizeFeeCapAndAdjustGasLimit(ctx, args, blkNumber, maxGasCap) + if err != nil { + return 0, nil, err + } + + // Set the gas limit to the provided gasCap + args.Gas = (*hexutil.Uint64)(&allowance) + + // Perform a single gas estimation pass using isGasEnough + failed, result, err := rpc.isGasEnough(ctx, args, allowance, blkNumber) + if err != nil { + // Return zero values and the encountered error if estimation fails + return 0, nil, err + } + + if failed { + if result != nil && result.Err != vm.ErrOutOfGas { //nolint: errorlint + if len(result.Revert()) > 0 { + return 0, gethcommon.Big0, newRevertError(result) } - hi = block.GasLimit() - */ - hi = rpc.config.GasLocalExecutionCapFlag + return 0, gethcommon.Big0, result.Err + } + // If the gas cap is insufficient, return an appropriate error + return 0, nil, fmt.Errorf("gas required exceeds the provided gas cap (%d)", gasCap) } + + if result == nil { + // If there's no result, something went wrong + return 0, nil, fmt.Errorf("no execution result returned") + } + + // Extract the gas used from the execution result. + // Add an overhead buffer to account for the fact that the execution might not be able to be completed in the same batch. + // There can be further discrepancies in the execution due to storage and other factors. + gasUsedBig := big.NewInt(0).SetUint64(result.UsedGas) + gasUsedBig.Add(gasUsedBig, big.NewInt(0).SetUint64(calculateProxyOverhead(args))) + // Add 20% overhead to gas used - this is a rough accommodation for + // warm storage slots. + gasUsedBig.Mul(gasUsedBig, big.NewInt(120)) + gasUsedBig.Div(gasUsedBig, big.NewInt(100)) + gasUsed := hexutil.Uint64(gasUsedBig.Uint64()) + + return gasUsed, feeCap, nil +} + +func (rpc *EncryptionManager) normalizeFeeCapAndAdjustGasLimit(ctx context.Context, args *gethapi.TransactionArgs, blkNumber *gethrpc.BlockNumber, hi uint64) (uint64, *big.Int, error) { // Normalize the max fee per gas the call is willing to spend. var feeCap *big.Int if args.GasPrice != nil && (args.MaxFeePerGas != nil || args.MaxPriorityFeePerGas != nil) { @@ -165,6 +250,7 @@ func (rpc *EncryptionManager) doEstimateGas(ctx context.Context, args *gethapi.T } else { feeCap = gethcommon.Big0 } + // Recap the highest gas limit with account's available balance. if feeCap.BitLen() != 0 { //nolint:nestif balance, err := rpc.chain.GetBalanceAtBlock(ctx, *args.From, blkNumber) @@ -187,73 +273,18 @@ func (rpc *EncryptionManager) doEstimateGas(ctx context.Context, args *gethapi.T if transfer == nil { transfer = new(hexutil.Big) } - rpc.logger.Debug("Gas estimation capped by limited funds", "original", hi, "balance", balance, - "sent", transfer.ToInt(), "maxFeePerGas", feeCap, "fundable", allowance) + rpc.logger.Debug("Gas estimation capped by limited funds", + "original", hi, + "balance", balance, + "sent", transfer.ToInt(), + "maxFeePerGas", feeCap, + "fundable", allowance, + ) hi = allowance.Uint64() } } - // Recap the highest gas allowance with specified gascap. - if gasCap != 0 && hi > gasCap { - rpc.logger.Debug("Caller gas above allowance, capping", "requested", hi, "cap", gasCap) - hi = gasCap - } - cap = hi //nolint: revive - isFailedAtMax, _, err := rpc.isGasEnough(ctx, args, hi, blkNumber) - // TODO: Workaround for the weird conensus nil statement down, which gets interwined with evm errors. - // Here if there is a consensus error - we'd bail. If the tx fails at max gas - we'd bail (probably bad) - if err != nil { - return 0, gethcommon.Big0, err - } - if isFailedAtMax { - return 0, gethcommon.Big0, fmt.Errorf("gas required exceeds allowance (%d)", cap) - } - - // Execute the binary search and hone in on an isGasEnough gas limit - for lo+1 < hi { - mid := (hi + lo) / 2 - if mid > lo*2 { - // Most txs don't need much higher gas limit than their gas used, and most txs don't - // require near the full block limit of gas, so the selection of where to bisect the - // range here is skewed to favor the low side. - mid = lo * 2 - } - failed, _, _ := rpc.isGasEnough(ctx, args, mid, blkNumber) - // TODO @siliev: The following statement is bullshit. I dont know why its here. - // We might have masked our internal workings, or mixed up with how geth works. - // Either way transaction reverted is counted as a consensus error, rather than - // EVM failure. - - // If the error is not nil(consensus error), it means the provided message - // call or transaction will never be accepted no matter how much gas it is - // assigned. Return the error directly, don't struggle any more. - /*if err != nil && isFailedAtMax { - return 0, gethcommon.Big0, err - }*/ - if failed { - lo = mid - } else { - hi = mid - } - } - // Reject the transaction as invalid if it still fails at the highest allowance - if hi == cap { //nolint:nestif - failed, result, err := rpc.isGasEnough(ctx, args, hi, blkNumber) - if err != nil { - return 0, gethcommon.Big0, err - } - if failed { - if result != nil && result.Err != vm.ErrOutOfGas { //nolint: errorlint - if len(result.Revert()) > 0 { - return 0, gethcommon.Big0, newRevertError(result) - } - return 0, gethcommon.Big0, result.Err - } - // Otherwise, the specified gas cap is too low - return 0, gethcommon.Big0, fmt.Errorf("gas required exceeds allowance (%d)", cap) - } - } - return hexutil.Uint64(hi), feeCap, nil + return hi, feeCap, nil } // Create a helper to check if a gas allowance results in an executable transaction From 81d65b98847dd4f47f60d132fe130e24aafce9bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=BDiga=20Kokelj?= Date: Tue, 29 Oct 2024 09:43:12 +0100 Subject: [PATCH 14/19] change default log path in local testnet gateway (#2114) --- testnet/launcher/gateway/docker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testnet/launcher/gateway/docker.go b/testnet/launcher/gateway/docker.go index 9e8bd0c19f..b9dc38c397 100644 --- a/testnet/launcher/gateway/docker.go +++ b/testnet/launcher/gateway/docker.go @@ -32,7 +32,7 @@ func (n *DockerGateway) Start() error { "--nodePortWS", fmt.Sprintf("%d", n.cfg.tenNodeWSPort), "--nodeHost", n.cfg.tenNodeHost, "--dbType", "sqlite", - "--logPath", "gateway_logs.log", + "--logPath", "sys_out", "--rateLimitUserComputeTime", fmt.Sprintf("%d", n.cfg.rateLimitUserComputeTime), } From 2c5e0808bdba26c401ed06d02d0d953e3f08a22e Mon Sep 17 00:00:00 2001 From: badgersrus <43809877+badgersrus@users.noreply.github.com> Date: Tue, 29 Oct 2024 17:02:05 +0100 Subject: [PATCH 15/19] fix uat env vars (#2116) --- .github/workflows/manual-deploy-testnet-l2.yml | 12 +----------- .github/workflows/manual-upgrade-testnet-l2.yml | 13 ++----------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/.github/workflows/manual-deploy-testnet-l2.yml b/.github/workflows/manual-deploy-testnet-l2.yml index adbbbe2017..b7d342fa9d 100644 --- a/.github/workflows/manual-deploy-testnet-l2.yml +++ b/.github/workflows/manual-deploy-testnet-l2.yml @@ -216,16 +216,6 @@ jobs: shell: bash run: sleep 60 - # Set the beacon URL for the L1 chain based on the environment - - name: Set L1 Beacon URL - id: set_beacon_url - run: | - if [[ "${{ github.event.inputs.testnet_type }}" == "sepolia-testnet" ]]; then - echo "L1_BEACON_URL=${{ vars.L1_BEACON_URL }}" >> $GITHUB_OUTPUT - else - echo "L1_BEACON_URL=dev-testnet-eth2network.uksouth.cloudapp.azure.com:12600" >> $GITHUB_OUTPUT - fi - - name: 'Start Obscuro node-${{ matrix.host_id }} on Azure' uses: azure/CLI@v1 with: @@ -304,7 +294,7 @@ jobs: -max_batch_interval=${{ vars.L2_MAX_BATCH_INTERVAL }} \ -rollup_interval=${{ vars.L2_ROLLUP_INTERVAL }} \ -l1_chain_id=${{ vars.L1_CHAIN_ID }} \ - -l1_beacon_url=${{ steps.set_beacon_url.outputs.L1_BEACON_URL }} \ + -l1_beacon_url=${{ vars.L1_BEACON_URL }} \ -l1_blob_archive_url=${{ vars.L1_BLOB_ARCHIVE_URL }} \ -postgres_db_host=postgres://tenuser:${{ secrets.TEN_POSTGRES_USER_PWD }}@postgres-ten-${{ github.event.inputs.testnet_type }}.postgres.database.azure.com:5432/ \ start' diff --git a/.github/workflows/manual-upgrade-testnet-l2.yml b/.github/workflows/manual-upgrade-testnet-l2.yml index bb1c318385..d5bf116694 100644 --- a/.github/workflows/manual-upgrade-testnet-l2.yml +++ b/.github/workflows/manual-upgrade-testnet-l2.yml @@ -147,16 +147,6 @@ jobs: with: creds: ${{ secrets.AZURE_CREDENTIALS }} - # Set the beacon URL for the L1 chain based on the environment - - name: Set L1 Beacon URL - id: set_beacon_url - run: | - if [[ "${{ github.event.inputs.testnet_type }}" == "sepolia-testnet" ]]; then - echo "L1_BEACON_URL=${{ vars.L1_BEACON_URL }}" >> $GITHUB_OUTPUT - else - echo "L1_BEACON_URL=dev-testnet-eth2network.uksouth.cloudapp.azure.com:12600" >> $GITHUB_OUTPUT - fi - - name: 'Update Obscuro node-${{ matrix.host_id }} on Azure' uses: azure/CLI@v1 with: @@ -187,7 +177,8 @@ jobs: -max_batch_interval=${{ vars.L2_MAX_BATCH_INTERVAL }} \ -rollup_interval=${{ vars.L2_ROLLUP_INTERVAL }} \ -l1_chain_id=${{ vars.L1_CHAIN_ID }} \ - -l1_beacon_url=${{ steps.set_beacon_url.outputs.L1_BEACON_URL }} \ + -l1_beacon_url=${{ vars.L1_BEACON_URL }} \ + -l1_blob_archive_url=${{ vars.L1_BLOB_ARCHIVE_URL }} \ -postgres_db_host=postgres://tenuser:${{ secrets.TEN_POSTGRES_USER_PWD }}@postgres-ten-${{ github.event.inputs.testnet_type }}.postgres.database.azure.com:5432/ \ upgrade' From 32f420373eb704844871ba8de054f7efbe1dc237 Mon Sep 17 00:00:00 2001 From: Tudor Malene Date: Thu, 31 Oct 2024 15:03:59 +0000 Subject: [PATCH 16/19] tweak cache (#2120) * tweak cache * fix --- go/enclave/l2chain/l2_chain.go | 2 +- go/enclave/storage/cache_service.go | 114 ++++++++++++------ tools/walletextension/cache/RistrettoCache.go | 5 +- 3 files changed, 78 insertions(+), 43 deletions(-) diff --git a/go/enclave/l2chain/l2_chain.go b/go/enclave/l2chain/l2_chain.go index a2474f5237..c534df50a2 100644 --- a/go/enclave/l2chain/l2_chain.go +++ b/go/enclave/l2chain/l2_chain.go @@ -128,7 +128,7 @@ func (oc *obscuroChain) ObsCallAtBlock(ctx context.Context, apiArgs *gethapi.Tra } // GetChainStateAtTransaction Returns the state of the chain at certain block height after executing transactions up to the selected transaction -// TODO make this cacheable +// TODO make this cacheable - why isn't this in the evm_facade? func (oc *obscuroChain) GetChainStateAtTransaction(ctx context.Context, batch *core.Batch, txIndex int, _ uint64) (*gethcore.Message, vm.BlockContext, *state.StateDB, error) { // Short circuit if it's genesis batch. if batch.NumberU64() == 0 { diff --git a/go/enclave/storage/cache_service.go b/go/enclave/storage/cache_service.go index 2d611000d3..bad04668db 100644 --- a/go/enclave/storage/cache_service.go +++ b/go/enclave/storage/cache_service.go @@ -2,8 +2,11 @@ package storage import ( "context" + "fmt" "math/big" + "github.com/status-im/keycard-go/hexutils" + "github.com/ten-protocol/go-ten/go/enclave/storage/enclavedb" "github.com/eko/gocache/lib/v4/store" @@ -34,8 +37,7 @@ const ( ) type CacheService struct { - // cache for the immutable blocks and batches. - // this avoids a trip to the database. + // cache for the immutable blocks headers blockCache *cache.Cache[*types.Header] // stores batches using the sequence number as key @@ -49,6 +51,9 @@ type CacheService struct { // note: to fetch a batch by height will require 2 cache hits seqCacheByHeight *cache.Cache[*big.Int] + // store the converted ethereum header which is passed to the evm + convertedGethHeaderCache *cache.Cache[*types.Header] + // batch hash - geth converted hash convertedHashCache *cache.Cache[*gethcommon.Hash] @@ -56,12 +61,9 @@ type CacheService struct { eoaCache *cache.Cache[*uint64] contractAddressCache *cache.Cache[*enclavedb.Contract] - // from contract_address||event_sig to the event_type (id, isLifecycle) object + // from contract_address||event_sig to the event_type object eventTypeCache *cache.Cache[*enclavedb.EventType] - // store the converted ethereum header which is passed to the evm - convertedGethHeaderCache *cache.Cache[*types.Header] - // store the last few batches together with the content lastBatchesCache *cache.Cache[*core.Batch] @@ -74,48 +76,50 @@ type CacheService struct { } func NewCacheService(logger gethlog.Logger, testMode bool) *CacheService { - nrElem := int64(50_000_000) - cacheSize := int64(2 * 1024 * 1024 * 1024) - nrReceiptsToCache := int64(10_000) + nrL1Blocks := 100 // ~200k + nrBatches := 10_000 // ~25M + nrConvertedEth := 10_000 // ~25M + + nrEventTypes := 10_000 // ~2M + nrEOA := 100_000 // ~1M + nrContractAddresses := 10_000 // ~1M + + nrBatchesWithContent := 50 // ~100M + nrReceipts := 10_000 // ~1G if testMode { - nrElem = 1_000_000 - cacheSize = int64(100 * 1024 * 1024) - nrReceiptsToCache = int64(500) + nrReceipts = 500 //~50M } - // the general cache for 50Mil elements, - 2GB - // todo - consider making it fine grained per cache - ristrettoStore := newCache(logger, nrElem, cacheSize) + return &CacheService{ + blockCache: cache.New[*types.Header](newCache(logger, nrL1Blocks, blockHeaderCost)), - // cache the latest received batches to avoid a lookup when streaming it back to the host after processing - nrBatches := int64(50) - ristrettoStoreForBatches := newCache(logger, nrBatches, nrBatches*batchCost) + batchCacheBySeqNo: cache.New[*common.BatchHeader](newCache(logger, nrBatches, batchHeaderCost)), + seqCacheByHash: cache.New[*big.Int](newCache(logger, nrBatches, idCost)), + seqCacheByHeight: cache.New[*big.Int](newCache(logger, nrBatches, idCost)), - ristrettoStoreForReceipts := newCache(logger, nrReceiptsToCache, nrReceiptsToCache*receiptCost) + convertedGethHeaderCache: cache.New[*types.Header](newCache(logger, nrConvertedEth, batchHeaderCost)), + convertedHashCache: cache.New[*gethcommon.Hash](newCache(logger, nrConvertedEth, hashCost)), - return &CacheService{ - blockCache: cache.New[*types.Header](ristrettoStore), - batchCacheBySeqNo: cache.New[*common.BatchHeader](ristrettoStore), - seqCacheByHash: cache.New[*big.Int](ristrettoStore), - seqCacheByHeight: cache.New[*big.Int](ristrettoStore), - convertedHashCache: cache.New[*gethcommon.Hash](ristrettoStore), - eoaCache: cache.New[*uint64](ristrettoStore), - contractAddressCache: cache.New[*enclavedb.Contract](ristrettoStore), - eventTypeCache: cache.New[*enclavedb.EventType](ristrettoStore), - convertedGethHeaderCache: cache.New[*types.Header](ristrettoStore), - - receiptCache: cache.New[*CachedReceipt](ristrettoStoreForReceipts), - lastBatchesCache: cache.New[*core.Batch](ristrettoStoreForBatches), - logger: logger, + eoaCache: cache.New[*uint64](newCache(logger, nrEOA, idCost)), + contractAddressCache: cache.New[*enclavedb.Contract](newCache(logger, nrContractAddresses, contractCost)), + eventTypeCache: cache.New[*enclavedb.EventType](newCache(logger, nrEventTypes, eventTypeCost)), + + receiptCache: cache.New[*CachedReceipt](newCache(logger, nrReceipts, receiptCost)), + + // cache the latest received batches to avoid a lookup when streaming it back to the host after processing + lastBatchesCache: cache.New[*core.Batch](newCache(logger, nrBatchesWithContent, batchCost)), + + logger: logger, } } -func newCache(logger gethlog.Logger, nrElem, capacity int64) *ristretto_store.RistrettoStore { +func newCache(logger gethlog.Logger, nrElem, capacityPerElem int) *ristretto_store.RistrettoStore { ristrettoCache, err := ristretto.NewCache(&ristretto.Config{ - NumCounters: 10 * nrElem, // 10 times the expected elements - MaxCost: capacity, - BufferItems: 64, // number of keys per Get buffer. + NumCounters: int64(10 * nrElem), // 10 times the expected elements + MaxCost: int64(capacityPerElem * nrElem * 2), // calculate the max cost + BufferItems: 64, // number of keys per Get buffer. + Metrics: true, }) if err != nil { logger.Crit("Could not initialise ristretto cache", log.ErrKey, err) @@ -185,7 +189,7 @@ type CachedReceipt struct { } func (cs *CacheService) ReadReceipt(ctx context.Context, txHash gethcommon.Hash) (*CachedReceipt, error) { - return cs.receiptCache.Get(ctx, txHash) + return getCachedValue(ctx, cs.receiptCache, cs.logger, txHash, receiptCost, nil, false) } func (cs *CacheService) ReadEventType(ctx context.Context, contractAddress gethcommon.Address, eventSignature gethcommon.Hash, onCacheMiss func(any) (*enclavedb.EventType, error)) (*enclavedb.EventType, error) { @@ -202,7 +206,10 @@ func (cs *CacheService) ReadConvertedHeader(ctx context.Context, batchHash commo // getCachedValue - returns the cached value for the provided key. If the key is not found, then invoke the 'onCacheMiss' function // which returns the value, and cache it func getCachedValue[V any](ctx context.Context, cache *cache.Cache[*V], logger gethlog.Logger, key any, cost int64, onCacheMiss func(any) (*V, error), cacheIfMissing bool) (*V, error) { - value, err := cache.Get(ctx, key) + value, err := cache.Get(ctx, toString(key)) + if onCacheMiss == nil { + return value, err + } if err != nil || value == nil { // todo metrics for cache misses v, err := onCacheMiss(key) @@ -225,8 +232,35 @@ func cacheValue[V any](ctx context.Context, cache *cache.Cache[*V], logger gethl if v == nil { return } - err := cache.Set(ctx, key, v, store.WithCost(cost)) + err := cache.Set(ctx, toString(key), v, store.WithCost(cost)) if err != nil { logger.Error("Could not store value in cache", log.ErrKey, err) } } + +// ristretto cache works with string keys +// if anything else is presented, it will use MD5 +func toString(key any) string { + switch k := key.(type) { + case string: + return k + case []byte: + return hexutils.BytesToHex(k) + case gethcommon.Hash: + return hexutils.BytesToHex(k.Bytes()) + case gethcommon.Address: + return hexutils.BytesToHex(k.Bytes()) + case uint64, int64, int, uint: + return fmt.Sprint(k) + case *big.Int: + return fmt.Sprint(k) + default: + panic("should not happen. Invalid cache type") + } +} + +//func logCacheMetrics(c *ristretto.Cache, name string, logger gethlog.Logger) { +// metrics := c.Metrics +// logger.Info(fmt.Sprintf("Cache %s metrics: Hits: %d, Misses: %d, Cost Added: %d", +// name, metrics.Hits(), metrics.Misses(), metrics.CostAdded())) +//} diff --git a/tools/walletextension/cache/RistrettoCache.go b/tools/walletextension/cache/RistrettoCache.go index 233d49f64b..6893aac2f8 100644 --- a/tools/walletextension/cache/RistrettoCache.go +++ b/tools/walletextension/cache/RistrettoCache.go @@ -1,6 +1,7 @@ package cache import ( + "fmt" "time" "github.com/ethereum/go-ethereum/log" @@ -81,8 +82,8 @@ func (c *ristrettoCache) startMetricsLogging(logger log.Logger) { select { case <-ticker.C: metrics := c.cache.Metrics - logger.Info("Cache metrics: Hits: %d, Misses: %d, Cost Added: %d\n", - metrics.Hits(), metrics.Misses(), metrics.CostAdded()) + logger.Info(fmt.Sprintf("Cache metrics: Hits: %d, Misses: %d, Cost Added: %d", + metrics.Hits(), metrics.Misses(), metrics.CostAdded())) case <-c.quit: ticker.Stop() return From 663b13f1c18cb70978414988c3359b4df0dc2dce Mon Sep 17 00:00:00 2001 From: badgersrus <43809877+badgersrus@users.noreply.github.com> Date: Thu, 31 Oct 2024 17:00:40 +0100 Subject: [PATCH 17/19] Tweak blob gas pricing and improve debug wallet timeout (#2119) * tweak blob gas pricing and improve timeout on debug wallet --- go/ethadapter/geth_rpc_client.go | 8 +- go/host/l1/publisher.go | 85 ++++++++++--------- .../smartcontract/debug_mgmt_contract_lib.go | 11 +-- integration/smartcontract/debug_wallet.go | 58 +++++-------- .../smartcontract/smartcontracts_test.go | 4 +- 5 files changed, 78 insertions(+), 88 deletions(-) diff --git a/go/ethadapter/geth_rpc_client.go b/go/ethadapter/geth_rpc_client.go index e8233c1646..a9290cad6e 100644 --- a/go/ethadapter/geth_rpc_client.go +++ b/go/ethadapter/geth_rpc_client.go @@ -359,10 +359,14 @@ func (e *gethRPCClient) prepareBlobTxToRetry(ctx context.Context, txData types.T } blobFeeCap := calcBlobFeeCap(blobBaseFee, retryNumber) + baseFee := head.BaseFee + gasFeeCap := new(big.Int).Mul(baseFee, big.NewInt(2)) + gasFeeCap.Add(gasFeeCap, retryPrice) + return &types.BlobTx{ Nonce: nonce, - GasTipCap: uint256.MustFromBig(retryPrice), // aka maxPriorityFeePerGas - GasFeeCap: uint256.MustFromBig(retryPrice), // aka. maxFeePerGas + GasTipCap: uint256.MustFromBig(retryPrice), // maxPriorityFeePerGas + GasFeeCap: uint256.MustFromBig(gasFeeCap), // maxFeePerGas = (baseFee * 2) + maxPriorityFeePerGas Gas: gasLimit, To: *unEstimatedTx.To(), Value: uint256.MustFromBig(value), diff --git a/go/host/l1/publisher.go b/go/host/l1/publisher.go index 47f8a873f9..5675deacaa 100644 --- a/go/host/l1/publisher.go +++ b/go/host/l1/publisher.go @@ -231,55 +231,60 @@ func (p *Publisher) PublishSecretResponse(secretResponse *common.ProducedSecretR // ExtractRelevantTenTransactions will extract any transactions from the block that are relevant to TEN // todo (#2495) we should monitor for relevant L1 events instead of scanning every transaction in the block func (p *Publisher) ExtractRelevantTenTransactions(block *types.Block, receipts types.Receipts) ([]*common.TxAndReceiptAndBlobs, []*ethadapter.L1RollupTx, []*ethadapter.L1SetImportantContractsTx) { - txWithReceiptsAndBlobs := make([]*common.TxAndReceiptAndBlobs, 0) - rollupTxs := make([]*ethadapter.L1RollupTx, 0) - contractAddressTxs := make([]*ethadapter.L1SetImportantContractsTx, 0) - - txs := block.Transactions() - for i, rec := range receipts { - if rec.BlockNumber == nil { - continue // Skip non-relevant transactions - } + // temporarily add this host stopping check to prevent sim test failures until a more robust solution is implemented + for !p.hostStopper.IsStopping() { + txWithReceiptsAndBlobs := make([]*common.TxAndReceiptAndBlobs, 0) + rollupTxs := make([]*ethadapter.L1RollupTx, 0) + contractAddressTxs := make([]*ethadapter.L1SetImportantContractsTx, 0) + + txs := block.Transactions() + for i, rec := range receipts { + if rec.BlockNumber == nil { + continue // Skip non-relevant transactions + } - decodedTx := p.mgmtContractLib.DecodeTx(txs[i]) - var blobs []*kzg4844.Blob - var err error + decodedTx := p.mgmtContractLib.DecodeTx(txs[i]) + var blobs []*kzg4844.Blob + var err error - switch typedTx := decodedTx.(type) { - case *ethadapter.L1SetImportantContractsTx: - contractAddressTxs = append(contractAddressTxs, typedTx) - case *ethadapter.L1RollupHashes: - blobs, err = p.blobResolver.FetchBlobs(p.sendingContext, block.Header(), typedTx.BlobHashes) - if err != nil { - if errors.Is(err, ethereum.NotFound) { - p.logger.Crit("Blobs were not found on beacon chain or archive service", "block", block.Hash(), "error", err) - } else { - p.logger.Crit("could not fetch blobs", log.ErrKey, err) + switch typedTx := decodedTx.(type) { + case *ethadapter.L1SetImportantContractsTx: + contractAddressTxs = append(contractAddressTxs, typedTx) + case *ethadapter.L1RollupHashes: + blobs, err = p.blobResolver.FetchBlobs(p.sendingContext, block.Header(), typedTx.BlobHashes) + // temporarily add this host stopping check to prevent sim test failures until a more robust solution is implemented + if err != nil { + if errors.Is(err, ethereum.NotFound) { + p.logger.Crit("Blobs were not found on beacon chain or archive service", "block", block.Hash(), "error", err) + } else { + p.logger.Crit("could not fetch blobs", log.ErrKey, err) + } + continue } - continue - } - encodedRlp, err := ethadapter.DecodeBlobs(blobs) - if err != nil { - p.logger.Crit("could not decode blobs.", log.ErrKey, err) - continue - } + encodedRlp, err := ethadapter.DecodeBlobs(blobs) + if err != nil { + p.logger.Crit("could not decode blobs.", log.ErrKey, err) + continue + } - rlp := ðadapter.L1RollupTx{ - Rollup: encodedRlp, + rlp := ðadapter.L1RollupTx{ + Rollup: encodedRlp, + } + rollupTxs = append(rollupTxs, rlp) } - rollupTxs = append(rollupTxs, rlp) + + // compile the tx, receipt and blobs into a single struct for submission to the enclave + txWithReceiptsAndBlobs = append(txWithReceiptsAndBlobs, &common.TxAndReceiptAndBlobs{ + Tx: txs[i], + Receipt: rec, + Blobs: blobs, + }) } - // compile the tx, receipt and blobs into a single struct for submission to the enclave - txWithReceiptsAndBlobs = append(txWithReceiptsAndBlobs, &common.TxAndReceiptAndBlobs{ - Tx: txs[i], - Receipt: rec, - Blobs: blobs, - }) + return txWithReceiptsAndBlobs, rollupTxs, contractAddressTxs } - - return txWithReceiptsAndBlobs, rollupTxs, contractAddressTxs + return nil, nil, nil } // FindSecretResponseTx will scan the block for any secret response transactions. This is separate from the above method diff --git a/integration/smartcontract/debug_mgmt_contract_lib.go b/integration/smartcontract/debug_mgmt_contract_lib.go index bab07b5a5c..cf7d29b7ec 100644 --- a/integration/smartcontract/debug_mgmt_contract_lib.go +++ b/integration/smartcontract/debug_mgmt_contract_lib.go @@ -43,19 +43,20 @@ func (d *debugMgmtContractLib) AwaitedIssueRollup(rollup common.ExtRollup, clien } txData, err := d.CreateBlobRollup(ðadapter.L1RollupTx{Rollup: encodedRollup}) if err != nil { - return err + return fmt.Errorf("failed to create blob rollup: %w", err) } issuedTx, receipt, err := w.AwaitedSignAndSendTransaction(client, txData) if err != nil { - return err + return fmt.Errorf("failed to send and await transaction: %w", err) } if receipt.Status != types.ReceiptStatusSuccessful { - _, err := w.debugTransaction(client, issuedTx) - if err != nil { - return fmt.Errorf("transaction should have succeeded, expected %d got %d - reason: %w", types.ReceiptStatusSuccessful, receipt.Status, err) + debugOutput, debugErr := w.debugTransaction(client, issuedTx) + if debugErr != nil { + return fmt.Errorf("transaction failed with status %d and debug failed: %v", receipt.Status, debugErr) } + return fmt.Errorf("transaction failed with status %d: %s", receipt.Status, string(debugOutput)) } // rollup meta data is actually stored diff --git a/integration/smartcontract/debug_wallet.go b/integration/smartcontract/debug_wallet.go index 20941b6bc5..b3c277be19 100644 --- a/integration/smartcontract/debug_wallet.go +++ b/integration/smartcontract/debug_wallet.go @@ -2,79 +2,61 @@ package smartcontract import ( "context" - "errors" "fmt" "time" "github.com/ethereum/go-ethereum" + "github.com/ten-protocol/go-ten/go/common/retry" + "github.com/ethereum/go-ethereum/core/types" "github.com/ten-protocol/go-ten/go/ethadapter" "github.com/ten-protocol/go-ten/go/wallet" ) -var _timeout = 180 * time.Second - // debugWallet is a wrapper around the wallet that simplifies commonly used functions type debugWallet struct { wallet.Wallet + receiptTimeout time.Duration } -// newDebugWallet returns a new debug wrapped wallet -func newDebugWallet(w wallet.Wallet) *debugWallet { - return &debugWallet{w} +func newDebugWallet(w wallet.Wallet, timeout time.Duration) *debugWallet { + return &debugWallet{ + Wallet: w, + receiptTimeout: timeout, + } } // AwaitedSignAndSendTransaction signs a tx, issues the tx and awaits the tx to be minted into a block func (w *debugWallet) AwaitedSignAndSendTransaction(client ethadapter.EthClient, txData types.TxData) (*types.Transaction, *types.Receipt, error) { - var err error - - txData, err = client.PrepareTransactionToSend(context.Background(), txData, w.Address()) + txData, err := client.PrepareTransactionToSend(context.Background(), txData, w.Address()) if err != nil { w.SetNonce(w.GetNonce() - 1) return nil, nil, err } - signedTx, err := w.SignAndSendTransaction(client, txData) - if err != nil { - return nil, nil, err - } - receipt, err := waitTxResult(client, signedTx) - if err != nil { - return nil, nil, err - } - return signedTx, receipt, nil -} -// SignAndSendTransaction signs and sends a tx -func (w *debugWallet) SignAndSendTransaction(client ethadapter.EthClient, txData types.TxData) (*types.Transaction, error) { signedTx, err := w.SignTransaction(txData) if err != nil { - return nil, err + return nil, nil, err } err = client.SendTransaction(signedTx) if err != nil { - return nil, err + return nil, nil, err } - return signedTx, nil -} - -// waitTxResult waits for a tx to be minted into a block -func waitTxResult(client ethadapter.EthClient, tx *types.Transaction) (*types.Receipt, error) { var receipt *types.Receipt - var err error - for start := time.Now(); time.Since(start) < _timeout; time.Sleep(time.Second) { - receipt, err = client.TransactionReceipt(tx.Hash()) + err = retry.Do(func() error { + receipt, err = client.TransactionReceipt(signedTx.Hash()) if err != nil { - if errors.Is(err, ethereum.NotFound) { - continue - } - return nil, err + return err } + if receipt == nil { + return fmt.Errorf("no receipt yet") + } + return nil + }, retry.NewTimeoutStrategy(w.receiptTimeout, time.Second)) - return receipt, nil - } - return nil, fmt.Errorf("transaction not minted after timeout") + return signedTx, receipt, err } func (w *debugWallet) debugTransaction(client ethadapter.EthClient, tx *types.Transaction) ([]byte, error) { diff --git a/integration/smartcontract/smartcontracts_test.go b/integration/smartcontract/smartcontracts_test.go index ad4d050d80..8914d96357 100644 --- a/integration/smartcontract/smartcontracts_test.go +++ b/integration/smartcontract/smartcontracts_test.go @@ -86,15 +86,13 @@ func runGethNetwork(t *testing.T) *netInfo { } func TestManagementContract(t *testing.T) { - t.Skip("Skipping as it's too flaky.") - // run tests on one network sim := runGethNetwork(t) defer sim.eth2Network.Stop() //nolint: errcheck // set up the client and the (debug) wallet client := sim.ethClients[0] - w := newDebugWallet(sim.wallets[0]) + w := newDebugWallet(sim.wallets[0], 30*time.Second) for name, test := range map[string]func(*testing.T, *debugMgmtContractLib, *debugWallet, ethadapter.EthClient){ "secretCannotBeInitializedTwice": secretCannotBeInitializedTwice, From 4c162f249c166c638135166a27fba7091eb8d945 Mon Sep 17 00:00:00 2001 From: Tudor Malene Date: Fri, 1 Nov 2024 09:47:08 +0000 Subject: [PATCH 18/19] upgrade dependencies (#2121) --- go.mod | 98 +++++++++++++------------ go.sum | 224 ++++++++++++++++++++++++++------------------------------- 2 files changed, 149 insertions(+), 173 deletions(-) diff --git a/go.mod b/go.mod index e7c7715b16..fd84e92bd0 100644 --- a/go.mod +++ b/go.mod @@ -5,103 +5,103 @@ go 1.21.11 replace github.com/docker/docker => github.com/docker/docker v20.10.3-0.20220224222438-c78f6963a1c0+incompatible require ( - github.com/FantasyJony/openzeppelin-merkle-tree-go v1.1.2 + github.com/FantasyJony/openzeppelin-merkle-tree-go v1.1.3 github.com/Microsoft/go-winio v0.6.2 - github.com/andybalholm/brotli v1.1.0 + github.com/andybalholm/brotli v1.1.1 github.com/codeclysm/extract/v3 v3.1.1 github.com/deckarep/golang-set/v2 v2.6.0 - github.com/dgraph-io/ristretto v0.1.1 + github.com/dgraph-io/ristretto v0.2.0 github.com/docker/docker v25.0.4+incompatible github.com/docker/go-connections v0.5.0 - github.com/edgelesssys/ego v1.5.3 - github.com/eko/gocache/lib/v4 v4.1.5 + github.com/edgelesssys/ego v1.6.0 + github.com/eko/gocache/lib/v4 v4.1.6 github.com/eko/gocache/store/ristretto/v4 v4.2.1 github.com/ethereum/go-ethereum v1.14.6 github.com/fjl/memsize v0.0.2 - github.com/gin-contrib/cors v1.7.0 - github.com/gin-gonic/gin v1.9.1 + github.com/gin-contrib/cors v1.7.2 + github.com/gin-gonic/gin v1.10.0 github.com/go-kit/kit v0.13.0 github.com/go-sql-driver/mysql v1.8.1 - github.com/gofrs/flock v0.8.1 + github.com/gofrs/flock v0.12.0 github.com/golang-jwt/jwt v3.2.2+incompatible github.com/golang-jwt/jwt/v4 v4.5.0 github.com/google/uuid v1.6.0 - github.com/gorilla/websocket v1.5.1 + github.com/gorilla/websocket v1.5.3 github.com/hashicorp/go-bexpr v0.1.14 github.com/hashicorp/golang-lru/v2 v2.0.7 - github.com/holiman/uint256 v1.2.4 + github.com/holiman/uint256 v1.3.1 github.com/jolestar/go-commons-pool/v2 v2.1.2 github.com/lib/pq v1.10.9 github.com/mattn/go-colorable v0.1.13 github.com/mattn/go-isatty v0.0.20 - github.com/mattn/go-sqlite3 v1.14.22 + github.com/mattn/go-sqlite3 v1.14.24 github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 github.com/pkg/errors v0.9.1 - github.com/rs/cors v1.10.1 + github.com/rs/cors v1.11.1 github.com/sanity-io/litter v1.5.5 github.com/status-im/keycard-go v0.3.2 github.com/stretchr/testify v1.9.0 - github.com/tidwall/gjson v1.17.1 - github.com/urfave/cli/v2 v2.27.1 - github.com/valyala/fasthttp v1.52.0 + github.com/tidwall/gjson v1.18.0 + github.com/urfave/cli/v2 v2.27.5 + github.com/valyala/fasthttp v1.57.0 gitlab.com/NebulousLabs/fastrand v0.0.0-20181126182046-603482d69e40 - golang.org/x/crypto v0.26.0 + golang.org/x/crypto v0.28.0 golang.org/x/exp v0.0.0-20240318143956-a85f2c67cd81 golang.org/x/sync v0.8.0 google.golang.org/grpc v1.67.1 - google.golang.org/protobuf v1.34.2 + google.golang.org/protobuf v1.35.1 gopkg.in/natefinch/lumberjack.v2 v2.2.1 ) require ( filippo.io/edwards25519 v1.1.0 // indirect github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect - github.com/DataDog/zstd v1.5.5 // indirect + github.com/DataDog/zstd v1.5.6 // indirect github.com/VictoriaMetrics/fastcache v1.12.2 // indirect github.com/allegro/bigcache v1.2.1 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/bits-and-blooms/bitset v1.13.0 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/bits-and-blooms/bitset v1.14.3 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect - github.com/bytedance/sonic v1.11.3 // indirect + github.com/bytedance/sonic v1.12.3 // indirect + github.com/bytedance/sonic/loader v0.2.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect - github.com/chenzhuoyu/iasm v0.9.1 // indirect + github.com/cloudwego/base64x v0.1.4 // indirect + github.com/cloudwego/iasm v0.2.0 // indirect github.com/cockroachdb/errors v1.11.3 // indirect - github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect + github.com/cockroachdb/fifo v0.0.0-20240816210425-c5d0cb0b6fc0 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v1.1.1 // indirect + github.com/cockroachdb/pebble v1.1.2 // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/consensys/bavard v0.1.13 // indirect - github.com/consensys/gnark-crypto v0.12.1 // indirect + github.com/consensys/gnark-crypto v0.13.0 // indirect github.com/containerd/containerd v1.7.14 // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect - github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c // indirect - github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect + github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect + github.com/crate-crypto/go-kzg-4844 v1.1.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect github.com/distribution/reference v0.5.0 // indirect github.com/docker/distribution v2.8.3+incompatible // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/ethereum/c-kzg-4844 v1.0.0 // indirect + github.com/ethereum/c-kzg-4844 v1.0.3 // indirect github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/gabriel-vasile/mimetype v1.4.3 // indirect + github.com/gabriel-vasile/mimetype v1.4.6 // indirect github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect github.com/getsentry/sentry-go v0.27.0 // indirect github.com/gin-contrib/sse v0.1.0 // indirect - github.com/go-jose/go-jose/v4 v4.0.2 // indirect + github.com/go-jose/go-jose/v4 v4.0.4 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.19.0 // indirect - github.com/goccy/go-json v0.10.2 // indirect + github.com/go-playground/validator/v10 v10.22.1 // indirect + github.com/goccy/go-json v0.10.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.2.2 // indirect github.com/golang/mock v1.6.0 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/gorilla/mux v1.8.1 // indirect @@ -111,10 +111,9 @@ require ( github.com/huin/goupnp v1.3.0 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5 // indirect - github.com/juju/loggo v1.0.0 // indirect - github.com/klauspost/compress v1.17.7 // indirect - github.com/klauspost/cpuid/v2 v2.2.7 // indirect + github.com/juju/errors v1.0.0 // indirect + github.com/klauspost/compress v1.17.11 // indirect + github.com/klauspost/cpuid/v2 v2.2.8 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect @@ -130,7 +129,7 @@ require ( github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/pelletier/go-toml/v2 v2.2.3 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect @@ -142,7 +141,7 @@ require ( github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/stretchr/objx v0.5.2 // indirect - github.com/supranational/blst v0.3.11 // indirect + github.com/supranational/blst v0.3.13 // indirect github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect @@ -151,16 +150,15 @@ require ( github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/tyler-smith/go-bip39 v1.1.0 // indirect github.com/ugorji/go/codec v1.2.12 // indirect - github.com/ulikunitz/xz v0.5.11 // indirect + github.com/ulikunitz/xz v0.5.12 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect - github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect + github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - golang.org/x/arch v0.7.0 // indirect - golang.org/x/net v0.28.0 // indirect - golang.org/x/sys v0.24.0 // indirect - golang.org/x/text v0.17.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect - gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect + golang.org/x/arch v0.11.0 // indirect + golang.org/x/net v0.30.0 // indirect + golang.org/x/sys v0.26.0 // indirect + golang.org/x/text v0.19.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.1 // indirect rsc.io/tmplfunc v0.0.3 // indirect diff --git a/go.sum b/go.sum index 552abd901c..3f0eed559d 100644 --- a/go.sum +++ b/go.sum @@ -2,10 +2,10 @@ filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= -github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/FantasyJony/openzeppelin-merkle-tree-go v1.1.2 h1:oZixv5U6eReqc1COEtng6/bVdAOAAWgtf38Ngn9Squc= -github.com/FantasyJony/openzeppelin-merkle-tree-go v1.1.2/go.mod h1:OiwyYqbtMkQH+VzA4b8lI+qHnExJy0fIdz+59/8nFes= +github.com/DataDog/zstd v1.5.6 h1:LbEglqepa/ipmmQJUDnSsfvA8e8IStVcGaFWDuxvGOY= +github.com/DataDog/zstd v1.5.6/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/FantasyJony/openzeppelin-merkle-tree-go v1.1.3 h1:KzMvCFet0baw6uJnxTE/His8YeRgaxlASd4/ISuTvzI= +github.com/FantasyJony/openzeppelin-merkle-tree-go v1.1.3/go.mod h1:OiwyYqbtMkQH+VzA4b8lI+qHnExJy0fIdz+59/8nFes= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/VictoriaMetrics/fastcache v1.12.2 h1:N0y9ASrJ0F6h0QaC3o6uJb3NIZ9VKLjCM7NQbSmF7WI= @@ -13,45 +13,42 @@ github.com/VictoriaMetrics/fastcache v1.12.2/go.mod h1:AmC+Nzz1+3G2eCPapF6UcsnkT github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/allegro/bigcache v1.2.1 h1:hg1sY1raCwic3Vnsvje6TT7/pnZba83LeFck5NrFKSc= github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= -github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M= -github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY= +github.com/andybalholm/brotli v1.1.1 h1:PR2pgnyFznKEugtsUo0xLdDop5SKXd5Qf5ysW+7XdTA= +github.com/andybalholm/brotli v1.1.1/go.mod h1:05ib4cKhjx3OQYUY22hTVd34Bc8upXjOLL2rKwwZBoA= github.com/arduino/go-paths-helper v1.2.0 h1:qDW93PR5IZUN/jzO4rCtexiwF8P4OIcOmcSgAYLZfY4= github.com/arduino/go-paths-helper v1.2.0/go.mod h1:HpxtKph+g238EJHq4geEPv9p+gl3v5YYu35Yb+w31Ck= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bits-and-blooms/bitset v1.13.0 h1:bAQ9OPNFYbGHV6Nez0tmNI0RiEu7/hxlYJRUA0wFAVE= -github.com/bits-and-blooms/bitset v1.13.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= -github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= -github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/bits-and-blooms/bitset v1.14.3 h1:Gd2c8lSNf9pKXom5JtD7AaKO8o7fGQ2LtFj1436qilA= +github.com/bits-and-blooms/bitset v1.14.3/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurTXGPFfiQ= +github.com/btcsuite/btcd/btcec/v2 v2.3.4/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 h1:59Kx4K6lzOW5w6nFlA0v5+lk/6sjybR934QNHSJZPTQ= github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= -github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= -github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM= -github.com/bytedance/sonic v1.11.3 h1:jRN+yEjakWh8aK5FzrciUHG8OFXK+4/KrAX/ysEtHAA= -github.com/bytedance/sonic v1.11.3/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4= +github.com/bytedance/sonic v1.12.3 h1:W2MGa7RCU1QTeYRTPE3+88mVC0yXmsRQRChiyVocVjU= +github.com/bytedance/sonic v1.12.3/go.mod h1:B8Gt/XvtZ3Fqj+iSKMypzymZxw/FVwgIGKzMzT9r/rk= +github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= +github.com/bytedance/sonic/loader v0.2.1 h1:1GgorWTqf12TA8mma4DDSbaQigE2wOgQo7iCjjJv3+E= +github.com/bytedance/sonic/loader v0.2.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= -github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= -github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0= -github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA= -github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= -github.com/chenzhuoyu/iasm v0.9.1 h1:tUHQJXo3NhBqw6s33wkGn9SP3bvrWLdlVIJ3hQBL7P0= -github.com/chenzhuoyu/iasm v0.9.1/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= +github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= +github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= +github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= +github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= -github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= -github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= +github.com/cockroachdb/fifo v0.0.0-20240816210425-c5d0cb0b6fc0 h1:pU88SPhIFid6/k0egdR5V6eALQYq2qbSmukrkgIh/0A= +github.com/cockroachdb/fifo v0.0.0-20240816210425-c5d0cb0b6fc0/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v1.1.1 h1:XnKU22oiCLy2Xn8vp1re67cXg4SAasg/WDt1NtcRFaw= -github.com/cockroachdb/pebble v1.1.1/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= +github.com/cockroachdb/pebble v1.1.2 h1:CUh2IPtR4swHlEj48Rhfzw6l/d0qA31fItcIszQVIsA= +github.com/cockroachdb/pebble v1.1.2/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= @@ -60,16 +57,16 @@ github.com/codeclysm/extract/v3 v3.1.1 h1:iHZtdEAwSTqPrd+1n4jfhr1qBhUWtHlMTjT90+ github.com/codeclysm/extract/v3 v3.1.1/go.mod h1:ZJi80UG2JtfHqJI+lgJSCACttZi++dHxfWuPaMhlOfQ= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= -github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= -github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= +github.com/consensys/gnark-crypto v0.13.0 h1:VPULb/v6bbYELAPTDFINEVaMTTybV5GLxDdcjnS+4oc= +github.com/consensys/gnark-crypto v0.13.0/go.mod h1:wKqwsieaKPThcFkHe0d0zMsbHEUWFmZcG7KBCse210o= github.com/containerd/containerd v1.7.14 h1:H/XLzbnGuenZEGK+v0RkwTdv2u1QFAruMe5N0GNPJwA= github.com/containerd/containerd v1.7.14/go.mod h1:YMC9Qt5yzNqXx/fO4j/5yYVIHXSRrlB3H7sxkUTvspg= -github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= -github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c h1:uQYC5Z1mdLRPrZhHjHxufI8+2UG/i25QG92j0Er9p6I= -github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= -github.com/crate-crypto/go-kzg-4844 v1.0.0 h1:TsSgHwrkTKecKJ4kadtHi4b3xHW5dCFUDFnUp1TsawI= -github.com/crate-crypto/go-kzg-4844 v1.0.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= +github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc= +github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a h1:W8mUrRp6NOVl3J+MYp5kPMoUZPp7aOYHtaua31lwRHg= +github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a/go.mod h1:sTwzHBvIzm2RfVCGNEBZgRyjwK40bVoun3ZnGOCafNM= +github.com/crate-crypto/go-kzg-4844 v1.1.0 h1:EN/u9k2TF6OWSHrCCDBBU6GLNMq88OspHHlMnHfoyU4= +github.com/crate-crypto/go-kzg-4844 v1.1.0/go.mod h1:JolLjpSff1tCCJKaJx4psrlEdlXuJEC996PL3tTAFks= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -79,12 +76,12 @@ github.com/deckarep/golang-set/v2 v2.6.0 h1:XfcQbWM1LlMB8BsJ8N9vW5ehnnPVIw0je80N github.com/deckarep/golang-set/v2 v2.6.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= -github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= -github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnNEcHYvcCuK6dPZSg= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= +github.com/dgraph-io/ristretto v0.2.0 h1:XAfl+7cmoUDWW/2Lx8TGZQjjxIQ2Ley9DSf52dru4WE= +github.com/dgraph-io/ristretto v0.2.0/go.mod h1:8uBHCU/PBV4Ag0CJrP47b9Ofby5dqWNh4FicAdoqFNU= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= @@ -95,17 +92,16 @@ github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/edgelesssys/ego v1.5.3 h1:Ec8lAjGQnKT9s+4U4o+AdSp2tYH5JN99cJMnNAfMEuU= -github.com/edgelesssys/ego v1.5.3/go.mod h1:xpgzdPWmxBGeF/d6X3Nk78hSjUfW6f05X28/jkXLRzE= -github.com/eko/gocache/lib/v4 v4.1.5 h1:CeMQmdIzwBKKLRjk3FCDXzNFsQTyqJ01JLI7Ib0C9r8= -github.com/eko/gocache/lib/v4 v4.1.5/go.mod h1:XaNfCwW8KYW1bRZ/KoHA1TugnnkMz0/gT51NDIu7LSY= +github.com/edgelesssys/ego v1.6.0 h1:QfArp8vUwsH1G4966ZQv5i3f1BxsbIP2uOKkIGjsGyQ= +github.com/edgelesssys/ego v1.6.0/go.mod h1:XAej1u86vecy/UYGxMxDP37LTHTPC3/7cbqNodwcTXE= +github.com/eko/gocache/lib/v4 v4.1.6 h1:5WWIGISKhE7mfkyF+SJyWwqa4Dp2mkdX8QsZpnENqJI= +github.com/eko/gocache/lib/v4 v4.1.6/go.mod h1:HFxC8IiG2WeRotg09xEnPD72sCheJiTSr4Li5Ameg7g= github.com/eko/gocache/store/ristretto/v4 v4.2.1 h1:xB5E1LP1gh8yUV1G3KVRSL4T0OTnxp4OixuTljn2848= github.com/eko/gocache/store/ristretto/v4 v4.2.1/go.mod h1:KyshDyWQqfSVrg2rH06fFQZTj6vG2fxlY7oAW9oxNHY= -github.com/ethereum/c-kzg-4844 v1.0.0 h1:0X1LBXxaEtYD9xsyj9B9ctQEZIpnvVDeoBx8aHEwTNA= -github.com/ethereum/c-kzg-4844 v1.0.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= +github.com/ethereum/c-kzg-4844 v1.0.3 h1:IEnbOHwjixW2cTvKRUlAAUOeleV7nNM/umJR+qy4WDs= +github.com/ethereum/c-kzg-4844 v1.0.3/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/ethereum/go-ethereum v1.14.6 h1:ZTxnErSopkDyxdvB8zW/KcK+/AVrdil/TzoWXVKaaC8= github.com/ethereum/go-ethereum v1.14.6/go.mod h1:hglUZo/5pVIYXNyYjWzsAUDpT/zI+WbWo/Nih7ot+G0= github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 h1:KrE8I4reeVvf7C1tm8elRjj4BdscTYzz/WAbYyf/JI4= @@ -118,22 +114,22 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0= -github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk= +github.com/gabriel-vasile/mimetype v1.4.6 h1:3+PzJTKLkvgjeTbts6msPJt4DixhT4YtFNf1gtGe3zc= +github.com/gabriel-vasile/mimetype v1.4.6/go.mod h1:JX1qVKqZd40hUPpAfiNTe0Sne7hdfKSbOqqmkq8GCXc= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 h1:f6D9Hr8xV8uYKlyuj8XIruxlh9WjVjdh1gIicAS7ays= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= -github.com/gin-contrib/cors v1.7.0 h1:wZX2wuZ0o7rV2/1i7gb4Jn+gW7HBqaP91fizJkBUJOA= -github.com/gin-contrib/cors v1.7.0/go.mod h1:cI+h6iOAyxKRtUtC6iF/Si1KSFvGm/gK+kshxlCi8ro= +github.com/gin-contrib/cors v1.7.2 h1:oLDHxdg8W/XDoN/8zamqk/Drgt4oVZDvaV0YmvVICQw= +github.com/gin-contrib/cors v1.7.2/go.mod h1:SUJVARKgQ40dmrzgXEVxj2m7Ig1v1qIboQkPDTQ9t2E= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= -github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= +github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU= +github.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= -github.com/go-jose/go-jose/v4 v4.0.2 h1:R3l3kkBds16bO7ZFAEEcofK0MkrAJt3jlJznWZG0nvk= -github.com/go-jose/go-jose/v4 v4.0.2/go.mod h1:WVf9LFMHh/QVrmqrOfqun0C45tMe3RoiKJMPvgWwLfY= +github.com/go-jose/go-jose/v4 v4.0.4 h1:VsjPI33J0SB9vQM6PLmNjoHqMQNGPiZ0rHL7Ni7Q6/E= +github.com/go-jose/go-jose/v4 v4.0.4/go.mod h1:NKb5HO1EZccyMpiZNbdUw/14tiXNyUJh188dfnMCAfc= github.com/go-kit/kit v0.13.0 h1:OoneCcHKHQ03LfBpoQCUfCluwd2Vt3ohz+kvbJneZAU= github.com/go-kit/kit v0.13.0/go.mod h1:phqEHMMUbyrCFCTgH48JueqrM3md2HcAZ8N3XE4FKDg= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= @@ -149,23 +145,20 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.19.0 h1:ol+5Fu+cSq9JD7SoSqe04GMI92cbn0+wvQ3bZ8b/AU4= -github.com/go-playground/validator/v10 v10.19.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= +github.com/go-playground/validator/v10 v10.22.1 h1:40JcKH+bBNGFczGuoBYgX4I6m/i27HYW8P9FDk5PbgA= +github.com/go-playground/validator/v10 v10.22.1/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= -github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= -github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= -github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= +github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/gofrs/flock v0.12.0 h1:xHW8t8GPAiGtqz7KxiSqfOEXwpOaqhpYZrTE2MQBgXY= +github.com/gofrs/flock v0.12.0/go.mod h1:FirDy1Ing0mI2+kB6wk+vyyAH+e6xiE+EYA0jnzV9jc= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.2 h1:1+mZ9upx1Dh6FmUTFR1naJ77miKiXgALjWOZ3NVFPmY= -github.com/golang/glog v1.2.2/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -191,8 +184,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= -github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= -github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/h2non/filetype v1.1.3 h1:FKkx9QbD7HR/zjK1Ia5XiBsq9zdLi5Kf3zGyFTAFkGg= github.com/h2non/filetype v1.1.3/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY= github.com/hashicorp/go-bexpr v0.1.14 h1:uKDeyuOhWhT1r5CiMTjdVY4Aoxdxs6EtwgTGnlosyp4= @@ -203,8 +196,8 @@ github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 h1:X4egAf/gcS1zATw6w github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= -github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= -github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= +github.com/holiman/uint256 v1.3.1 h1:JfTzmih28bittyHM8z360dCjIA9dbPIBlcTI6lmctQs= +github.com/holiman/uint256 v1.3.1/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= @@ -214,20 +207,15 @@ github.com/jolestar/go-commons-pool/v2 v2.1.2 h1:E+XGo58F23t7HtZiC/W6jzO2Ux2IccS github.com/jolestar/go-commons-pool/v2 v2.1.2/go.mod h1:r4NYccrkS5UqP1YQI1COyTZ9UjPJAAGTUxzcsK1kqhY= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a/go.mod h1:UJSiEoRfvx3hP73CvoARgeLjaIOjybY9vj8PUPPFGeU= -github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5 h1:rhqTjzJlm7EbkELJDKMTU7udov+Se0xZkWmugr6zGok= -github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= -github.com/juju/loggo v1.0.0 h1:Y6ZMQOGR9Aj3BGkiWx7HBbIx6zNwNkxhVNOHU2i1bl0= -github.com/juju/loggo v1.0.0/go.mod h1:NIXFioti1SmKAlKNuUwbMenNdef59IF52+ZzuOmHYkg= -github.com/juju/testing v0.0.0-20200510222523-6c8c298c77a0 h1:+WWUkhnTjV6RNOxkcwk79qrjeyHEHvBzlneueBsatX4= -github.com/juju/testing v0.0.0-20200510222523-6c8c298c77a0/go.mod h1:hpGvhGHPVbNBraRLZEhoQwFLMrjK8PSlO4D3nDjKYXo= +github.com/juju/errors v1.0.0 h1:yiq7kjCLll1BiaRuNY53MGI0+EQ3rF6GB+wvboZDefM= +github.com/juju/errors v1.0.0/go.mod h1:B5x9thDqx0wIMH3+aLIMP9HjItInYWObRovoCFM5Qe8= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= -github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= +github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= -github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM= +github.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -241,19 +229,16 @@ github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lunixbochs/vtclean v0.0.0-20160125035106-4fbf7632a2c6/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= -github.com/mattn/go-colorable v0.0.6/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.0-20160806122752-66b8e73f3f5c/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= -github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= +github.com/mattn/go-sqlite3 v1.14.24 h1:tpSp2G2KyMnnQu99ngJ47EIkWVmliIizyZBfPrBWDRM= +github.com/mattn/go-sqlite3 v1.14.24/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= @@ -290,8 +275,8 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= +github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -314,8 +299,8 @@ github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUc github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= -github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= -github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sanity-io/litter v1.5.5 h1:iE+sBxPBzoK6uaEP5Lt3fHNgpKcHXc/A2HGETy0uJQo= @@ -333,20 +318,18 @@ github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v0.0.0-20161117074351-18a02ba4a312/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= -github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= +github.com/supranational/blst v0.3.13 h1:AYeSxdOMacwu7FBmpfloBz5pbFXDmJL33RuwnKtmTjk= +github.com/supranational/blst v0.3.13/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= 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/tidwall/gjson v1.17.1 h1:wlYEnwqAHgzmhNUFfw7Xalt2JzQvsMx2Se4PcoFCT/U= -github.com/tidwall/gjson v1.17.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= +github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= @@ -362,16 +345,18 @@ github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2n github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= -github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= -github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho= -github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= +github.com/ulikunitz/xz v0.5.12 h1:37Nm15o69RwBkXM0J6A5OlE67RZTfzUxTj8fB3dfcsc= +github.com/ulikunitz/xz v0.5.12/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/urfave/cli/v2 v2.27.5 h1:WoHEJLdsXr6dDWoJgMq/CboDmyY/8HMMH1fTECbih+w= +github.com/urfave/cli/v2 v2.27.5/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ= 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/fasthttp v1.52.0 h1:wqBQpxH71XW0e2g+Og4dzQM8pk34aFYlA1Ga8db7gU0= -github.com/valyala/fasthttp v1.52.0/go.mod h1:hf5C4QnVMkNXMspnsUlfM3WitlgYflyhHYoKol/szxQ= -github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 h1:+qGGcbkzsfDQNPPe9UDgpxAWQrhbbBXOYJFQDq/dtJw= -github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913/go.mod h1:4aEEwZQutDLsQv2Deui4iYQ6DWTxR14g6m8Wv88+Xqk= +github.com/valyala/fasthttp v1.57.0 h1:Xw8SjWGEP/+wAAgyy5XTvgrWlOD1+TxbbvNADYCm1Tg= +github.com/valyala/fasthttp v1.57.0/go.mod h1:h6ZBaPRlzpZ6O3H5t2gEk1Qi33+TmLvfwgLLp0t9CpE= +github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4= +github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM= +github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU= +github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= @@ -379,14 +364,13 @@ github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= gitlab.com/NebulousLabs/fastrand v0.0.0-20181126182046-603482d69e40 h1:dizWJqTWjwyD8KGcMOwgrkqu1JIkofYgKkmDeNE7oAs= gitlab.com/NebulousLabs/fastrand v0.0.0-20181126182046-603482d69e40/go.mod h1:rOnSnoRyxMI3fe/7KIbVcsHRGxe30OONv8dEgo+vCfA= -golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/arch v0.7.0 h1:pskyeJh/3AmoQ8CPE95vxHLqp1G1GfGNXTmcl9NEKTc= -golang.org/x/arch v0.7.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= +golang.org/x/arch v0.11.0 h1:KXV8WWKCXm6tRpLirl2szsO5j/oOODwZf4hATmGVNs4= +golang.org/x/arch v0.11.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= -golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= +golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= +golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= golang.org/x/exp v0.0.0-20240318143956-a85f2c67cd81 h1:6R2FC06FonbXQ8pK11/PDFY6N6LWlf9KlzibaCapmqc= golang.org/x/exp v0.0.0-20240318143956-a85f2c67cd81/go.mod h1:CQ1k9gNrJ50XIzaKCRR2hssIjF07kZFEiieALBM/ARQ= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -400,8 +384,8 @@ golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= -golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= +golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -426,19 +410,18 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= -golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 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.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= -golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= +golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -451,8 +434,8 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 h1:zciRKQ4kBpFgpfC5QQCVtnnNAcLIqweL7plyZRQHVpI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -461,20 +444,16 @@ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20160105164936-4f90aeace3a2/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 h1:VpOs+IwYnYBaFnrNAeB8UUWtL3vEUnzSCL1nVjPhqrw= -gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -485,6 +464,5 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= From a98ee3dd1b2cb1e621d8ca44b4c5eae25e40092b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=BDiga=20Kokelj?= Date: Mon, 4 Nov 2024 08:52:22 +0100 Subject: [PATCH 19/19] log local testnet gateway logs to file (#2118) --- testnet/docker-compose.local.yml | 12 +++---- testnet/launcher/gateway/docker.go | 2 +- testnet/testnet-local-build_images.sh | 2 +- tools/walletextension/Dockerfile | 51 --------------------------- 4 files changed, 8 insertions(+), 59 deletions(-) delete mode 100644 tools/walletextension/Dockerfile diff --git a/testnet/docker-compose.local.yml b/testnet/docker-compose.local.yml index 6acf1355b9..3205da76ee 100644 --- a/testnet/docker-compose.local.yml +++ b/testnet/docker-compose.local.yml @@ -19,11 +19,11 @@ services: dockerfile: ./dockerfiles/enclave.Dockerfile args: TESTMODE: true -# enclave-debug: -# image: "testnetobscuronet.azurecr.io/obscuronet/enclave_debug:latest" -# build: -# context: $ROOT_PATH -# dockerfile: ./dockerfiles/enclave.debug.Dockerfile + # enclave-debug: + # image: "testnetobscuronet.azurecr.io/obscuronet/enclave_debug:latest" + # build: + # context: $ROOT_PATH + # dockerfile: ./dockerfiles/enclave.debug.Dockerfile ten-scan: image: "testnetobscuronet.azurecr.io/obscuronet/tenscan:latest" build: @@ -38,7 +38,7 @@ services: image: "testnetobscuronet.azurecr.io/obscuronet/obscuro_gateway:latest" build: context: $ROOT_PATH - dockerfile: ./tools/walletextension/Dockerfile + dockerfile: ./tools/walletextension/enclave.Dockerfile faucet: image: "testnetobscuronet.azurecr.io/obscuronet/faucet:latest" build: diff --git a/testnet/launcher/gateway/docker.go b/testnet/launcher/gateway/docker.go index b9dc38c397..0fe5a85c0e 100644 --- a/testnet/launcher/gateway/docker.go +++ b/testnet/launcher/gateway/docker.go @@ -24,7 +24,7 @@ func (n *DockerGateway) Start() error { fmt.Printf("Starting gateway with config: \n%s\n\n", litter.Sdump(*n.cfg)) cmds := []string{ - "/home/obscuro/go-obscuro/tools/walletextension/bin/wallet_extension_linux", + "ego", "run", "/home/ten/go-ten/tools/walletextension/main/main", "--host", "0.0.0.0", "--port", fmt.Sprintf("%d", n.cfg.gatewayHTTPPort), "--portWS", fmt.Sprintf("%d", n.cfg.gatewayWSPort), diff --git a/testnet/testnet-local-build_images.sh b/testnet/testnet-local-build_images.sh index 1b65be1a6e..99c404a4fe 100755 --- a/testnet/testnet-local-build_images.sh +++ b/testnet/testnet-local-build_images.sh @@ -50,7 +50,7 @@ command docker build -t testnetobscuronet.azurecr.io/obscuronet/enclave:latest - #command docker build -t testnetobscuronet.azurecr.io/obscuronet/enclave_debug:latest -f "${root_path}/dockerfiles/enclave.debug.Dockerfile" "${root_path}" & command docker build -t testnetobscuronet.azurecr.io/obscuronet/tenscan:latest -f "${tools_path}/tenscan/Dockerfile" "${root_path}" & command docker build -t testnetobscuronet.azurecr.io/obscuronet/faucet:latest -f "${tools_path}/faucet/Dockerfile" "${root_path}" & -command docker build -t testnetobscuronet.azurecr.io/obscuronet/obscuro_gateway:latest -f "${tools_path}/walletextension/Dockerfile" "${root_path}" & +#command docker build -t testnetobscuronet.azurecr.io/obscuronet/obscuro_gateway:latest -f "${tools_path}/walletextension/enclave.Dockerfile" "${root_path}" & wait diff --git a/tools/walletextension/Dockerfile b/tools/walletextension/Dockerfile deleted file mode 100644 index 5a25543b06..0000000000 --- a/tools/walletextension/Dockerfile +++ /dev/null @@ -1,51 +0,0 @@ -## Build Stages: -# system = prepares the "OS" by downloading required binaries -# get-dependencies = downloads the go modules using the prepared system -# build-wallet = copies over the source code and builds the binaries using a compiler cache -# final = copies over only the executables in an alpine image that doesn't have any additional load. - -FROM golang:1.22.1-alpine3.19 as system - -# set the base libs to build / run -RUN apk add build-base bash git -ENV CGO_ENABLED=1 -ARG TESTNET_TYPE - -# Standard build stage that initializes the go dependencies -FROM system as get-dependencies -# create the base directory -# setup container data structure -RUN mkdir -p /home/obscuro/go-obscuro - - -# Ensures container layer caching when dependencies are not changed -WORKDIR /home/obscuro/go-obscuro -COPY go.mod . -COPY go.sum . -RUN go mod download - -# Build stage that will create a wallet extension executable -FROM get-dependencies as build-wallet -# make sure the geth network code is available -COPY . /home/obscuro/go-obscuro - -# build the gateway executable -WORKDIR /home/obscuro/go-obscuro/tools/walletextension/main -RUN --mount=type=cache,target=/root/.cache/go-build \ - go build -o ../bin/wallet_extension_linux - -# Lightweight final build stage. Includes bare minimum to start wallet extension -FROM alpine:3.18 - -# copy over the gateway executable -COPY --from=build-wallet /home/obscuro/go-obscuro/tools/walletextension/bin /home/obscuro/go-obscuro/tools/walletextension/bin - -# copy over the .sql migration files -COPY --from=build-wallet /home/obscuro/go-obscuro/tools/walletextension/storage/database /home/obscuro/go-obscuro/tools/walletextension/storage/database - -# copy over the entrypoint script -COPY --from=build-wallet /home/obscuro/go-obscuro/tools/walletextension/entrypoint.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh - -ENTRYPOINT ["/entrypoint.sh"] -