diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index c5142d4c..8644435c 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -13,16 +13,16 @@ jobs: name: golangci linter runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: 1.20.5 + go-version: 1.23.6 cache: false - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. - version: v1.54.2 + version: v1.64.5 # Optional: working directory, useful for monorepos # working-directory: somedir diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index 42dedd2b..648920c9 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -13,13 +13,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up Go 1.x - uses: actions/setup-go@v2 + uses: actions/setup-go@v5 with: - go-version: ^1.17.6 + go-version: 1.23.6 id: go - name: Check out code into the Go module directory - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Get dependencies run: | diff --git a/.github/workflows/pr-integration-tests.yml b/.github/workflows/pr-integration-tests.yml index 938514b9..5043c9d2 100644 --- a/.github/workflows/pr-integration-tests.yml +++ b/.github/workflows/pr-integration-tests.yml @@ -12,13 +12,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up Go 1.x - uses: actions/setup-go@v2 + uses: actions/setup-go@v5 with: - go-version: ^1.17.6 + go-version: 1.23.6 id: go - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Get dependencies run: | @@ -30,13 +30,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up Go 1.x - uses: actions/setup-go@v2 + uses: actions/setup-go@v5 with: - go-version: ^1.17.6 + go-version: 1.23.6 id: go - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Get dependencies run: | @@ -48,13 +48,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up Go 1.x - uses: actions/setup-go@v2 + uses: actions/setup-go@v5 with: - go-version: ^1.15.6 + go-version: 1.23.6 id: go - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Get dependencies run: | @@ -66,13 +66,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up Go 1.x - uses: actions/setup-go@v2 + uses: actions/setup-go@v5 with: - go-version: ^1.15.6 + go-version: 1.23.6 id: go - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Get dependencies run: | @@ -85,13 +85,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up Go 1.x - uses: actions/setup-go@v2 + uses: actions/setup-go@v5 with: - go-version: ^1.15.6 + go-version: 1.23.6 id: go - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Get dependencies run: | diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index cb27be4b..930d3aec 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -12,13 +12,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up Go 1.x - uses: actions/setup-go@v2 + uses: actions/setup-go@v5 with: - go-version: ^1.17.6 + go-version: 1.23.6 id: go - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Get dependencies run: | diff --git a/cmd/elasticindexer/config/prefs.toml b/cmd/elasticindexer/config/prefs.toml index 2685e4b8..b60b6ce6 100644 --- a/cmd/elasticindexer/config/prefs.toml +++ b/cmd/elasticindexer/config/prefs.toml @@ -18,7 +18,6 @@ acknowledge-timeout-in-seconds = 50 [config.elastic-cluster] - use-kibana = false url = "http://localhost:9200" username = "" password = "" diff --git a/data/account.go b/data/account.go index f28ff087..9f7caf69 100644 --- a/data/account.go +++ b/data/account.go @@ -1,8 +1,6 @@ package data import ( - "time" - "github.com/multiversx/mx-chain-core-go/data/alteredAccount" ) @@ -22,7 +20,8 @@ type AccountInfo struct { DeveloperRewards string `json:"developerRewards,omitempty"` DeveloperRewardsNum float64 `json:"developerRewardsNum,omitempty"` Data *TokenMetaData `json:"data,omitempty"` - Timestamp time.Duration `json:"timestamp,omitempty"` + Timestamp uint64 `json:"timestamp,omitempty"` + TimestampMs uint64 `json:"timestampMs,omitempty"` Type string `json:"type,omitempty"` CurrentOwner string `json:"currentOwner,omitempty"` ShardID uint32 `json:"shardID"` @@ -50,15 +49,16 @@ type TokenMetaData struct { // AccountBalanceHistory represents an entry in the user accounts balances history type AccountBalanceHistory struct { - Address string `json:"address"` - Timestamp time.Duration `json:"timestamp"` - Balance string `json:"balance"` - Token string `json:"token,omitempty"` - Identifier string `json:"identifier,omitempty"` - TokenNonce uint64 `json:"tokenNonce,omitempty"` - IsSender bool `json:"isSender,omitempty"` - IsSmartContract bool `json:"isSmartContract,omitempty"` - ShardID uint32 `json:"shardID"` + Address string `json:"address"` + Timestamp uint64 `json:"timestamp"` + TimestampMs uint64 `json:"timestampMs,omitempty"` + Balance string `json:"balance"` + Token string `json:"token,omitempty"` + Identifier string `json:"identifier,omitempty"` + TokenNonce uint64 `json:"tokenNonce,omitempty"` + IsSender bool `json:"isSender,omitempty"` + IsSmartContract bool `json:"isSmartContract,omitempty"` + ShardID uint32 `json:"shardID"` } // Account is a structure that is needed for regular accounts diff --git a/data/block.go b/data/block.go index e8720aa4..53a92569 100644 --- a/data/block.go +++ b/data/block.go @@ -1,8 +1,6 @@ package data import ( - "time" - "github.com/multiversx/mx-chain-core-go/data/api" ) @@ -24,7 +22,8 @@ type Block struct { PubKeyBitmap string `json:"pubKeyBitmap"` Size int64 `json:"size"` SizeTxs int64 `json:"sizeTxs"` - Timestamp time.Duration `json:"timestamp"` + Timestamp uint64 `json:"timestamp"` + TimestampMs uint64 `json:"timestampMs,omitempty"` StateRootHash string `json:"stateRootHash"` PrevHash string `json:"prevHash"` ShardID uint32 `json:"shardId"` @@ -104,14 +103,15 @@ type EpochStartShardData struct { // Miniblock is a structure containing miniblock information type Miniblock struct { - Hash string `json:"hash,omitempty"` - SenderShardID uint32 `json:"senderShard"` - ReceiverShardID uint32 `json:"receiverShard"` - SenderBlockHash string `json:"senderBlockHash,omitempty"` - ReceiverBlockHash string `json:"receiverBlockHash,omitempty"` - Type string `json:"type"` - ProcessingTypeOnSource string `json:"procTypeS,omitempty"` - ProcessingTypeOnDestination string `json:"procTypeD,omitempty"` - Timestamp time.Duration `json:"timestamp"` - Reserved []byte `json:"reserved,omitempty"` + Hash string `json:"hash,omitempty"` + SenderShardID uint32 `json:"senderShard"` + ReceiverShardID uint32 `json:"receiverShard"` + SenderBlockHash string `json:"senderBlockHash,omitempty"` + ReceiverBlockHash string `json:"receiverBlockHash,omitempty"` + Type string `json:"type"` + ProcessingTypeOnSource string `json:"procTypeS,omitempty"` + ProcessingTypeOnDestination string `json:"procTypeD,omitempty"` + Timestamp uint64 `json:"timestamp"` + TimestampMs uint64 `json:"timestampMs,omitempty"` + Reserved []byte `json:"reserved,omitempty"` } diff --git a/data/data.go b/data/data.go index 2830db27..9f159155 100644 --- a/data/data.go +++ b/data/data.go @@ -2,7 +2,6 @@ package data import ( "encoding/json" - "time" ) // ValidatorsPublicKeys is a structure containing fields for validators public keys @@ -24,12 +23,13 @@ type ValidatorRatingInfo struct { // RoundInfo is a structure containing block signers and shard id type RoundInfo struct { - Round uint64 `json:"round"` - SignersIndexes []uint64 `json:"signersIndexes"` - BlockWasProposed bool `json:"blockWasProposed"` - ShardId uint32 `json:"shardId"` - Epoch uint32 `json:"epoch"` - Timestamp time.Duration `json:"timestamp"` + Round uint64 `json:"round"` + SignersIndexes []uint64 `json:"signersIndexes"` + BlockWasProposed bool `json:"blockWasProposed"` + ShardId uint32 `json:"shardId"` + Epoch uint32 `json:"epoch"` + Timestamp uint64 `json:"timestamp"` + TimestampMs uint64 `json:"timestampMs,omitempty"` } // EpochInfo holds the information about epoch diff --git a/data/delegators.go b/data/delegators.go index d3a2b79b..7d2175e4 100644 --- a/data/delegators.go +++ b/data/delegators.go @@ -1,23 +1,23 @@ package data -import "time" - // Delegator is a structure that is needed to store information about a delegator type Delegator struct { - Address string `json:"address"` - Contract string `json:"contract"` - Timestamp time.Duration `json:"timestamp"` - ActiveStake string `json:"activeStake"` - ActiveStakeNum float64 `json:"activeStakeNum"` - ShouldDelete bool `json:"-"` - UnDelegateInfo *UnDelegate `json:"-"` - WithdrawFundIDs []string `json:"-"` + Address string `json:"address"` + Contract string `json:"contract"` + Timestamp uint64 `json:"timestamp"` + TimestampMs uint64 `json:"timestampMs,omitempty"` + ActiveStake string `json:"activeStake"` + ActiveStakeNum float64 `json:"activeStakeNum"` + ShouldDelete bool `json:"-"` + UnDelegateInfo *UnDelegate `json:"-"` + WithdrawFundIDs []string `json:"-"` } // UnDelegate is a structure that is needed to store information about user unDelegate position type UnDelegate struct { - Timestamp time.Duration `json:"timestamp"` - ID string `json:"id"` - Value string `json:"value"` - ValueNum float64 `json:"valueNum"` + Timestamp uint64 `json:"timestamp"` + TimestampMs uint64 `json:"timestampMs,omitempty"` + ID string `json:"id"` + Value string `json:"value"` + ValueNum float64 `json:"valueNum"` } diff --git a/data/event.go b/data/event.go index a3d113f7..1770db1d 100644 --- a/data/event.go +++ b/data/event.go @@ -1,21 +1,20 @@ package data -import "time" - // LogEvent is the dto for the log event structure type LogEvent struct { - UUID string `json:"uuid"` - ID string `json:"-"` - TxHash string `json:"txHash"` - OriginalTxHash string `json:"originalTxHash,omitempty"` - LogAddress string `json:"logAddress"` - Address string `json:"address"` - Identifier string `json:"identifier"` - Data string `json:"data,omitempty"` - AdditionalData []string `json:"additionalData,omitempty"` - Topics []string `json:"topics"` - Order int `json:"order"` - TxOrder int `json:"txOrder"` - ShardID uint32 `json:"shardID"` - Timestamp time.Duration `json:"timestamp,omitempty"` + UUID string `json:"uuid"` + ID string `json:"-"` + TxHash string `json:"txHash"` + OriginalTxHash string `json:"originalTxHash,omitempty"` + LogAddress string `json:"logAddress"` + Address string `json:"address"` + Identifier string `json:"identifier"` + Data string `json:"data,omitempty"` + AdditionalData []string `json:"additionalData,omitempty"` + Topics []string `json:"topics"` + Order int `json:"order"` + TxOrder int `json:"txOrder"` + ShardID uint32 `json:"shardID"` + Timestamp uint64 `json:"timestamp,omitempty"` + TimestampMs uint64 `json:"timestampMs,omitempty"` } diff --git a/data/logs.go b/data/logs.go index a2a558f3..336c15a6 100644 --- a/data/logs.go +++ b/data/logs.go @@ -1,20 +1,19 @@ package data import ( - "time" - "github.com/multiversx/mx-chain-core-go/data/outport" "github.com/multiversx/mx-chain-es-indexer-go/process/elasticproc/tokeninfo" ) // Logs holds all the fields needed for a logs structure type Logs struct { - UUID string `json:"uuid"` - ID string `json:"-"` - OriginalTxHash string `json:"originalTxHash,omitempty"` - Address string `json:"address"` - Events []*Event `json:"events"` - Timestamp time.Duration `json:"timestamp,omitempty"` + UUID string `json:"uuid"` + ID string `json:"-"` + OriginalTxHash string `json:"originalTxHash,omitempty"` + Address string `json:"address"` + Events []*Event `json:"events"` + Timestamp uint64 `json:"timestamp,omitempty"` + TimestampMs uint64 `json:"timestampMs,omitempty"` } // Event holds all the fields needed for an event structure diff --git a/data/scDeploy.go b/data/scDeploy.go index 7a7bb69c..9e82486f 100644 --- a/data/scDeploy.go +++ b/data/scDeploy.go @@ -7,14 +7,16 @@ type ScDeployInfo struct { CurrentOwner string `json:"currentOwner"` CodeHash []byte `json:"initialCodeHash"` Timestamp uint64 `json:"timestamp"` + TimestampMs uint64 `json:"timestampMs,omitempty"` Upgrades []*Upgrade `json:"upgrades"` OwnersHistory []*OwnerData `json:"owners"` } // Upgrade is the DTO that holds information about a smart contract upgrade type Upgrade struct { - TxHash string `json:"upgradeTxHash"` - Upgrader string `json:"upgrader"` - Timestamp uint64 `json:"timestamp"` - CodeHash []byte `json:"codeHash"` + TxHash string `json:"upgradeTxHash"` + Upgrader string `json:"upgrader"` + Timestamp uint64 `json:"timestamp"` + TimestampMs uint64 `json:"timestampMs"` + CodeHash []byte `json:"codeHash"` } diff --git a/data/scresult.go b/data/scresult.go index 7ff11fbf..504002cf 100644 --- a/data/scresult.go +++ b/data/scresult.go @@ -1,49 +1,48 @@ package data -import "time" - // ScResult is a structure containing all the fields that need to be saved for a smart contract result type ScResult struct { - UUID string `json:"uuid"` - Hash string `json:"-"` - MBHash string `json:"miniBlockHash,omitempty"` - Nonce uint64 `json:"nonce"` - GasLimit uint64 `json:"gasLimit"` - GasPrice uint64 `json:"gasPrice"` - Value string `json:"value"` - ValueNum float64 `json:"valueNum"` - Sender string `json:"sender"` - Receiver string `json:"receiver"` - SenderShard uint32 `json:"senderShard"` - ReceiverShard uint32 `json:"receiverShard"` - RelayerAddr string `json:"relayerAddr,omitempty"` - RelayedValue string `json:"relayedValue,omitempty"` - Code string `json:"code,omitempty"` - Data []byte `json:"data,omitempty"` - PrevTxHash string `json:"prevTxHash"` - OriginalTxHash string `json:"originalTxHash"` - CallType string `json:"callType"` - CodeMetadata []byte `json:"codeMetaData,omitempty"` - ReturnMessage string `json:"returnMessage,omitempty"` - Timestamp time.Duration `json:"timestamp"` - HasOperations bool `json:"hasOperations,omitempty"` - Type string `json:"type,omitempty"` - Status string `json:"status,omitempty"` - Tokens []string `json:"tokens,omitempty"` - ESDTValues []string `json:"esdtValues,omitempty"` - ESDTValuesNum []float64 `json:"esdtValuesNum,omitempty"` - Receivers []string `json:"receivers,omitempty"` - ReceiversShardIDs []uint32 `json:"receiversShardIDs,omitempty"` - Operation string `json:"operation,omitempty"` - Function string `json:"function,omitempty"` - IsRelayed bool `json:"isRelayed,omitempty"` - CanBeIgnored bool `json:"canBeIgnored,omitempty"` - OriginalSender string `json:"originalSender,omitempty"` - HasLogs bool `json:"hasLogs,omitempty"` - Epoch uint32 `json:"epoch"` - ExecutionOrder int `json:"-"` - SenderAddressBytes []byte `json:"-"` - InitialTxGasUsed uint64 `json:"-"` - InitialTxFee string `json:"-"` - GasRefunded uint64 `json:"-"` + UUID string `json:"uuid"` + Hash string `json:"-"` + MBHash string `json:"miniBlockHash,omitempty"` + Nonce uint64 `json:"nonce"` + GasLimit uint64 `json:"gasLimit"` + GasPrice uint64 `json:"gasPrice"` + Value string `json:"value"` + ValueNum float64 `json:"valueNum"` + Sender string `json:"sender"` + Receiver string `json:"receiver"` + SenderShard uint32 `json:"senderShard"` + ReceiverShard uint32 `json:"receiverShard"` + RelayerAddr string `json:"relayerAddr,omitempty"` + RelayedValue string `json:"relayedValue,omitempty"` + Code string `json:"code,omitempty"` + Data []byte `json:"data,omitempty"` + PrevTxHash string `json:"prevTxHash"` + OriginalTxHash string `json:"originalTxHash"` + CallType string `json:"callType"` + CodeMetadata []byte `json:"codeMetaData,omitempty"` + ReturnMessage string `json:"returnMessage,omitempty"` + Timestamp uint64 `json:"timestamp"` + TimestampMs uint64 `json:"timestampMs,omitempty"` + HasOperations bool `json:"hasOperations,omitempty"` + Type string `json:"type,omitempty"` + Status string `json:"status,omitempty"` + Tokens []string `json:"tokens,omitempty"` + ESDTValues []string `json:"esdtValues,omitempty"` + ESDTValuesNum []float64 `json:"esdtValuesNum,omitempty"` + Receivers []string `json:"receivers,omitempty"` + ReceiversShardIDs []uint32 `json:"receiversShardIDs,omitempty"` + Operation string `json:"operation,omitempty"` + Function string `json:"function,omitempty"` + IsRelayed bool `json:"isRelayed,omitempty"` + CanBeIgnored bool `json:"canBeIgnored,omitempty"` + OriginalSender string `json:"originalSender,omitempty"` + HasLogs bool `json:"hasLogs,omitempty"` + Epoch uint32 `json:"epoch"` + ExecutionOrder int `json:"-"` + SenderAddressBytes []byte `json:"-"` + InitialTxGasUsed uint64 `json:"-"` + InitialTxFee string `json:"-"` + GasRefunded uint64 `json:"-"` } diff --git a/data/tokens.go b/data/tokens.go index 967e13ee..dfd0f7af 100644 --- a/data/tokens.go +++ b/data/tokens.go @@ -1,8 +1,6 @@ package data import ( - "time" - "github.com/multiversx/mx-chain-core-go/core" ) @@ -56,7 +54,8 @@ type TokenInfo struct { NumDecimals uint64 `json:"numDecimals"` Type string `json:"type,omitempty"` Nonce uint64 `json:"nonce,omitempty"` - Timestamp time.Duration `json:"timestamp,omitempty"` + Timestamp uint64 `json:"timestamp,omitempty"` + TimestampMs uint64 `json:"timestampMs,omitempty"` Data *TokenMetaData `json:"data,omitempty"` OwnersHistory []*OwnerData `json:"ownersHistory,omitempty"` TransferOwnership bool `json:"-"` @@ -80,9 +79,10 @@ type TokenProperties struct { // OwnerData is a structure that is needed to store information about an owner type OwnerData struct { - TxHash string `json:"txHash,omitempty"` - Address string `json:"address"` - Timestamp time.Duration `json:"timestamp"` + TxHash string `json:"txHash,omitempty"` + Address string `json:"address"` + Timestamp uint64 `json:"timestamp"` + TimestampMs uint64 `json:"timestampMs,omitempty"` } // TokensHandler defines the actions that a tokens' handler should do diff --git a/data/transaction.go b/data/transaction.go index 4e1800ec..845c41c5 100644 --- a/data/transaction.go +++ b/data/transaction.go @@ -1,72 +1,70 @@ package data -import ( - "time" -) - // Transaction is a structure containing all the fields that need // to be saved for a transaction. It has all the default fields // plus some extra information for ease of search and filter type Transaction struct { - UUID string `json:"uuid"` - MBHash string `json:"miniBlockHash"` - Nonce uint64 `json:"nonce"` - Round uint64 `json:"round"` - Value string `json:"value"` - ValueNum float64 `json:"valueNum"` - Receiver string `json:"receiver"` - Sender string `json:"sender"` - ReceiverShard uint32 `json:"receiverShard"` - SenderShard uint32 `json:"senderShard"` - GasPrice uint64 `json:"gasPrice"` - GasLimit uint64 `json:"gasLimit"` - GasUsed uint64 `json:"gasUsed"` - Fee string `json:"fee"` - FeeNum float64 `json:"feeNum"` - InitialPaidFee string `json:"initialPaidFee,omitempty"` - Data []byte `json:"data"` - Signature string `json:"signature"` - Timestamp time.Duration `json:"timestamp"` - Status string `json:"status"` - SearchOrder uint32 `json:"searchOrder"` - SenderUserName []byte `json:"senderUserName,omitempty"` - ReceiverUserName []byte `json:"receiverUserName,omitempty"` - HasSCR bool `json:"hasScResults,omitempty"` - IsScCall bool `json:"isScCall,omitempty"` - HasOperations bool `json:"hasOperations,omitempty"` - HasLogs bool `json:"hasLogs,omitempty"` - Tokens []string `json:"tokens,omitempty"` - ESDTValues []string `json:"esdtValues,omitempty"` - ESDTValuesNum []float64 `json:"esdtValuesNum,omitempty"` - Receivers []string `json:"receivers,omitempty"` - ReceiversShardIDs []uint32 `json:"receiversShardIDs,omitempty"` - Type string `json:"type,omitempty"` - Operation string `json:"operation,omitempty"` - Function string `json:"function,omitempty"` - IsRelayed bool `json:"isRelayed,omitempty"` - Version uint32 `json:"version,omitempty"` - GuardianAddress string `json:"guardian,omitempty"` - GuardianSignature string `json:"guardianSignature,omitempty"` - ErrorEvent bool `json:"errorEvent,omitempty"` - CompletedEvent bool `json:"completedEvent,omitempty"` - RelayedAddr string `json:"relayer,omitempty"` - RelayedSignature string `json:"relayerSignature,omitempty"` - HadRefund bool `json:"hadRefund,omitempty"` - Epoch uint32 `json:"epoch"` - ExecutionOrder int `json:"-"` - SmartContractResults []*ScResult `json:"-"` - Hash string `json:"-"` - BlockHash string `json:"-"` + UUID string `json:"uuid"` + MBHash string `json:"miniBlockHash"` + Nonce uint64 `json:"nonce"` + Round uint64 `json:"round"` + Value string `json:"value"` + ValueNum float64 `json:"valueNum"` + Receiver string `json:"receiver"` + Sender string `json:"sender"` + ReceiverShard uint32 `json:"receiverShard"` + SenderShard uint32 `json:"senderShard"` + GasPrice uint64 `json:"gasPrice"` + GasLimit uint64 `json:"gasLimit"` + GasUsed uint64 `json:"gasUsed"` + Fee string `json:"fee"` + FeeNum float64 `json:"feeNum"` + InitialPaidFee string `json:"initialPaidFee,omitempty"` + Data []byte `json:"data"` + Signature string `json:"signature"` + Timestamp uint64 `json:"timestamp"` + TimestampMs uint64 `json:"timestampMs,omitempty"` + Status string `json:"status"` + SearchOrder uint32 `json:"searchOrder"` + SenderUserName []byte `json:"senderUserName,omitempty"` + ReceiverUserName []byte `json:"receiverUserName,omitempty"` + HasSCR bool `json:"hasScResults,omitempty"` + IsScCall bool `json:"isScCall,omitempty"` + HasOperations bool `json:"hasOperations,omitempty"` + HasLogs bool `json:"hasLogs,omitempty"` + Tokens []string `json:"tokens,omitempty"` + ESDTValues []string `json:"esdtValues,omitempty"` + ESDTValuesNum []float64 `json:"esdtValuesNum,omitempty"` + Receivers []string `json:"receivers,omitempty"` + ReceiversShardIDs []uint32 `json:"receiversShardIDs,omitempty"` + Type string `json:"type,omitempty"` + Operation string `json:"operation,omitempty"` + Function string `json:"function,omitempty"` + IsRelayed bool `json:"isRelayed,omitempty"` + Version uint32 `json:"version,omitempty"` + GuardianAddress string `json:"guardian,omitempty"` + GuardianSignature string `json:"guardianSignature,omitempty"` + ErrorEvent bool `json:"errorEvent,omitempty"` + CompletedEvent bool `json:"completedEvent,omitempty"` + RelayedAddr string `json:"relayer,omitempty"` + RelayedSignature string `json:"relayerSignature,omitempty"` + HadRefund bool `json:"hadRefund,omitempty"` + Epoch uint32 `json:"epoch"` + ExecutionOrder int `json:"-"` + SmartContractResults []*ScResult `json:"-"` + Hash string `json:"-"` + BlockHash string `json:"-"` } // Receipt is a structure containing all the fields that need to be safe for a Receipt type Receipt struct { - Hash string `json:"-"` - Value string `json:"value"` - Sender string `json:"sender"` - Data string `json:"data,omitempty"` - TxHash string `json:"txHash"` - Timestamp time.Duration `json:"timestamp"` + Hash string `json:"-"` + Value string `json:"value"` + Sender string `json:"sender"` + Data string `json:"data,omitempty"` + TxHash string `json:"txHash"` + Timestamp uint64 `json:"timestamp"` + TimestampMs uint64 `json:"timestampMs,omitempty"` } // PreparedResults is the DTO that holds all the results after processing diff --git a/go.mod b/go.mod index e1a24574..315531ff 100644 --- a/go.mod +++ b/go.mod @@ -1,22 +1,22 @@ module github.com/multiversx/mx-chain-es-indexer-go -go 1.20 +go 1.23 require ( github.com/elastic/go-elasticsearch/v7 v7.12.0 github.com/gin-contrib/cors v1.4.0 github.com/gin-gonic/gin v1.10.0 github.com/google/uuid v1.6.0 - github.com/multiversx/mx-chain-communication-go v1.2.0 - github.com/multiversx/mx-chain-core-go v1.3.1 - github.com/multiversx/mx-chain-logger-go v1.0.15 - github.com/multiversx/mx-chain-vm-common-go v1.5.16 - github.com/prometheus/client_model v0.4.0 - github.com/prometheus/common v0.37.0 + github.com/multiversx/mx-chain-communication-go v1.3.0 + github.com/multiversx/mx-chain-core-go v1.4.0 + github.com/multiversx/mx-chain-logger-go v1.1.0 + github.com/multiversx/mx-chain-vm-common-go v1.6.0 + github.com/prometheus/client_model v0.6.1 + github.com/prometheus/common v0.62.0 github.com/stretchr/testify v1.10.0 github.com/tidwall/gjson v1.18.0 github.com/urfave/cli v1.22.16 - google.golang.org/protobuf v1.36.3 + google.golang.org/protobuf v1.36.4 ) require ( @@ -36,16 +36,16 @@ require ( github.com/goccy/go-json v0.10.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/gorilla/mux v1.8.0 // indirect - github.com/gorilla/websocket v1.5.0 // indirect + github.com/gorilla/mux v1.8.1 // indirect + github.com/gorilla/websocket v1.5.3 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/cpuid/v2 v2.2.7 // indirect + github.com/klauspost/cpuid/v2 v2.2.9 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mr-tron/base58 v1.2.0 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pelletier/go-toml v1.9.3 // indirect github.com/pelletier/go-toml/v2 v2.2.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect @@ -55,9 +55,9 @@ require ( github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.12 // indirect golang.org/x/arch v0.8.0 // indirect - golang.org/x/crypto v0.31.0 // indirect - golang.org/x/net v0.33.0 // indirect - golang.org/x/sys v0.28.0 // indirect + golang.org/x/crypto v0.32.0 // indirect + golang.org/x/net v0.34.0 // indirect + golang.org/x/sys v0.30.0 // indirect golang.org/x/text v0.21.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index a5313de0..02b1c53c 100644 --- a/go.sum +++ b/go.sum @@ -1,48 +1,5 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M= github.com/btcsuite/btcd v0.23.0/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY= @@ -67,18 +24,10 @@ github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4= github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM= github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= 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/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= 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/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -93,10 +42,6 @@ github.com/denisbrodbeck/machineid v1.0.1 h1:geKr9qtkB876mXguW2X6TU4ZynleN6ezuMS github.com/denisbrodbeck/machineid v1.0.1/go.mod h1:dJUwb7PTidGDeYyUBmXZ2GphQBbjJCrnectwCyxcUSI= github.com/elastic/go-elasticsearch/v7 v7.12.0 h1:j4tvcMrZJLp39L2NYvBb7f+lHKPqPHSL3nvB8+/DV+s= github.com/elastic/go-elasticsearch/v7 v7.12.0/go.mod h1:OJ4wdbtDNk5g503kvlHLyErCgQwwzmDtaFC4XyOxXA4= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0= @@ -108,19 +53,9 @@ github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= 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-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= +github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= @@ -130,101 +65,48 @@ github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91 github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= github.com/go-playground/validator/v10 v10.20.0 h1:K9ISHbSaI0lyB2eWMPJo+kOS/FBExVwjEviJTixqxL8= github.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= 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/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= 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/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +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.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= 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/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= 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/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= 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.9 h1:66ze0taIn2H33fBvCkXuv9BmCwDfafmiIVpKV9kKGuY= +github.com/klauspost/cpuid/v2 v2.2.9/go.mod h1:rqkxqrZ1EhYM9G+hXH7YdowN5R5RGN6NK4QwQ3WMXF8= github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= @@ -239,29 +121,25 @@ github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjS github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= 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/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= -github.com/multiversx/mx-chain-communication-go v1.2.0 h1:0wOoLldiRbvaOPxwICbnRCqCpLqPewg8M/FMbC/0OXY= -github.com/multiversx/mx-chain-communication-go v1.2.0/go.mod h1:wS3aAwkmHbC9mlzQdvL6p7l8Rqw3vmzhj7WZW1dTveA= -github.com/multiversx/mx-chain-core-go v1.3.1 h1:r8DAkl9a9t6z38jjbtGNrz295pBeM6fwTq91TP8xX6U= -github.com/multiversx/mx-chain-core-go v1.3.1/go.mod h1:B5zU4MFyJezmEzCsAHE9YNULmGCm2zbPHvl9hazNxmE= -github.com/multiversx/mx-chain-crypto-go v1.2.12 h1:zWip7rpUS4CGthJxfKn5MZfMfYPjVjIiCID6uX5BSOk= -github.com/multiversx/mx-chain-logger-go v1.0.15 h1:HlNdK8etyJyL9NQ+6mIXyKPEBo+wRqOwi3n+m2QIHXc= -github.com/multiversx/mx-chain-logger-go v1.0.15/go.mod h1:t3PRKaWB1M+i6gUfD27KXgzLJJC+mAQiN+FLlL1yoGQ= -github.com/multiversx/mx-chain-vm-common-go v1.5.16 h1:g1SqYjxl7K66Y1O/q6tvDJ37fzpzlxCSfRzSm/woQQY= -github.com/multiversx/mx-chain-vm-common-go v1.5.16/go.mod h1:1rSkXreUZNXyPTTdhj47M+Fy62yjxbu3aAsXEtKN3UY= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/multiversx/mx-chain-communication-go v1.3.0 h1:ziNM1dRuiR/7al2L/jGEA/a/hjurtJ/HEqgazHNt9P8= +github.com/multiversx/mx-chain-communication-go v1.3.0/go.mod h1:gDVWn6zUW6aCN1YOm/FbbT5MUmhgn/L1Rmpl8EoH3Yg= +github.com/multiversx/mx-chain-core-go v1.4.0 h1:p6FbfCzvMXF54kpS0B5mrjNWYpq4SEQqo0UvrMF7YVY= +github.com/multiversx/mx-chain-core-go v1.4.0/go.mod h1:IO+vspNan+gT0WOHnJ95uvWygiziHZvfXpff6KnxV7g= +github.com/multiversx/mx-chain-crypto-go v1.3.0 h1:0eK2bkDOMi8VbSPrB1/vGJSYT81IBtfL4zw+C4sWe/k= +github.com/multiversx/mx-chain-crypto-go v1.3.0/go.mod h1:nPIkxxzyTP8IquWKds+22Q2OJ9W7LtusC7cAosz7ojM= +github.com/multiversx/mx-chain-logger-go v1.1.0 h1:97x84A6L4RfCa6YOx1HpAFxZp1cf/WI0Qh112whgZNM= +github.com/multiversx/mx-chain-logger-go v1.1.0/go.mod h1:K9XgiohLwOsNACETMNL0LItJMREuEvTH6NsoXWXWg7g= +github.com/multiversx/mx-chain-vm-common-go v1.6.0 h1:M2zmf/ptEINciWxYCPLIkwOMTvvzWjELYYB+0MMQ5Gw= +github.com/multiversx/mx-chain-vm-common-go v1.6.0/go.mod h1:Lc7r4VDPYRDS0CVIaWAoLtf3YQn6PZEYHv4QtaOE2Z0= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -277,50 +155,23 @@ github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZO github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io= +github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= -github.com/stretchr/testify v1.2.2/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.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 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= @@ -345,332 +196,92 @@ github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65E github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/urfave/cli v1.22.16 h1:MH0k6uJxdwdeWQTwhSO42Pwr4YLrNLwBtg1MRgTqPdQ= github.com/urfave/cli v1.22.16/go.mod h1:EeJR6BKodywf4zciqrdw6hpCPk68JO9z5LazXZMn5Po= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc= golang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 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.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= -golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc= +golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/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-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= -golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= +golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/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= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/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.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= -golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= +golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 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.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 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/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= 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.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.36.3 h1:82DV7MYdb8anAVi3qge1wSnMDrnKK7ebr+I0hHRN1BU= -google.golang.org/protobuf v1.36.3/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.36.4 h1:6A3ZDJHn/eNqc1i+IdefRzy/9PokBTPvcqMySR7NNIM= +google.golang.org/protobuf v1.36.4/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-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/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/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -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.2.5/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/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/integrationtests/accountsBalanceNftTransfer_test.go b/integrationtests/accountsBalanceNftTransfer_test.go index aaf44e00..fb289144 100644 --- a/integrationtests/accountsBalanceNftTransfer_test.go +++ b/integrationtests/accountsBalanceNftTransfer_test.go @@ -29,7 +29,8 @@ func createOutportBlockWithHeader( return &outport.OutportBlockWithHeader{ OutportBlock: &outport.OutportBlock{ BlockData: &outport.BlockData{ - Body: body, + Body: body, + TimestampMs: header.GetTimeStamp() * 1000, }, TransactionPool: pool, AlteredAccounts: coreAlteredAccounts, diff --git a/integrationtests/accountsESDTRollback_test.go b/integrationtests/accountsESDTRollback_test.go index 9fd3a06f..ebc704be 100644 --- a/integrationtests/accountsESDTRollback_test.go +++ b/integrationtests/accountsESDTRollback_test.go @@ -91,7 +91,7 @@ func TestAccountsESDTDeleteOnRollback(t *testing.T) { require.JSONEq(t, readExpectedResult("./testdata/accountsESDTRollback/account-after-create.json"), string(genericResponse.Docs[0].Source)) // DO ROLLBACK - err = esProc.RemoveAccountsESDT(5040, 2) + err = esProc.RemoveAccountsESDT(2, 5040000) require.Nil(t, err) err = esClient.DoMultiGet(context.Background(), ids, indexerdata.AccountsESDTIndex, true, genericResponse) diff --git a/integrationtests/delegators_test.go b/integrationtests/delegators_test.go index 3517b26e..1cea825f 100644 --- a/integrationtests/delegators_test.go +++ b/integrationtests/delegators_test.go @@ -132,7 +132,7 @@ func TestDelegateUnDelegateAndWithdraw(t *testing.T) { // revert unDelegate 2 header.TimeStamp = 5060 - err = esProc.RemoveTransactions(header, body) + err = esProc.RemoveTransactions(header, body, 5060000) require.Nil(t, err) time.Sleep(time.Second) diff --git a/integrationtests/logsCrossShard_test.go b/integrationtests/logsCrossShard_test.go index 7c96688f..002e792e 100644 --- a/integrationtests/logsCrossShard_test.go +++ b/integrationtests/logsCrossShard_test.go @@ -208,7 +208,7 @@ func TestIndexLogSourceShardAndAfterDestinationAndAgainSource(t *testing.T) { }, } - err = esProc.RemoveTransactions(header, body) + err = esProc.RemoveTransactions(header, body, header.TimeStamp*1000) require.Nil(t, err) err = esClient.DoMultiGet(context.Background(), ids, indexerdata.LogsIndex, true, genericResponse) diff --git a/integrationtests/miniblocks_test.go b/integrationtests/miniblocks_test.go index 3814964e..9cde9fe5 100644 --- a/integrationtests/miniblocks_test.go +++ b/integrationtests/miniblocks_test.go @@ -31,7 +31,7 @@ func TestIndexMiniBlocksOnSourceAndDestination(t *testing.T) { ReceiverShardID: 2, }, } - err = esProc.SaveMiniblocks(header, miniBlocks) + err = esProc.SaveMiniblocks(header, miniBlocks, 1234000) require.Nil(t, err) mbHash := "11a1bb4065e16a2e93b2b5ac5957b7b69f1cfba7579b170b24f30dab2d3162e0" ids := []string{mbHash} @@ -57,7 +57,7 @@ func TestIndexMiniBlocksOnSourceAndDestination(t *testing.T) { }, } - err = esProc.SaveMiniblocks(header, miniBlocks) + err = esProc.SaveMiniblocks(header, miniBlocks, 1234000) require.Nil(t, err) err = esClient.DoMultiGet(context.Background(), ids, indexerdata.MiniblocksIndex, true, genericResponse) @@ -96,7 +96,7 @@ func TestIndexMiniBlockFirstOnDestinationAndAfterSource(t *testing.T) { }, } - err = esProc.SaveMiniblocks(header, miniBlocks) + err = esProc.SaveMiniblocks(header, miniBlocks, 54321000) require.Nil(t, err) genericResponse := &GenericResponse{} @@ -116,7 +116,7 @@ func TestIndexMiniBlockFirstOnDestinationAndAfterSource(t *testing.T) { Reserved: mbhrBytes, }, } - err = esProc.SaveMiniblocks(header, miniBlocks) + err = esProc.SaveMiniblocks(header, miniBlocks, 54321000) require.Nil(t, err) err = esClient.DoMultiGet(context.Background(), ids, indexerdata.MiniblocksIndex, true, genericResponse) require.Nil(t, err) diff --git a/integrationtests/testdata/accountsBalanceNftTransfer/balance-nft-after-create.json b/integrationtests/testdata/accountsBalanceNftTransfer/balance-nft-after-create.json index 818b34a2..ffb15164 100644 --- a/integrationtests/testdata/accountsBalanceNftTransfer/balance-nft-after-create.json +++ b/integrationtests/testdata/accountsBalanceNftTransfer/balance-nft-after-create.json @@ -6,5 +6,6 @@ "tokenNonce": 7440483, "token": "NFT-abcdef", "timestamp": 5600, + "timestampMs": 5600000, "shardID": 1 } diff --git a/integrationtests/testdata/accountsBalanceNftTransfer/balance-nft-after-transfer.json b/integrationtests/testdata/accountsBalanceNftTransfer/balance-nft-after-transfer.json index 90c744c4..6fe142b6 100644 --- a/integrationtests/testdata/accountsBalanceNftTransfer/balance-nft-after-transfer.json +++ b/integrationtests/testdata/accountsBalanceNftTransfer/balance-nft-after-transfer.json @@ -6,5 +6,6 @@ "tokenNonce": 7440483, "token": "NFT-abcdef", "timestamp": 5600, + "timestampMs": 5600000, "shardID": 1 } diff --git a/integrationtests/testdata/accountsBalanceWithLowerTimestamp/account-balance-esdt-first-update.json b/integrationtests/testdata/accountsBalanceWithLowerTimestamp/account-balance-esdt-first-update.json index 097b1ac5..fcc30f05 100644 --- a/integrationtests/testdata/accountsBalanceWithLowerTimestamp/account-balance-esdt-first-update.json +++ b/integrationtests/testdata/accountsBalanceWithLowerTimestamp/account-balance-esdt-first-update.json @@ -4,6 +4,7 @@ "balanceNum": 1e-15, "token": "TTTT-abcd", "timestamp": 5600, + "timestampMs": 5600000, "type": "FungibleESDT", "shardID": 2 } diff --git a/integrationtests/testdata/accountsBalanceWithLowerTimestamp/account-balance-esdt-second-update.json b/integrationtests/testdata/accountsBalanceWithLowerTimestamp/account-balance-esdt-second-update.json index e224383a..99c5a1fa 100644 --- a/integrationtests/testdata/accountsBalanceWithLowerTimestamp/account-balance-esdt-second-update.json +++ b/integrationtests/testdata/accountsBalanceWithLowerTimestamp/account-balance-esdt-second-update.json @@ -3,6 +3,7 @@ "balance": "1000", "balanceNum": 1e-15, "timestamp": 6000, + "timestampMs": 6000000, "token": "TTTT-abcd", "type": "FungibleESDT", "shardID": 2 diff --git a/integrationtests/testdata/accountsBalanceWithLowerTimestamp/account-balance-first-update.json b/integrationtests/testdata/accountsBalanceWithLowerTimestamp/account-balance-first-update.json index 97a80077..365289fc 100644 --- a/integrationtests/testdata/accountsBalanceWithLowerTimestamp/account-balance-first-update.json +++ b/integrationtests/testdata/accountsBalanceWithLowerTimestamp/account-balance-first-update.json @@ -3,5 +3,6 @@ "balance": "0", "balanceNum": 0, "timestamp": 5600, + "timestampMs": 5600000, "shardID": 2 } diff --git a/integrationtests/testdata/accountsBalanceWithLowerTimestamp/account-balance-second-update.json b/integrationtests/testdata/accountsBalanceWithLowerTimestamp/account-balance-second-update.json index 3ebc00ce..fd88ff75 100644 --- a/integrationtests/testdata/accountsBalanceWithLowerTimestamp/account-balance-second-update.json +++ b/integrationtests/testdata/accountsBalanceWithLowerTimestamp/account-balance-second-update.json @@ -3,5 +3,6 @@ "balance": "2000", "balanceNum": 0, "timestamp": 6000, + "timestampMs": 6000000, "shardID": 2 } diff --git a/integrationtests/testdata/accountsESDTRollback/account-after-create.json b/integrationtests/testdata/accountsESDTRollback/account-after-create.json index fdc695f5..e4476991 100644 --- a/integrationtests/testdata/accountsESDTRollback/account-after-create.json +++ b/integrationtests/testdata/accountsESDTRollback/account-after-create.json @@ -12,5 +12,6 @@ "tokenNonce": 2, "properties": "3032", "token": "TOKEN-eeee", - "timestamp": 5040 + "timestamp": 5040, + "timestampMs": 5040000 } diff --git a/integrationtests/testdata/accountsESDTWithTokenType/account-esdt-with-type.json b/integrationtests/testdata/accountsESDTWithTokenType/account-esdt-with-type.json index cd053c28..514f7317 100644 --- a/integrationtests/testdata/accountsESDTWithTokenType/account-esdt-with-type.json +++ b/integrationtests/testdata/accountsESDTWithTokenType/account-esdt-with-type.json @@ -12,6 +12,7 @@ "whiteListedStorage": false }, "timestamp": 5600, + "timestampMs": 5600000, "type": "SemiFungibleESDT", "shardID": 2 } diff --git a/integrationtests/testdata/accountsESDTWithTokenType/account-esdt-without-type.json b/integrationtests/testdata/accountsESDTWithTokenType/account-esdt-without-type.json index 5b22dab0..cb342aeb 100644 --- a/integrationtests/testdata/accountsESDTWithTokenType/account-esdt-without-type.json +++ b/integrationtests/testdata/accountsESDTWithTokenType/account-esdt-without-type.json @@ -12,5 +12,6 @@ "whiteListedStorage": false }, "timestamp": 5600, + "timestampMs": 5600000, "shardID": 2 } diff --git a/integrationtests/testdata/accountsESDTWithTokenType/account-esdt.json b/integrationtests/testdata/accountsESDTWithTokenType/account-esdt.json index f8376e75..53543da7 100644 --- a/integrationtests/testdata/accountsESDTWithTokenType/account-esdt.json +++ b/integrationtests/testdata/accountsESDTWithTokenType/account-esdt.json @@ -12,6 +12,7 @@ "whiteListedStorage": false }, "timestamp": 5600, + "timestampMs": 5600000, "type": "SemiFungibleESDT", "currentOwner":"erd1sqy2ywvswp09ef7qwjhv8zwr9kzz3xas6y2ye5nuryaz0wcnfzzsnq0am3", "shardID": 2 diff --git a/integrationtests/testdata/accountsESDTWithTokenType/semi-fungible-token-after-create.json b/integrationtests/testdata/accountsESDTWithTokenType/semi-fungible-token-after-create.json index 16511e1b..0bc56d9c 100644 --- a/integrationtests/testdata/accountsESDTWithTokenType/semi-fungible-token-after-create.json +++ b/integrationtests/testdata/accountsESDTWithTokenType/semi-fungible-token-after-create.json @@ -3,6 +3,7 @@ "token": "TTTT-abcd", "nonce": 2, "timestamp": 5600, + "timestampMs": 5600000, "data": { "creator": "erd1l29zsl2dqq988kvr2y0xlfv9ydgnvhzkatfd8ccalpag265pje8qn8lslf", "nonEmptyURIs": false, diff --git a/integrationtests/testdata/accountsESDTWithTokenType/semi-fungible-token.json b/integrationtests/testdata/accountsESDTWithTokenType/semi-fungible-token.json index 46b05643..0ee2a06c 100644 --- a/integrationtests/testdata/accountsESDTWithTokenType/semi-fungible-token.json +++ b/integrationtests/testdata/accountsESDTWithTokenType/semi-fungible-token.json @@ -6,10 +6,12 @@ "currentOwner": "erd1l29zsl2dqq988kvr2y0xlfv9ydgnvhzkatfd8ccalpag265pje8qn8lslf", "type": "SemiFungibleESDT", "timestamp": 5040, + "timestampMs": 5040000, "ownersHistory": [ { "address": "erd1l29zsl2dqq988kvr2y0xlfv9ydgnvhzkatfd8ccalpag265pje8qn8lslf", - "timestamp": 5040 + "timestamp": 5040, + "timestampMs": 5040000 } ], "properties": { diff --git a/integrationtests/testdata/accountsESDTWithTokenType/token-after-issue.json b/integrationtests/testdata/accountsESDTWithTokenType/token-after-issue.json index c885b715..2b0398a2 100644 --- a/integrationtests/testdata/accountsESDTWithTokenType/token-after-issue.json +++ b/integrationtests/testdata/accountsESDTWithTokenType/token-after-issue.json @@ -6,10 +6,12 @@ "currentOwner": "erd1sqy2ywvswp09ef7qwjhv8zwr9kzz3xas6y2ye5nuryaz0wcnfzzsnq0am3", "type": "SemiFungibleESDT", "timestamp": 5040, + "timestampMs": 5040000, "ownersHistory": [ { "address": "erd1sqy2ywvswp09ef7qwjhv8zwr9kzz3xas6y2ye5nuryaz0wcnfzzsnq0am3", - "timestamp": 5040 + "timestamp": 5040, + "timestampMs": 5040000 } ], "properties": { diff --git a/integrationtests/testdata/claimRewards/tx-claim-rewards.json b/integrationtests/testdata/claimRewards/tx-claim-rewards.json index 044a0c5f..49c938f7 100644 --- a/integrationtests/testdata/claimRewards/tx-claim-rewards.json +++ b/integrationtests/testdata/claimRewards/tx-claim-rewards.json @@ -18,6 +18,7 @@ "data": "Y2xhaW1SZXdhcmRz", "signature": "", "timestamp": 5040, + "timestampMs": 5040000, "status": "success", "searchOrder": 0, "hasScResults": true, diff --git a/integrationtests/testdata/createNFTWithTags/accounts-esdt-address-balance.json b/integrationtests/testdata/createNFTWithTags/accounts-esdt-address-balance.json index a686b376..15e77272 100644 --- a/integrationtests/testdata/createNFTWithTags/accounts-esdt-address-balance.json +++ b/integrationtests/testdata/createNFTWithTags/accounts-esdt-address-balance.json @@ -22,5 +22,6 @@ "properties": "3032", "token": "DESK-abcd", "timestamp": 5600, + "timestampMs": 5600000, "shardID": 2 } diff --git a/integrationtests/testdata/delegators/delegator-after-delegate.json b/integrationtests/testdata/delegators/delegator-after-delegate.json index 00953069..1e6fa018 100644 --- a/integrationtests/testdata/delegators/delegator-after-delegate.json +++ b/integrationtests/testdata/delegators/delegator-after-delegate.json @@ -3,5 +3,6 @@ "contract": "erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqhllllsajxzat", "activeStake": "200000000000000000000", "activeStakeNum": 200, - "timestamp": 5040 + "timestamp": 5040, + "timestampMs": 5040000 } diff --git a/integrationtests/testdata/delegators/delegator-after-revert.json b/integrationtests/testdata/delegators/delegator-after-revert.json index 166ab014..2805bc77 100644 --- a/integrationtests/testdata/delegators/delegator-after-revert.json +++ b/integrationtests/testdata/delegators/delegator-after-revert.json @@ -4,12 +4,14 @@ "activeStake": "124500000000000000000", "activeStakeNum": 124.5, "timestamp": 5060, + "timestampMs": 5060000, "unDelegateInfo": [ { "valueNum": 50, "id": "31", "value": "50000000000000000000", - "timestamp": 5050 + "timestamp": 5050, + "timestampMs": 5050000 } ] } diff --git a/integrationtests/testdata/delegators/delegator-after-un-delegate-1.json b/integrationtests/testdata/delegators/delegator-after-un-delegate-1.json index dcc02ab3..0175a557 100644 --- a/integrationtests/testdata/delegators/delegator-after-un-delegate-1.json +++ b/integrationtests/testdata/delegators/delegator-after-un-delegate-1.json @@ -4,12 +4,14 @@ "activeStake": "150000000000000000000", "activeStakeNum": 150, "timestamp": 5050, + "timestampMs": 5050000, "unDelegateInfo": [ { "id": "31", "value": "50000000000000000000", "valueNum": 50, - "timestamp": 5050 + "timestamp": 5050, + "timestampMs": 5050000 } ] } diff --git a/integrationtests/testdata/delegators/delegator-after-un-delegate-2.json b/integrationtests/testdata/delegators/delegator-after-un-delegate-2.json index 2af228f0..95c2590d 100644 --- a/integrationtests/testdata/delegators/delegator-after-un-delegate-2.json +++ b/integrationtests/testdata/delegators/delegator-after-un-delegate-2.json @@ -4,18 +4,21 @@ "activeStake": "124500000000000000000", "activeStakeNum": 124.5, "timestamp": 5060, + "timestampMs": 5060000, "unDelegateInfo": [ { "valueNum": 50, "id": "31", "value": "50000000000000000000", - "timestamp": 5050 + "timestamp": 5050, + "timestampMs": 5050000 }, { "valueNum": 25.5, "id": "32", "value": "25500000000000000000", - "timestamp": 5060 + "timestamp": 5060, + "timestampMs": 5060000 } ] } diff --git a/integrationtests/testdata/delegators/delegator-after-withdraw.json b/integrationtests/testdata/delegators/delegator-after-withdraw.json index 2705940f..e6035ebe 100644 --- a/integrationtests/testdata/delegators/delegator-after-withdraw.json +++ b/integrationtests/testdata/delegators/delegator-after-withdraw.json @@ -3,5 +3,6 @@ "contract": "erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqhllllsajxzat", "activeStake": "124500000000000000000", "activeStakeNum": 124.5, - "timestamp": 5070 + "timestamp": 5070, + "timestampMs": 5070000 } diff --git a/integrationtests/testdata/esdtTransfer/esdt-transfer-cross-shard-on-destination.json b/integrationtests/testdata/esdtTransfer/esdt-transfer-cross-shard-on-destination.json index 81cd1701..95c7fb4a 100644 --- a/integrationtests/testdata/esdtTransfer/esdt-transfer-cross-shard-on-destination.json +++ b/integrationtests/testdata/esdtTransfer/esdt-transfer-cross-shard-on-destination.json @@ -17,6 +17,7 @@ "data": "RVNEVFRyYW5zZmVyQDU0NDc0ZTJkMzgzODYyMzgzMzY2QDBh", "signature": "", "timestamp": 10102, + "timestampMs": 10102000, "status": "success", "searchOrder": 0, "hasScResults": true, diff --git a/integrationtests/testdata/esdtTransfer/esdt-transfer-cross-shard-on-source.json b/integrationtests/testdata/esdtTransfer/esdt-transfer-cross-shard-on-source.json index 187e5d7b..1bf9a228 100644 --- a/integrationtests/testdata/esdtTransfer/esdt-transfer-cross-shard-on-source.json +++ b/integrationtests/testdata/esdtTransfer/esdt-transfer-cross-shard-on-source.json @@ -17,6 +17,7 @@ "data": "RVNEVFRyYW5zZmVyQDU0NDc0ZTJkMzgzODYyMzgzMzY2QDBh", "signature": "", "timestamp": 10101, + "timestampMs": 10101000, "status": "pending", "searchOrder": 0, "hasScResults": true, diff --git a/integrationtests/testdata/esdtTransfer/esdt-transfer-first-on-destination.json b/integrationtests/testdata/esdtTransfer/esdt-transfer-first-on-destination.json index 73b1a310..31e2d801 100644 --- a/integrationtests/testdata/esdtTransfer/esdt-transfer-first-on-destination.json +++ b/integrationtests/testdata/esdtTransfer/esdt-transfer-first-on-destination.json @@ -20,6 +20,7 @@ "value": "0", "gasPrice": 1000000000, "timestamp": 10102, + "timestampMs": 10102000, "receiver": "erd13u7zyekzvdvzek8768r5gau9p6677ufppsjuklu9e6t7yx7rhg4s68e2ze", "valueNum": 0, "feeNum": 0.00013766, diff --git a/integrationtests/testdata/esdtTransfer/esdt-transfer-second-on-source.json b/integrationtests/testdata/esdtTransfer/esdt-transfer-second-on-source.json index 2bbb9222..f2560f09 100644 --- a/integrationtests/testdata/esdtTransfer/esdt-transfer-second-on-source.json +++ b/integrationtests/testdata/esdtTransfer/esdt-transfer-second-on-source.json @@ -20,6 +20,7 @@ "value": "0", "gasPrice": 1000000000, "timestamp": 10102, + "timestampMs": 10102000, "receiver": "erd13u7zyekzvdvzek8768r5gau9p6677ufppsjuklu9e6t7yx7rhg4s68e2ze", "valueNum": 0, "feeNum": 0.000136, diff --git a/integrationtests/testdata/esdtTransfer/esdt-transfer.json b/integrationtests/testdata/esdtTransfer/esdt-transfer.json index 9f68664e..20ec79ec 100644 --- a/integrationtests/testdata/esdtTransfer/esdt-transfer.json +++ b/integrationtests/testdata/esdtTransfer/esdt-transfer.json @@ -17,6 +17,7 @@ "data": "RVNEVFRyYW5zZmVyQDU0NDc0ZTJkMzgzODYyMzgzMzY2QDBh", "signature": "", "timestamp": 5040, + "timestampMs": 5040000, "status": "success", "searchOrder": 0, "hasScResults": true, diff --git a/integrationtests/testdata/issueToken/token-semi-after-pause.json b/integrationtests/testdata/issueToken/token-semi-after-pause.json index a4c40241..f588d4e2 100644 --- a/integrationtests/testdata/issueToken/token-semi-after-pause.json +++ b/integrationtests/testdata/issueToken/token-semi-after-pause.json @@ -6,14 +6,17 @@ "currentOwner": "erd1acjlnuhkd8773sqhmw85r0ur4lcyuqgm0n69h9ttxh0gwxtuuzxq4lckh6", "type": "SemiFungibleESDT", "timestamp": 5040, + "timestampMs": 5040000, "ownersHistory": [ { "address": "erd1v7e552pz9py4hv6raan0c4jflez3e6csdmzcgrncg0qrnk4tywvsqx0h5j", - "timestamp": 5040 + "timestamp": 5040, + "timestampMs": 5040000 }, { "address": "erd1acjlnuhkd8773sqhmw85r0ur4lcyuqgm0n69h9ttxh0gwxtuuzxq4lckh6", - "timestamp": 10000 + "timestamp": 10000, + "timestampMs": 10000000 } ], "properties": { diff --git a/integrationtests/testdata/issueToken/token-semi-after-transfer-ownership.json b/integrationtests/testdata/issueToken/token-semi-after-transfer-ownership.json index 6e907c1a..0b0387fe 100644 --- a/integrationtests/testdata/issueToken/token-semi-after-transfer-ownership.json +++ b/integrationtests/testdata/issueToken/token-semi-after-transfer-ownership.json @@ -6,14 +6,17 @@ "currentOwner": "erd1acjlnuhkd8773sqhmw85r0ur4lcyuqgm0n69h9ttxh0gwxtuuzxq4lckh6", "type": "SemiFungibleESDT", "timestamp": 5040, + "timestampMs": 5040000, "ownersHistory": [ { "address": "erd1v7e552pz9py4hv6raan0c4jflez3e6csdmzcgrncg0qrnk4tywvsqx0h5j", - "timestamp": 5040 + "timestamp": 5040, + "timestampMs": 5040000 }, { "address": "erd1acjlnuhkd8773sqhmw85r0ur4lcyuqgm0n69h9ttxh0gwxtuuzxq4lckh6", - "timestamp": 10000 + "timestamp": 10000, + "timestampMs": 10000000 } ], "properties": { diff --git a/integrationtests/testdata/issueToken/token-semi-after-un-pause.json b/integrationtests/testdata/issueToken/token-semi-after-un-pause.json index 57d0af63..9af780cf 100644 --- a/integrationtests/testdata/issueToken/token-semi-after-un-pause.json +++ b/integrationtests/testdata/issueToken/token-semi-after-un-pause.json @@ -6,14 +6,17 @@ "currentOwner": "erd1acjlnuhkd8773sqhmw85r0ur4lcyuqgm0n69h9ttxh0gwxtuuzxq4lckh6", "type": "SemiFungibleESDT", "timestamp": 5040, + "timestampMs": 5040000, "ownersHistory": [ { "address": "erd1v7e552pz9py4hv6raan0c4jflez3e6csdmzcgrncg0qrnk4tywvsqx0h5j", - "timestamp": 5040 + "timestamp": 5040, + "timestampMs": 5040000 }, { "address": "erd1acjlnuhkd8773sqhmw85r0ur4lcyuqgm0n69h9ttxh0gwxtuuzxq4lckh6", - "timestamp": 10000 + "timestamp": 10000, + "timestampMs": 10000000 } ], "properties": { diff --git a/integrationtests/testdata/issueToken/token-semi.json b/integrationtests/testdata/issueToken/token-semi.json index 58d9ff09..9a66c2b5 100644 --- a/integrationtests/testdata/issueToken/token-semi.json +++ b/integrationtests/testdata/issueToken/token-semi.json @@ -6,10 +6,12 @@ "currentOwner": "erd1v7e552pz9py4hv6raan0c4jflez3e6csdmzcgrncg0qrnk4tywvsqx0h5j", "type": "SemiFungibleESDT", "timestamp": 5040, + "timestampMs": 5040000, "ownersHistory": [ { "address": "erd1v7e552pz9py4hv6raan0c4jflez3e6csdmzcgrncg0qrnk4tywvsqx0h5j", - "timestamp": 5040 + "timestamp": 5040, + "timestampMs": 5040000 } ], "numDecimals": 18, diff --git a/integrationtests/testdata/issueTokenAndChangeType/token-with-new-type.json b/integrationtests/testdata/issueTokenAndChangeType/token-with-new-type.json index 8f19fc4b..58d5c6a2 100644 --- a/integrationtests/testdata/issueTokenAndChangeType/token-with-new-type.json +++ b/integrationtests/testdata/issueTokenAndChangeType/token-with-new-type.json @@ -7,10 +7,12 @@ "numDecimals": 0, "type": "DynamicSemiFungibleESDT", "timestamp": 5040, + "timestampMs": 5040000, "ownersHistory": [ { "address": "erd1k04pxr6c0gvlcx4rd5fje0a4uy33axqxwz0fpcrgtfdy3nrqauqqgvxprv", - "timestamp": 5040 + "timestamp": 5040, + "timestampMs": 5040000 } ], "properties": { diff --git a/integrationtests/testdata/issueTokenAndChangeType/token.json b/integrationtests/testdata/issueTokenAndChangeType/token.json index 8b33340d..4d039d6d 100644 --- a/integrationtests/testdata/issueTokenAndChangeType/token.json +++ b/integrationtests/testdata/issueTokenAndChangeType/token.json @@ -7,10 +7,12 @@ "numDecimals": 0, "type": "SemiFungibleESDT", "timestamp": 5040, + "timestampMs": 5040000, "ownersHistory": [ { "address": "erd1k04pxr6c0gvlcx4rd5fje0a4uy33axqxwz0fpcrgtfdy3nrqauqqgvxprv", - "timestamp": 5040 + "timestamp": 5040, + "timestampMs": 5040000 } ], "properties": { diff --git a/integrationtests/testdata/issueTokenAndSetRoles/token-after-issue-ok.json b/integrationtests/testdata/issueTokenAndSetRoles/token-after-issue-ok.json index eb1b1f09..741533df 100644 --- a/integrationtests/testdata/issueTokenAndSetRoles/token-after-issue-ok.json +++ b/integrationtests/testdata/issueTokenAndSetRoles/token-after-issue-ok.json @@ -6,10 +6,12 @@ "currentOwner": "erd1k04pxr6c0gvlcx4rd5fje0a4uy33axqxwz0fpcrgtfdy3nrqauqqgvxprv", "type": "SemiFungibleESDT", "timestamp": 5040, + "timestampMs": 5040000, "ownersHistory": [ { "address": "erd1k04pxr6c0gvlcx4rd5fje0a4uy33axqxwz0fpcrgtfdy3nrqauqqgvxprv", - "timestamp": 5040 + "timestamp": 5040, + "timestampMs": 5040000 } ], "properties": { diff --git a/integrationtests/testdata/issueTokenAndSetRoles/token-after-set-role.json b/integrationtests/testdata/issueTokenAndSetRoles/token-after-set-role.json index ad5c4053..59f86140 100644 --- a/integrationtests/testdata/issueTokenAndSetRoles/token-after-set-role.json +++ b/integrationtests/testdata/issueTokenAndSetRoles/token-after-set-role.json @@ -6,10 +6,12 @@ "currentOwner": "erd1k04pxr6c0gvlcx4rd5fje0a4uy33axqxwz0fpcrgtfdy3nrqauqqgvxprv", "type": "SemiFungibleESDT", "timestamp": 5040, + "timestampMs": 5040000, "ownersHistory": [ { "address": "erd1k04pxr6c0gvlcx4rd5fje0a4uy33axqxwz0fpcrgtfdy3nrqauqqgvxprv", - "timestamp": 5040 + "timestamp": 5040, + "timestampMs": 5040000 } ], "roles": { diff --git a/integrationtests/testdata/issueTokenAndSetRoles/token-after-set-roles-and-issue.json b/integrationtests/testdata/issueTokenAndSetRoles/token-after-set-roles-and-issue.json index fda5e962..855227c5 100644 --- a/integrationtests/testdata/issueTokenAndSetRoles/token-after-set-roles-and-issue.json +++ b/integrationtests/testdata/issueTokenAndSetRoles/token-after-set-roles-and-issue.json @@ -14,10 +14,12 @@ "issuer": "erd1k04pxr6c0gvlcx4rd5fje0a4uy33axqxwz0fpcrgtfdy3nrqauqqgvxprv", "token": "TTT-abcd", "timestamp": 10000, + "timestampMs": 10000000, "ownersHistory": [ { "address": "erd1k04pxr6c0gvlcx4rd5fje0a4uy33axqxwz0fpcrgtfdy3nrqauqqgvxprv", - "timestamp": 10000 + "timestamp": 10000, + "timestampMs": 10000000 } ], "properties": { diff --git a/integrationtests/testdata/issueTokenAndSetRoles/token-after-transfer-role.json b/integrationtests/testdata/issueTokenAndSetRoles/token-after-transfer-role.json index 418a1245..82fceb7e 100644 --- a/integrationtests/testdata/issueTokenAndSetRoles/token-after-transfer-role.json +++ b/integrationtests/testdata/issueTokenAndSetRoles/token-after-transfer-role.json @@ -6,10 +6,12 @@ "currentOwner": "erd1k04pxr6c0gvlcx4rd5fje0a4uy33axqxwz0fpcrgtfdy3nrqauqqgvxprv", "type": "SemiFungibleESDT", "timestamp": 5040, + "timestampMs": 5040000, "ownersHistory": [ { "address": "erd1k04pxr6c0gvlcx4rd5fje0a4uy33axqxwz0fpcrgtfdy3nrqauqqgvxprv", - "timestamp": 5040 + "timestamp": 5040, + "timestampMs": 5040000 } ], "roles": { diff --git a/integrationtests/testdata/issueTokenAndSetRoles/token-after-unset-role.json b/integrationtests/testdata/issueTokenAndSetRoles/token-after-unset-role.json index 42c45bfe..07d6ead9 100644 --- a/integrationtests/testdata/issueTokenAndSetRoles/token-after-unset-role.json +++ b/integrationtests/testdata/issueTokenAndSetRoles/token-after-unset-role.json @@ -6,10 +6,12 @@ "currentOwner": "erd1k04pxr6c0gvlcx4rd5fje0a4uy33axqxwz0fpcrgtfdy3nrqauqqgvxprv", "type": "SemiFungibleESDT", "timestamp": 5040, + "timestampMs": 5040000, "ownersHistory": [ { "address": "erd1k04pxr6c0gvlcx4rd5fje0a4uy33axqxwz0fpcrgtfdy3nrqauqqgvxprv", - "timestamp": 5040 + "timestamp": 5040, + "timestampMs": 5040000 } ], "roles": { diff --git a/integrationtests/testdata/logsCrossShard/event-do-something.json b/integrationtests/testdata/logsCrossShard/event-do-something.json index 2490eea4..c7d626b7 100644 --- a/integrationtests/testdata/logsCrossShard/event-do-something.json +++ b/integrationtests/testdata/logsCrossShard/event-do-something.json @@ -10,5 +10,6 @@ "txHash": "63726f73732d6c6f67", "order": 1, "timestamp": 6040, + "timestampMs": 6040000, "txOrder": 0 } diff --git a/integrationtests/testdata/logsCrossShard/event-transfer-destination.json b/integrationtests/testdata/logsCrossShard/event-transfer-destination.json index c373f9be..b63d091a 100644 --- a/integrationtests/testdata/logsCrossShard/event-transfer-destination.json +++ b/integrationtests/testdata/logsCrossShard/event-transfer-destination.json @@ -11,5 +11,6 @@ "txHash": "63726f73732d6c6f67", "order": 0, "timestamp": 6040, + "timestampMs": 6040000, "txOrder": 0 } diff --git a/integrationtests/testdata/logsCrossShard/event-transfer-source-first.json b/integrationtests/testdata/logsCrossShard/event-transfer-source-first.json index d085f338..7992d558 100644 --- a/integrationtests/testdata/logsCrossShard/event-transfer-source-first.json +++ b/integrationtests/testdata/logsCrossShard/event-transfer-source-first.json @@ -11,5 +11,6 @@ "txOrder": 0, "txHash": "63726f73732d6c6f67", "order": 0, - "timestamp": 5040 + "timestamp": 5040, + "timestampMs": 5040000 } diff --git a/integrationtests/testdata/logsCrossShard/log-at-destination.json b/integrationtests/testdata/logsCrossShard/log-at-destination.json index e18c3000..452abf03 100644 --- a/integrationtests/testdata/logsCrossShard/log-at-destination.json +++ b/integrationtests/testdata/logsCrossShard/log-at-destination.json @@ -23,5 +23,6 @@ "order": 1 } ], - "timestamp": 6040 + "timestamp": 6040, + "timestampMs": 6040000 } diff --git a/integrationtests/testdata/logsCrossShard/log-at-source.json b/integrationtests/testdata/logsCrossShard/log-at-source.json index eaeee595..d8d269f0 100644 --- a/integrationtests/testdata/logsCrossShard/log-at-source.json +++ b/integrationtests/testdata/logsCrossShard/log-at-source.json @@ -13,5 +13,6 @@ "order": 0 } ], - "timestamp": 5040 + "timestamp": 5040, + "timestampMs": 5040000 } diff --git a/integrationtests/testdata/mappings/esdts.json b/integrationtests/testdata/mappings/esdts.json index da8bc0bd..f0f9c16d 100644 --- a/integrationtests/testdata/mappings/esdts.json +++ b/integrationtests/testdata/mappings/esdts.json @@ -27,6 +27,11 @@ "type": "date", "format": "epoch_second", "index": false + }, + "timestampMs": { + "type": "date", + "format": "epoch_millis", + "index": false } } }, @@ -110,10 +115,18 @@ "type": "date", "format": "epoch_second" }, + "timestampMs": { + "type": "date", + "format": "epoch_millis" + }, "changedToDynamicTimestamp": { "type": "date", "format": "epoch_second" }, + "changedToDynamicTimestampMs": { + "type": "date", + "format": "epoch_millis" + }, "token": { "type": "text" }, diff --git a/integrationtests/testdata/miniblocks/cross-miniblock-on-destination-first.json b/integrationtests/testdata/miniblocks/cross-miniblock-on-destination-first.json index a18dfa1e..1ed0c0b3 100644 --- a/integrationtests/testdata/miniblocks/cross-miniblock-on-destination-first.json +++ b/integrationtests/testdata/miniblocks/cross-miniblock-on-destination-first.json @@ -4,5 +4,6 @@ "senderShard": 2, "receiverBlockHash": "b36435faaa72390772da84f418348ce0d477c74432579519bf0ffea1dc4c36e9", "type": "TxBlock", - "timestamp": 54321 + "timestamp": 54321, + "timestampMs": 54321000 } diff --git a/integrationtests/testdata/miniblocks/cross-miniblock-on-destination.json b/integrationtests/testdata/miniblocks/cross-miniblock-on-destination.json index 6baab6f0..6a550803 100644 --- a/integrationtests/testdata/miniblocks/cross-miniblock-on-destination.json +++ b/integrationtests/testdata/miniblocks/cross-miniblock-on-destination.json @@ -5,6 +5,7 @@ "senderShard": 1, "type": "TxBlock", "timestamp": 1234, + "timestampMs": 1234000, "receiverBlockHash": "d7f1e8003a45c7adbd87bbbb269cb4af3d1f4aedd0c214973bfc096dd0f3b65e", "procTypeD": "Scheduled" } diff --git a/integrationtests/testdata/miniblocks/cross-miniblock-on-source-second.json b/integrationtests/testdata/miniblocks/cross-miniblock-on-source-second.json index 0ae4076f..c671a8f7 100644 --- a/integrationtests/testdata/miniblocks/cross-miniblock-on-source-second.json +++ b/integrationtests/testdata/miniblocks/cross-miniblock-on-source-second.json @@ -5,6 +5,7 @@ "receiverBlockHash": "b36435faaa72390772da84f418348ce0d477c74432579519bf0ffea1dc4c36e9", "type": "TxBlock", "timestamp": 54321, + "timestampMs": 54321000, "senderBlockHash": "b601381e1f41df2aa3da9f2b8eb169f14c86418229e30fc65f9e6b37b7f0d902", "procTypeS": "Normal" } diff --git a/integrationtests/testdata/miniblocks/cross-miniblock-on-source.json b/integrationtests/testdata/miniblocks/cross-miniblock-on-source.json index 98dce8aa..520254a5 100644 --- a/integrationtests/testdata/miniblocks/cross-miniblock-on-source.json +++ b/integrationtests/testdata/miniblocks/cross-miniblock-on-source.json @@ -4,5 +4,6 @@ "receiverShard": 2, "senderShard": 1, "type": "TxBlock", - "timestamp": 1234 + "timestamp": 1234, + "timestampMs": 1234000 } diff --git a/integrationtests/testdata/multiTransferWithScCallAndErrorSignaledBySC/transaction-after-execution-of-scr-dst-shard.json b/integrationtests/testdata/multiTransferWithScCallAndErrorSignaledBySC/transaction-after-execution-of-scr-dst-shard.json index 4a3a96b6..1c9613f7 100644 --- a/integrationtests/testdata/multiTransferWithScCallAndErrorSignaledBySC/transaction-after-execution-of-scr-dst-shard.json +++ b/integrationtests/testdata/multiTransferWithScCallAndErrorSignaledBySC/transaction-after-execution-of-scr-dst-shard.json @@ -33,6 +33,7 @@ "valueNum": 0, "gasPrice": 1000000000, "timestamp": 5040, + "timestampMs": 5040000, "receiver": "erd1ju8pkvg57cwdmjsjx58jlmnuf4l9yspstrhr9tgsrt98n9edpm2qtlgy99", "nonce": 79, "round": 50, diff --git a/integrationtests/testdata/multiTransferWithScCallAndErrorSignaledBySC/transaction-executed-on-source.json b/integrationtests/testdata/multiTransferWithScCallAndErrorSignaledBySC/transaction-executed-on-source.json index f5d08816..258d492b 100644 --- a/integrationtests/testdata/multiTransferWithScCallAndErrorSignaledBySC/transaction-executed-on-source.json +++ b/integrationtests/testdata/multiTransferWithScCallAndErrorSignaledBySC/transaction-executed-on-source.json @@ -33,6 +33,7 @@ "valueNum": 0, "gasPrice": 1000000000, "timestamp": 5040, + "timestampMs": 5040000, "receiver": "erd1ju8pkvg57cwdmjsjx58jlmnuf4l9yspstrhr9tgsrt98n9edpm2qtlgy99", "nonce": 79, "round": 50, diff --git a/integrationtests/testdata/nftIssueCreateBurn/non-fungible-after-create.json b/integrationtests/testdata/nftIssueCreateBurn/non-fungible-after-create.json index 05b98a79..7ab1623a 100644 --- a/integrationtests/testdata/nftIssueCreateBurn/non-fungible-after-create.json +++ b/integrationtests/testdata/nftIssueCreateBurn/non-fungible-after-create.json @@ -4,6 +4,7 @@ "type": "NonFungibleESDT", "nonce": 2, "timestamp": 5600, + "timestampMs": 5600000, "data": { "creator": "erd1ju8pkvg57cwdmjsjx58jlmnuf4l9yspstrhr9tgsrt98n9edpm2qtlgy99", "nonEmptyURIs": false, diff --git a/integrationtests/testdata/nftIssueCreateBurn/non-fungible-after-issue.json b/integrationtests/testdata/nftIssueCreateBurn/non-fungible-after-issue.json index 789798f8..d1da2f42 100644 --- a/integrationtests/testdata/nftIssueCreateBurn/non-fungible-after-issue.json +++ b/integrationtests/testdata/nftIssueCreateBurn/non-fungible-after-issue.json @@ -6,10 +6,12 @@ "currentOwner": "erd1ju8pkvg57cwdmjsjx58jlmnuf4l9yspstrhr9tgsrt98n9edpm2qtlgy99", "type": "NonFungibleESDT", "timestamp": 5040, + "timestampMs": 5040000, "ownersHistory": [ { "address": "erd1ju8pkvg57cwdmjsjx58jlmnuf4l9yspstrhr9tgsrt98n9edpm2qtlgy99", - "timestamp": 5040 + "timestamp": 5040, + "timestampMs": 5040000 } ], "properties": { diff --git a/integrationtests/testdata/nftIssueCreateBurn/non-fungible-v2-after-create.json b/integrationtests/testdata/nftIssueCreateBurn/non-fungible-v2-after-create.json index ec233947..022952e3 100644 --- a/integrationtests/testdata/nftIssueCreateBurn/non-fungible-v2-after-create.json +++ b/integrationtests/testdata/nftIssueCreateBurn/non-fungible-v2-after-create.json @@ -6,6 +6,7 @@ "type": "NonFungibleESDTv2", "nonce": 2, "timestamp": 5600, + "timestampMs": 5600000, "data": { "creator": "erd1ju8pkvg57cwdmjsjx58jlmnuf4l9yspstrhr9tgsrt98n9edpm2qtlgy99", "nonEmptyURIs": false, diff --git a/integrationtests/testdata/nftTransferCrossShard/op-nft-transfer-sc-call-after-refund.json b/integrationtests/testdata/nftTransferCrossShard/op-nft-transfer-sc-call-after-refund.json index 66973883..7b7141dd 100644 --- a/integrationtests/testdata/nftTransferCrossShard/op-nft-transfer-sc-call-after-refund.json +++ b/integrationtests/testdata/nftTransferCrossShard/op-nft-transfer-sc-call-after-refund.json @@ -17,6 +17,7 @@ "data": "RVNEVE5GVFRyYW5zZmVyQDRjNGI0NjQxNTI0ZDJkMzM2NjM0NjYzOTYyQDAxNjUzNEA2ZjFlNmYwMWJjNzYyN2Y1YWVAMDAwMDAwMDAwMDAwMDAwMDA1MDBmMWM4ZjJmZGM1OGE2M2M2YjIwMWZjMmVkNjI5OTYyZDNkZmEzM2ZlN2NlYkA2MzZmNmQ3MDZmNzU2ZTY0NTI2NTc3NjE3MjY0NzM1MDcyNmY3ODc5QDAwMDAwMDAwMDAwMDAwMDAwNTAwNGY3OWVjNDRiYjEzMzcyYjVhYzlkOTk2ZDc0OTEyMGY0NzY0Mjc2MjdjZWI=", "signature": "", "timestamp": 5040, + "timestampMs": 5040000, "status": "success", "searchOrder": 0, "hasScResults": true, diff --git a/integrationtests/testdata/nftTransferCrossShard/tx-complete-with-status.json b/integrationtests/testdata/nftTransferCrossShard/tx-complete-with-status.json index 34e1fa1d..07a39d94 100644 --- a/integrationtests/testdata/nftTransferCrossShard/tx-complete-with-status.json +++ b/integrationtests/testdata/nftTransferCrossShard/tx-complete-with-status.json @@ -33,6 +33,7 @@ "operation": "ESDTNFTTransfer", "gasPrice": 1000000000, "timestamp": 5040, + "timestampMs": 5040000, "status": "fail", "initialPaidFee": "595490000000000", "searchOrder": 0, diff --git a/integrationtests/testdata/nftTransferCrossShard/tx-nft-transfer-failed-on-dst.json b/integrationtests/testdata/nftTransferCrossShard/tx-nft-transfer-failed-on-dst.json index 42c7bff5..0e69db86 100644 --- a/integrationtests/testdata/nftTransferCrossShard/tx-nft-transfer-failed-on-dst.json +++ b/integrationtests/testdata/nftTransferCrossShard/tx-nft-transfer-failed-on-dst.json @@ -17,6 +17,7 @@ "data": "RVNEVE5GVFRyYW5zZmVyQDUzNmY2ZDY1NzQ2ODY5NmU2NzJkNjE2MjYzNjQ2NTY2QDAxQDAxQDAwMDAwMDAwMDAwMDAwMDAwNTAwYTdhMDI3NzFhYTA3MDkwZTYwN2YwMmIyNWY0ZDZkMjQxYmZmMzJiOTkwYTI=", "signature": "", "timestamp": 5040, + "timestampMs": 5040000, "status": "fail", "searchOrder": 0, "hasScResults": true, diff --git a/integrationtests/testdata/nftTransferCrossShard/tx-nft-transfer-sc-call-after-refund.json b/integrationtests/testdata/nftTransferCrossShard/tx-nft-transfer-sc-call-after-refund.json index 8adf0bcf..cc44efd8 100644 --- a/integrationtests/testdata/nftTransferCrossShard/tx-nft-transfer-sc-call-after-refund.json +++ b/integrationtests/testdata/nftTransferCrossShard/tx-nft-transfer-sc-call-after-refund.json @@ -17,6 +17,7 @@ "data": "RVNEVE5GVFRyYW5zZmVyQDRjNGI0NjQxNTI0ZDJkMzM2NjM0NjYzOTYyQDAxNjUzNEA2ZjFlNmYwMWJjNzYyN2Y1YWVAMDAwMDAwMDAwMDAwMDAwMDA1MDBmMWM4ZjJmZGM1OGE2M2M2YjIwMWZjMmVkNjI5OTYyZDNkZmEzM2ZlN2NlYkA2MzZmNmQ3MDZmNzU2ZTY0NTI2NTc3NjE3MjY0NzM1MDcyNmY3ODc5QDAwMDAwMDAwMDAwMDAwMDAwNTAwNGY3OWVjNDRiYjEzMzcyYjVhYzlkOTk2ZDc0OTEyMGY0NzY0Mjc2MjdjZWI=", "signature": "", "timestamp": 5040, + "timestampMs": 5040000, "status": "success", "searchOrder": 0, "hasScResults": true, diff --git a/integrationtests/testdata/nftTransferCrossShard/tx-nft-transfer-sc-call-source.json b/integrationtests/testdata/nftTransferCrossShard/tx-nft-transfer-sc-call-source.json index ac53e099..cce42570 100644 --- a/integrationtests/testdata/nftTransferCrossShard/tx-nft-transfer-sc-call-source.json +++ b/integrationtests/testdata/nftTransferCrossShard/tx-nft-transfer-sc-call-source.json @@ -34,6 +34,7 @@ "operation": "ESDTNFTTransfer", "gasPrice": 1000000000, "timestamp": 5040, + "timestampMs": 5040000, "status": "success", "initialPaidFee": "1904415000000000", "searchOrder": 0, diff --git a/integrationtests/testdata/nftTransferCrossShard/tx-nft-transfer-success-source-second.json b/integrationtests/testdata/nftTransferCrossShard/tx-nft-transfer-success-source-second.json index 412fd37f..a1904f9f 100644 --- a/integrationtests/testdata/nftTransferCrossShard/tx-nft-transfer-success-source-second.json +++ b/integrationtests/testdata/nftTransferCrossShard/tx-nft-transfer-success-source-second.json @@ -26,6 +26,7 @@ "value": "0", "gasPrice": 1000000000, "timestamp": 5040, + "timestampMs": 5040000, "receiver": "erd1ure7ea247clj6yqjg80unz6xzjhlj2zwm4gtg6sudcmtsd2cw3xs74hasv", "valueNum": 0, "feeNum": 0.00023882, diff --git a/integrationtests/testdata/nftTransferCrossShard/tx-nft-transfer.json b/integrationtests/testdata/nftTransferCrossShard/tx-nft-transfer.json index b2951f89..cc4445ad 100644 --- a/integrationtests/testdata/nftTransferCrossShard/tx-nft-transfer.json +++ b/integrationtests/testdata/nftTransferCrossShard/tx-nft-transfer.json @@ -34,6 +34,7 @@ "operation": "ESDTNFTTransfer", "gasPrice": 1000000000, "timestamp": 5040, + "timestampMs": 5040000, "status": "success", "searchOrder": 0, "epoch": 0 diff --git a/integrationtests/testdata/nftTransferCrossShardWithScCall/cross-shard-transfer-with-sc-call.json b/integrationtests/testdata/nftTransferCrossShardWithScCall/cross-shard-transfer-with-sc-call.json index 3891231f..48863d0d 100644 --- a/integrationtests/testdata/nftTransferCrossShardWithScCall/cross-shard-transfer-with-sc-call.json +++ b/integrationtests/testdata/nftTransferCrossShardWithScCall/cross-shard-transfer-with-sc-call.json @@ -17,6 +17,7 @@ "data": "RVNEVE5GVFRyYW5zZmVyQDRkNDU1ODQ2NDE1MjRkMmQ2MzYzNjIzMjM1MzJAMDc4YkAwMzQ3NTQzZTViNTljOWJlODY3MEAwMDAwMDAwMDAwMDAwMDAwMDUwMGE3YTAyNzcxYWEwNzA5MGU2MDdmMDJiMjVmNGQ2ZDI0MWJmZjMyYjk5MGEyQDYzNmM2MTY5NmQ1MjY1Nzc2MTcyNjQ3Mw==", "signature": "", "timestamp": 5040, + "timestampMs": 5040000, "status": "success", "searchOrder": 0, "hasScResults": true, diff --git a/integrationtests/testdata/relayedTx/relayed-tx-after-refund.json b/integrationtests/testdata/relayedTx/relayed-tx-after-refund.json index 9551d92a..f80a18a9 100644 --- a/integrationtests/testdata/relayedTx/relayed-tx-after-refund.json +++ b/integrationtests/testdata/relayedTx/relayed-tx-after-refund.json @@ -17,6 +17,7 @@ "data": "cmVsYXllZFR4QDdiMjI2ZTZmNmU2MzY1MjIzYTMyMmMyMjc2NjE2Yzc1NjUyMjNhMzAyYzIyNzI2NTYzNjU2OTc2NjU3MjIyM2EyMjQxNDE0MTQxNDE0MTQxNDE0MTQxNDE0NjQxNDk3NDY3MzczODM1MmY3MzZjNzM1NTQxNDg2ODZiNTczMzQ1Njk2MjRjNmU0NzUyNGI3NjQ5NmY0ZTRkM2QyMjJjMjI3MzY1NmU2NDY1NzIyMjNhMjI3MjZiNmU1MzRhNDc3YTM0Mzc2OTUzNGU3OTRiNDM2NDJmNTA0ZjcxNzA3NTc3NmI1NDc3Njg0NTM0MzA2ZDdhNDc2YTU4NWE1MTY4NmU2MjJiNzI0ZDNkMjIyYzIyNjc2MTczNTA3MjY5NjM2NTIyM2EzMTMwMzAzMDMwMzAzMDMwMzAzMDJjMjI2NzYxNzM0YzY5NmQ2OTc0MjIzYTMxMzUzMDMwMzAzMDMwMzAyYzIyNjQ2MTc0NjEyMjNhMjI2MzMyNDYzMjVhNTU0NjMwNjQ0NzU2N2E2NDQ3NDYzMDYxNTczOTc1NTE0NDQ2Njg1OTdhNDkzMTRkNmE1OTM1NTk2ZDUxMzM1YTQ0NDk3NzU5MzI0YTY5NTk1NDRkMzE1OTZkNTY2YzRmNDQ1OTMxNGQ0NDY0Njg0ZjU3NGU2YTRlN2E2NzdhNWE0NzU1Nzc0ZjQ0NWE2OTRlNDQ0NTMzNGU1NDZiMzQ1YTU0NTE3YTU5NTQ0ZTZiNWE2YTU2NmE1OTMyNDU3OTVhNTQ2ODY4NGQ2YTZjNDE0ZDZhNTEzNDRlNTQ2NzdhNGQ1NzRlNmQ0ZDU0NDUzMDRkNTQ1NjZkNTk2YTQxMzU0ZDZhNjM3NzRlNDQ1MTMyNGU1NzU1MzI0ZTdhNTk3YTU5NTc0ZDMxNGY0NDQ1MzQ1YTU0NjczMTRlNDc1MTM0NTk1NzUyNmQ0ZTU0NDE3YTU5NmE2MzM1NGQ2YTZjNmI0ZjU0NTI2YzRlNmQ0OTc5NGU2YTQ5Nzc1YTY3M2QzZDIyMmMyMjYzNjg2MTY5NmU0OTQ0MjIzYTIyNGQ1MTNkM2QyMjJjMjI3NjY1NzI3MzY5NmY2ZTIyM2EzMTJjMjI3MzY5Njc2ZTYxNzQ3NTcyNjUyMjNhMjI1MjM5NDYyYjM0NTQ2MzUyNDE1YTM4NmQ3NzcxMzI0NTU5MzAzMTYzNTk2YzMzNzY2MjcxNmM0NjY1NzE3NjM4N2E3NjQ3NGE3NzVhNjgzMzU5NGQ0ZjU1NmI0MjM0NjQzNDUxNTc0ZTY2Mzc2NzQ0NjI2YzQ4NDgzMjU3NmI3MTYxNGE3NjYxNDg0NTc0NDM1NjYxNzA0OTcxMzM2NTM1NjU2MjM4NGU0MTc3M2QzZDIyN2Q=", "signature": "", "timestamp": 5040, + "timestampMs": 5040000, "status": "success", "searchOrder": 0, "hasScResults": true, diff --git a/integrationtests/testdata/relayedTx/relayed-tx-intra.json b/integrationtests/testdata/relayedTx/relayed-tx-intra.json index dca3547e..c253da37 100644 --- a/integrationtests/testdata/relayedTx/relayed-tx-intra.json +++ b/integrationtests/testdata/relayedTx/relayed-tx-intra.json @@ -17,6 +17,7 @@ "data": "cmVsYXllZFR4QDdiMjI2ZTZmNmU2MzY1MjIzYTMwMmMyMjc2NjE2Yzc1NjUyMjNhMzAyYzIyNzI2NTYzNjU2OTc2NjU3MjIyM2EyMjcyNmI2ZTUzNGE0NzdhMzQzNzY5NTM0ZTc5NGI0MzY0MmY1MDRmNzE3MDc1Nzc2YjU0Nzc2ODQ1MzQzMDZkN2E0NzZhNTg1YTUxNjg2ZTYyMmI3MjRkM2QyMjJjMjI3MzY1NmU2NDY1NzIyMjNhMjI3MjZiNmU1MzRhNDc3YTM0Mzc2OTUzNGU3OTRiNDM2NDJmNTA0ZjcxNzA3NTc3NmI1NDc3Njg0NTM0MzA2ZDdhNDc2YTU4NWE1MTY4NmU2MjJiNzI0ZDNkMjIyYzIyNjc2MTczNTA3MjY5NjM2NTIyM2EzMTMwMzAzMDMwMzAzMDMwMzAzMDJjMjI2NzYxNzM0YzY5NmQ2OTc0MjIzYTMxMzMzMjMzMzIzMDMwMzAyYzIyNjQ2MTc0NjEyMjNhMjI1NTMyNDYzMjVhNTU3NDZjNjU1NjVhNjg2MjQ4NTY2YzUxNDQ1OTc5NGU2YjU1MzI0ZDZiNDEzMjRkNmE1YTQ2NGU2YTQ5N2E0ZDU0NGQzNTRlNmE1NTMyNGQ1NDRkMzI0ZTZiNGQzMjUxNTQ2Mzc4NGQ3YTZiMzI1MTdhNjMzMDRlNmE1NTMzNGU0NDYzMzA0ZTdhNjczMjRlNTQ0ZDMzNGU3YTUxN2E0ZTdhNTkzMzRlNmI1NTdhNGQ0NDYzNzc0ZDdhNDk3YTRmNTQ2NDQyNGU3YTU5MzM0ZTU0NWE0NDRlNmE0NTMzNGU1NDU5MzI0ZTZhNjMzMzRlNTQ0ZDMwNGU3YTQ1N2E0ZTdhNTkzMzRlN2E0YTQxNGU2YTU1MzM0ZTQ0NTkzNDUxNDQ0ZDc3NGU3YTY3N2E0ZDU0NGQzMDRlNDQ1MTMyNGQ2YTRkNzg0ZTZhNTU3YTRkNDQ0ZDMxNGU2YTU5N2E0ZTU0NTE3YTRlNmE0NTdhNGU1NDRkMzE0ZTZhNDk3YTRkNTQ0ZDdhNGU0NDQ1MzA0ZDdhNTk3ODRkN2E2MzMyNGQ3YTRkMzA0ZTZhNGQ3YTRkNDQ0ZDc4NGU2YTU5N2E0ZTU0NTkzMDRlNDQ1NTdhNGU1NDRkMzE0ZTQ0NDk3YTRmNTQ1MTdhNGU0NDQ1MzI0ZTZhNTk3ODRkN2E2MzdhNGY1NTQxMzI0ZDZhNjMzMDRlNmE0ZTQxNGU2YTQ5MzI0ZDdhNGQ3ODRlN2E0NTMyNGQ1NDU5MzE0ZDdhNTU3YTRmNDQ0ZDdhNGQ3YTRkMzM0ZDZhNjM3OTRlN2E1OTdhNGU0NDRkNzc0ZDdhNDE3YTRlNTQ1YTQ0NGU2YTU5MzI1MjQ0NGQzMTRlN2E1OTMyNTI0NDRkMzI0ZTdhNTUzMjUxNTQ2MzMyNGU2YTUxN2E0ZTQ0NTk3YTRlN2E1MTdhNGY1NDVhNDI0ZTZhNGQ3YTRlNTQ1YTQyNGU3YTYzMzM1MTU0NGQzNDRlNmE1NTMzNGY0NDYzNzcyMjJjMjI2MzY4NjE2OTZlNDk0NDIyM2EyMjRkNTEzZDNkMjIyYzIyNzY2NTcyNzM2OTZmNmUyMjNhMzEyYzIyNzM2OTY3NmU2MTc0NzU3MjY1MjIzYTIyNzE2NjcwNGE0Nzc2NzM0NDQ0NDI1NTUxNGUyZjUyNTU0NzRmNTA1Mzc1NTIzMjQ4NGY0YTYxNGI3MDM4NDUzNjYzNGU1NDc3MzAzMzQzMzc2OTM0NTU3Nzc2MmY0YzU0NzM2ZDJiNmE3MDQyMzk3NTZjNDgzOTY2NTMyYjQ0NzE2MTcyNzE0ZjYyNDg0MTcwMzg2NjZkNzIzMDZhNDE1NTMxNzM2ZTM1NDE2NzNkM2QyMjdk", "signature": "", "timestamp": 5040, + "timestampMs": 5040000, "status": "success", "searchOrder": 0, "hasScResults": true, diff --git a/integrationtests/testdata/relayedTx/relayed-tx-source.json b/integrationtests/testdata/relayedTx/relayed-tx-source.json index 4e6d217a..64347021 100644 --- a/integrationtests/testdata/relayedTx/relayed-tx-source.json +++ b/integrationtests/testdata/relayedTx/relayed-tx-source.json @@ -17,6 +17,7 @@ "data": "cmVsYXllZFR4QDdiMjI2ZTZmNmU2MzY1MjIzYTMyMmMyMjc2NjE2Yzc1NjUyMjNhMzAyYzIyNzI2NTYzNjU2OTc2NjU3MjIyM2EyMjQxNDE0MTQxNDE0MTQxNDE0MTQxNDE0NjQxNDk3NDY3MzczODM1MmY3MzZjNzM1NTQxNDg2ODZiNTczMzQ1Njk2MjRjNmU0NzUyNGI3NjQ5NmY0ZTRkM2QyMjJjMjI3MzY1NmU2NDY1NzIyMjNhMjI3MjZiNmU1MzRhNDc3YTM0Mzc2OTUzNGU3OTRiNDM2NDJmNTA0ZjcxNzA3NTc3NmI1NDc3Njg0NTM0MzA2ZDdhNDc2YTU4NWE1MTY4NmU2MjJiNzI0ZDNkMjIyYzIyNjc2MTczNTA3MjY5NjM2NTIyM2EzMTMwMzAzMDMwMzAzMDMwMzAzMDJjMjI2NzYxNzM0YzY5NmQ2OTc0MjIzYTMxMzUzMDMwMzAzMDMwMzAyYzIyNjQ2MTc0NjEyMjNhMjI2MzMyNDYzMjVhNTU0NjMwNjQ0NzU2N2E2NDQ3NDYzMDYxNTczOTc1NTE0NDQ2Njg1OTdhNDkzMTRkNmE1OTM1NTk2ZDUxMzM1YTQ0NDk3NzU5MzI0YTY5NTk1NDRkMzE1OTZkNTY2YzRmNDQ1OTMxNGQ0NDY0Njg0ZjU3NGU2YTRlN2E2NzdhNWE0NzU1Nzc0ZjQ0NWE2OTRlNDQ0NTMzNGU1NDZiMzQ1YTU0NTE3YTU5NTQ0ZTZiNWE2YTU2NmE1OTMyNDU3OTVhNTQ2ODY4NGQ2YTZjNDE0ZDZhNTEzNDRlNTQ2NzdhNGQ1NzRlNmQ0ZDU0NDUzMDRkNTQ1NjZkNTk2YTQxMzU0ZDZhNjM3NzRlNDQ1MTMyNGU1NzU1MzI0ZTdhNTk3YTU5NTc0ZDMxNGY0NDQ1MzQ1YTU0NjczMTRlNDc1MTM0NTk1NzUyNmQ0ZTU0NDE3YTU5NmE2MzM1NGQ2YTZjNmI0ZjU0NTI2YzRlNmQ0OTc5NGU2YTQ5Nzc1YTY3M2QzZDIyMmMyMjYzNjg2MTY5NmU0OTQ0MjIzYTIyNGQ1MTNkM2QyMjJjMjI3NjY1NzI3MzY5NmY2ZTIyM2EzMTJjMjI3MzY5Njc2ZTYxNzQ3NTcyNjUyMjNhMjI1MjM5NDYyYjM0NTQ2MzUyNDE1YTM4NmQ3NzcxMzI0NTU5MzAzMTYzNTk2YzMzNzY2MjcxNmM0NjY1NzE3NjM4N2E3NjQ3NGE3NzVhNjgzMzU5NGQ0ZjU1NmI0MjM0NjQzNDUxNTc0ZTY2Mzc2NzQ0NjI2YzQ4NDgzMjU3NmI3MTYxNGE3NjYxNDg0NTc0NDM1NjYxNzA0OTcxMzM2NTM1NjU2MjM4NGU0MTc3M2QzZDIyN2Q=", "signature": "", "timestamp": 5040, + "timestampMs": 5040000, "status": "success", "searchOrder": 0, "hasScResults": true, diff --git a/integrationtests/testdata/relayedTxV3/relayed-v3-no-refund.json b/integrationtests/testdata/relayedTxV3/relayed-v3-no-refund.json index aabff5b8..cd47c384 100644 --- a/integrationtests/testdata/relayedTxV3/relayed-v3-no-refund.json +++ b/integrationtests/testdata/relayedTxV3/relayed-v3-no-refund.json @@ -17,6 +17,7 @@ "data": "ZG9Tb21ldGhpbmc=", "signature": "64", "timestamp": 5040, + "timestampMs": 5040000, "status": "success", "searchOrder": 0, "isScCall": true, diff --git a/integrationtests/testdata/relayedTxV3/relayed-v3-with-one-refund.json b/integrationtests/testdata/relayedTxV3/relayed-v3-with-one-refund.json index d0c40bba..c74cc40e 100644 --- a/integrationtests/testdata/relayedTxV3/relayed-v3-with-one-refund.json +++ b/integrationtests/testdata/relayedTxV3/relayed-v3-with-one-refund.json @@ -17,6 +17,7 @@ "data": "ZG9Tb21ldGhpbmc=", "signature": "64", "timestamp": 5040, + "timestampMs": 5040000, "status": "success", "searchOrder": 0, "isScCall": true, diff --git a/integrationtests/testdata/relayedTxV3/relayed-v3-with-two-refunds.json b/integrationtests/testdata/relayedTxV3/relayed-v3-with-two-refunds.json index 62e10c15..764f218f 100644 --- a/integrationtests/testdata/relayedTxV3/relayed-v3-with-two-refunds.json +++ b/integrationtests/testdata/relayedTxV3/relayed-v3-with-two-refunds.json @@ -17,6 +17,7 @@ "data": "ZG9Tb21ldGhpbmc=", "signature": "64", "timestamp": 5040, + "timestampMs": 5040000, "status": "success", "searchOrder": 0, "isScCall": true, diff --git a/integrationtests/testdata/scCallIntraShard/claim-rewards.json b/integrationtests/testdata/scCallIntraShard/claim-rewards.json index 7e8d77ca..0ad03caf 100644 --- a/integrationtests/testdata/scCallIntraShard/claim-rewards.json +++ b/integrationtests/testdata/scCallIntraShard/claim-rewards.json @@ -17,6 +17,7 @@ "data": "Y2xhaW1SZXdhcmRz", "signature": "", "timestamp": 5040, + "timestampMs": 5040000, "status": "success", "searchOrder": 0, "hasScResults": true, diff --git a/integrationtests/testdata/scCallIntraShard/sc-call-fail.json b/integrationtests/testdata/scCallIntraShard/sc-call-fail.json index 22dac8d7..3811e1dc 100644 --- a/integrationtests/testdata/scCallIntraShard/sc-call-fail.json +++ b/integrationtests/testdata/scCallIntraShard/sc-call-fail.json @@ -17,6 +17,7 @@ "data": "ZGVsZWdhdGU=", "signature": "", "timestamp": 5040, + "timestampMs": 5040000, "status": "fail", "searchOrder": 0, "hasScResults": true, diff --git a/integrationtests/testdata/scCallWithIssueEsdt/scr-with-callback-executed-on-destination-shard.json b/integrationtests/testdata/scCallWithIssueEsdt/scr-with-callback-executed-on-destination-shard.json index 5b145d2c..e5e416f8 100644 --- a/integrationtests/testdata/scCallWithIssueEsdt/scr-with-callback-executed-on-destination-shard.json +++ b/integrationtests/testdata/scCallWithIssueEsdt/scr-with-callback-executed-on-destination-shard.json @@ -14,6 +14,7 @@ "originalTxHash": "747857697468536343616c6c", "callType": "2", "timestamp": 5040, + "timestampMs": 5040000, "hasOperations": true, "type": "unsigned", "status": "success", diff --git a/integrationtests/testdata/scCallWithIssueEsdt/scr-with-callback-executed-on-source.json b/integrationtests/testdata/scCallWithIssueEsdt/scr-with-callback-executed-on-source.json index d409e116..d783b0be 100644 --- a/integrationtests/testdata/scCallWithIssueEsdt/scr-with-callback-executed-on-source.json +++ b/integrationtests/testdata/scCallWithIssueEsdt/scr-with-callback-executed-on-source.json @@ -14,6 +14,7 @@ "originalTxHash": "747857697468536343616c6c", "callType": "2", "timestamp": 5040, + "timestampMs": 5040000, "type": "unsigned", "status": "pending", "operation": "transfer", diff --git a/integrationtests/testdata/scCallWithIssueEsdt/scr-with-issue-executed-on-destination-shard.json b/integrationtests/testdata/scCallWithIssueEsdt/scr-with-issue-executed-on-destination-shard.json index cccd0b56..b536be43 100644 --- a/integrationtests/testdata/scCallWithIssueEsdt/scr-with-issue-executed-on-destination-shard.json +++ b/integrationtests/testdata/scCallWithIssueEsdt/scr-with-issue-executed-on-destination-shard.json @@ -14,6 +14,7 @@ "originalTxHash": "747857697468536343616c6c", "callType": "1", "timestamp": 5040, + "timestampMs": 5040000, "type": "unsigned", "status": "success", "operation": "transfer", diff --git a/integrationtests/testdata/scCallWithIssueEsdt/scr-with-issue-executed-on-source-shard.json b/integrationtests/testdata/scCallWithIssueEsdt/scr-with-issue-executed-on-source-shard.json index 7339cb15..c6d0700c 100644 --- a/integrationtests/testdata/scCallWithIssueEsdt/scr-with-issue-executed-on-source-shard.json +++ b/integrationtests/testdata/scCallWithIssueEsdt/scr-with-issue-executed-on-source-shard.json @@ -14,6 +14,7 @@ "originalTxHash": "747857697468536343616c6c", "callType": "1", "timestamp": 5040, + "timestampMs": 5040000, "type": "unsigned", "status": "pending", "operation": "transfer", diff --git a/integrationtests/testdata/scCallWithIssueEsdt/tx-after-execution-of-callback-on-destination-shard.json b/integrationtests/testdata/scCallWithIssueEsdt/tx-after-execution-of-callback-on-destination-shard.json index ed524a11..f44f5da7 100644 --- a/integrationtests/testdata/scCallWithIssueEsdt/tx-after-execution-of-callback-on-destination-shard.json +++ b/integrationtests/testdata/scCallWithIssueEsdt/tx-after-execution-of-callback-on-destination-shard.json @@ -17,6 +17,7 @@ "data": "aXNzdWVUb2tlbkA0RDc5NTQ2NTczNzQ0RTY2NzQ2NEA1NDQ1NTM1NDRFNDY1NA==", "signature": "", "timestamp": 5040, + "timestampMs": 5040000, "status": "fail", "searchOrder": 0, "hasScResults": true, diff --git a/integrationtests/testdata/scCallWithIssueEsdt/tx-after-execution-on-source-shard.json b/integrationtests/testdata/scCallWithIssueEsdt/tx-after-execution-on-source-shard.json index cb9c4326..41185cb4 100644 --- a/integrationtests/testdata/scCallWithIssueEsdt/tx-after-execution-on-source-shard.json +++ b/integrationtests/testdata/scCallWithIssueEsdt/tx-after-execution-on-source-shard.json @@ -17,6 +17,7 @@ "data": "aXNzdWVUb2tlbkA0RDc5NTQ2NTczNzQ0RTY2NzQ2NEA1NDQ1NTM1NDRFNDY1NA==", "signature": "", "timestamp": 5040, + "timestampMs": 5040000, "status": "success", "searchOrder": 0, "hasScResults": true, diff --git a/integrationtests/testdata/scCallWithIssueEsdt/tx-in-op-index-execution-of-callback-on-destination-shard.json b/integrationtests/testdata/scCallWithIssueEsdt/tx-in-op-index-execution-of-callback-on-destination-shard.json index f13509ee..e8bd9a81 100644 --- a/integrationtests/testdata/scCallWithIssueEsdt/tx-in-op-index-execution-of-callback-on-destination-shard.json +++ b/integrationtests/testdata/scCallWithIssueEsdt/tx-in-op-index-execution-of-callback-on-destination-shard.json @@ -17,6 +17,7 @@ "data": "aXNzdWVUb2tlbkA0RDc5NTQ2NTczNzQ0RTY2NzQ2NEA1NDQ1NTM1NDRFNDY1NA==", "signature": "", "timestamp": 5040, + "timestampMs": 5040000, "status": "fail", "searchOrder": 0, "hasScResults": true, diff --git a/integrationtests/testdata/scDeploy/deploy-after-upgrade-and-change-owner-second.json b/integrationtests/testdata/scDeploy/deploy-after-upgrade-and-change-owner-second.json index eaadb107..03bc7f19 100644 --- a/integrationtests/testdata/scDeploy/deploy-after-upgrade-and-change-owner-second.json +++ b/integrationtests/testdata/scDeploy/deploy-after-upgrade-and-change-owner-second.json @@ -4,24 +4,28 @@ "currentOwner": "erd1y78ds2tvzw6ntcggldjld2vk96wgq0mj47mk6auny0nkvn242e3sd4qz7m", "initialCodeHash": "Y29kZUhhc2g=", "timestamp": 5040, + "timestampMs": 5040000, "upgrades": [ { "upgradeTxHash": "6832", "codeHash": "c2Vjb25kQ29kZUhhc2g=", "upgrader": "erd12m3x8jp6dl027pj5f2nw6ght2cyhhjfrs86cdwsa8xn83r375qfqrwpdx0", - "timestamp": 6000 + "timestamp": 6000, + "timestampMs": 6000000 } ], "owners": [ { "address": "erd1d942l8w4yvgjffpqacs8vdwl0mndsv0zn0uxa80hxc3xmq4477eqnyw3dh", "txHash": "6833", - "timestamp": 7000 + "timestamp": 7000, + "timestampMs": 7000000 }, { "address": "erd1y78ds2tvzw6ntcggldjld2vk96wgq0mj47mk6auny0nkvn242e3sd4qz7m", "txHash": "6834", - "timestamp": 8000 + "timestamp": 8000, + "timestampMs": 8000000 } ] } diff --git a/integrationtests/testdata/scDeploy/deploy-after-upgrade-and-change-owner.json b/integrationtests/testdata/scDeploy/deploy-after-upgrade-and-change-owner.json index e4824dd0..94df269d 100644 --- a/integrationtests/testdata/scDeploy/deploy-after-upgrade-and-change-owner.json +++ b/integrationtests/testdata/scDeploy/deploy-after-upgrade-and-change-owner.json @@ -4,19 +4,22 @@ "currentOwner": "erd1d942l8w4yvgjffpqacs8vdwl0mndsv0zn0uxa80hxc3xmq4477eqnyw3dh", "initialCodeHash": "Y29kZUhhc2g=", "timestamp": 5040, + "timestampMs": 5040000, "upgrades": [ { "upgradeTxHash": "6832", "codeHash": "c2Vjb25kQ29kZUhhc2g=", "upgrader": "erd12m3x8jp6dl027pj5f2nw6ght2cyhhjfrs86cdwsa8xn83r375qfqrwpdx0", - "timestamp": 6000 + "timestamp": 6000, + "timestampMs": 6000000 } ], "owners": [ { "address": "erd1d942l8w4yvgjffpqacs8vdwl0mndsv0zn0uxa80hxc3xmq4477eqnyw3dh", "txHash": "6833", - "timestamp": 7000 + "timestamp": 7000, + "timestampMs": 7000000 } ] } diff --git a/integrationtests/testdata/scDeploy/deploy-after-upgrade.json b/integrationtests/testdata/scDeploy/deploy-after-upgrade.json index 687b1969..5b77d4f3 100644 --- a/integrationtests/testdata/scDeploy/deploy-after-upgrade.json +++ b/integrationtests/testdata/scDeploy/deploy-after-upgrade.json @@ -4,12 +4,14 @@ "currentOwner": "erd12m3x8jp6dl027pj5f2nw6ght2cyhhjfrs86cdwsa8xn83r375qfqrwpdx0", "initialCodeHash": "Y29kZUhhc2g=", "timestamp": 5040, + "timestampMs": 5040000, "upgrades": [ { "upgradeTxHash": "6832", "codeHash": "c2Vjb25kQ29kZUhhc2g=", "upgrader": "erd12m3x8jp6dl027pj5f2nw6ght2cyhhjfrs86cdwsa8xn83r375qfqrwpdx0", - "timestamp": 6000 + "timestamp": 6000, + "timestampMs": 6000000 } ], "owners": [] diff --git a/integrationtests/testdata/scDeploy/deploy.json b/integrationtests/testdata/scDeploy/deploy.json index 4f8bd080..19f4249a 100644 --- a/integrationtests/testdata/scDeploy/deploy.json +++ b/integrationtests/testdata/scDeploy/deploy.json @@ -3,6 +3,7 @@ "deployer": "erd12m3x8jp6dl027pj5f2nw6ght2cyhhjfrs86cdwsa8xn83r375qfqrwpdx0", "currentOwner": "erd12m3x8jp6dl027pj5f2nw6ght2cyhhjfrs86cdwsa8xn83r375qfqrwpdx0", "timestamp": 5040, + "timestampMs": 5040000, "initialCodeHash": "Y29kZUhhc2g=", "upgrades": [], "owners": [] diff --git a/integrationtests/testdata/scDeploy/tx-deploy-with-error-event.json b/integrationtests/testdata/scDeploy/tx-deploy-with-error-event.json index 1bd1c109..ca0cdd8a 100644 --- a/integrationtests/testdata/scDeploy/tx-deploy-with-error-event.json +++ b/integrationtests/testdata/scDeploy/tx-deploy-with-error-event.json @@ -17,6 +17,7 @@ "data": "MDA2MTczNmQwMTAwMDAwMDAxMGQwMzYwMDAwMDYwMDAwMTdmNjAwMjdmN2YwMDAyM2UwMzAzNjU2ZTc2MGY2NzY1NzQ0ZTc1NmQ0MTcyNjc3NTZkNjU2ZTc0NzMwMDAxMDM2NTZlNzYwYjczNjk2NzZlNjE2YzQ1NzI3MjZmNzIwMDAyMDM2NTZlNzYwZTYzNjg2NTYzNmI0ZTZmNTA2MTc5NmQ2NTZlNzQwMDAwMDMwMzAyMDAwMDA1MDMwMTAwMDMwNjBmMDI3ZjAwNDE5OTgwMDgwYjdmMDA0MWEwODAwODBiMDczNzA1MDY2ZDY1NmQ2ZjcyNzkwMjAwMDQ2OTZlNjk3NDAwMDMwODYzNjE2YzZjNDI2MTYzNmIwMDA0MGE1ZjVmNjQ2MTc0NjE1ZjY1NmU2NDAzMDAwYjVmNWY2ODY1NjE3MDVmNjI2MTczNjUwMzAxMGExODAyMTIwMDEwMDIxMDAwMDQ0MDQxODA4MDA4NDExOTEwMDEwMDBiMGIwMzAwMDEwYjBiMjEwMTAwNDE4MDgwMDgwYjE5Nzc3MjZmNmU2NzIwNmU3NTZkNjI2NTcyMjA2ZjY2MjA2MTcyNjc3NTZkNjU2ZTc0NzNAMDUwMEAwNTAy", "signature": "", "timestamp": 5040, + "timestampMs": 5040000, "status": "fail", "searchOrder": 0, "isScCall": true, diff --git a/integrationtests/testdata/scDeploy/tx-sc-deploy.json b/integrationtests/testdata/scDeploy/tx-sc-deploy.json index ad7da041..5dfddc0d 100644 --- a/integrationtests/testdata/scDeploy/tx-sc-deploy.json +++ b/integrationtests/testdata/scDeploy/tx-sc-deploy.json @@ -17,6 +17,7 @@ "data": "MDA2MTczNmQwMTAwMDAwMDAxMGQwMzYwMDAwMDYwMDAwMTdmNjAwMjdmN2YwMDAyM2UwMzAzNjU2ZTc2MGY2NzY1NzQ0ZTc1NmQ0MTcyNjc3NTZkNjU2ZTc0NzMwMDAxMDM2NTZlNzYwYjczNjk2NzZlNjE2YzQ1NzI3MjZmNzIwMDAyMDM2NTZlNzYwZTYzNjg2NTYzNmI0ZTZmNTA2MTc5NmQ2NTZlNzQwMDAwMDMwMzAyMDAwMDA1MDMwMTAwMDMwNjBmMDI3ZjAwNDE5OTgwMDgwYjdmMDA0MWEwODAwODBiMDczNzA1MDY2ZDY1NmQ2ZjcyNzkwMjAwMDQ2OTZlNjk3NDAwMDMwODYzNjE2YzZjNDI2MTYzNmIwMDA0MGE1ZjVmNjQ2MTc0NjE1ZjY1NmU2NDAzMDAwYjVmNWY2ODY1NjE3MDVmNjI2MTczNjUwMzAxMGExODAyMTIwMDEwMDIxMDAwMDQ0MDQxODA4MDA4NDExOTEwMDEwMDBiMGIwMzAwMDEwYjBiMjEwMTAwNDE4MDgwMDgwYjE5Nzc3MjZmNmU2NzIwNmU3NTZkNjI2NTcyMjA2ZjY2MjA2MTcyNjc3NTZkNjU2ZTc0NzNAMDUwMEAwNTAy", "signature": "", "timestamp": 5040, + "timestampMs": 5040000, "status": "success", "searchOrder": 0, "isScCall": true, diff --git a/integrationtests/testdata/transactions/move-balance.json b/integrationtests/testdata/transactions/move-balance.json index b5b56f0f..9b24b0de 100644 --- a/integrationtests/testdata/transactions/move-balance.json +++ b/integrationtests/testdata/transactions/move-balance.json @@ -17,6 +17,7 @@ "data": "dHJhbnNmZXI=", "signature": "", "timestamp": 5040, + "timestampMs": 5040000, "status": "success", "searchOrder": 0, "operation": "transfer", diff --git a/integrationtests/testdata/updateNFT/token-after-add-uris.json b/integrationtests/testdata/updateNFT/token-after-add-uris.json index cb54e606..91519905 100644 --- a/integrationtests/testdata/updateNFT/token-after-add-uris.json +++ b/integrationtests/testdata/updateNFT/token-after-add-uris.json @@ -4,6 +4,7 @@ "numDecimals": 0, "nonce": 14, "timestamp": 5040, + "timestampMs": 5040000, "data": { "uris": [ "dXJp", diff --git a/integrationtests/testdata/updateNFT/token-after-freeze.json b/integrationtests/testdata/updateNFT/token-after-freeze.json index 587dd76a..4bc3b34c 100644 --- a/integrationtests/testdata/updateNFT/token-after-freeze.json +++ b/integrationtests/testdata/updateNFT/token-after-freeze.json @@ -4,6 +4,7 @@ "numDecimals": 0, "nonce": 14, "timestamp": 5040, + "timestampMs": 5040000, "data": { "uris": [ "dXJp", diff --git a/integrationtests/testdata/updateNFT/token-after-new-creator.json b/integrationtests/testdata/updateNFT/token-after-new-creator.json index ac967297..ab6f8616 100644 --- a/integrationtests/testdata/updateNFT/token-after-new-creator.json +++ b/integrationtests/testdata/updateNFT/token-after-new-creator.json @@ -4,6 +4,7 @@ "numDecimals": 0, "nonce": 14, "timestamp": 5040, + "timestampMs": 5040000, "data": { "uris": [ "dXJp", diff --git a/integrationtests/testdata/updateNFT/token-after-new-royalties.json b/integrationtests/testdata/updateNFT/token-after-new-royalties.json index b8eb8dbc..142d3807 100644 --- a/integrationtests/testdata/updateNFT/token-after-new-royalties.json +++ b/integrationtests/testdata/updateNFT/token-after-new-royalties.json @@ -4,6 +4,7 @@ "numDecimals": 0, "nonce": 14, "timestamp": 5040, + "timestampMs": 5040000, "data": { "uris": [ "dXJp", diff --git a/integrationtests/testdata/updateNFT/token-after-recreate.json b/integrationtests/testdata/updateNFT/token-after-recreate.json index 3b2385f6..b4c0ff86 100644 --- a/integrationtests/testdata/updateNFT/token-after-recreate.json +++ b/integrationtests/testdata/updateNFT/token-after-recreate.json @@ -4,6 +4,7 @@ "numDecimals": 0, "nonce": 100, "timestamp": 5040, + "timestampMs": 5040000, "data": { "uris": [ "dXJp" diff --git a/integrationtests/testdata/updateNFT/token-after-set-new-uris.json b/integrationtests/testdata/updateNFT/token-after-set-new-uris.json index c3b3ad8a..4555a3ee 100644 --- a/integrationtests/testdata/updateNFT/token-after-set-new-uris.json +++ b/integrationtests/testdata/updateNFT/token-after-set-new-uris.json @@ -4,6 +4,7 @@ "numDecimals": 0, "nonce": 14, "timestamp": 5040, + "timestampMs": 5040000, "data": { "uris": [ "dXJp", diff --git a/integrationtests/testdata/updateNFT/token-after-un-freeze.json b/integrationtests/testdata/updateNFT/token-after-un-freeze.json index 0e791b5a..8e28184f 100644 --- a/integrationtests/testdata/updateNFT/token-after-un-freeze.json +++ b/integrationtests/testdata/updateNFT/token-after-un-freeze.json @@ -4,6 +4,7 @@ "numDecimals": 0, "nonce": 14, "timestamp": 5040, + "timestampMs": 5040000, "data": { "uris": [ "dXJp", diff --git a/integrationtests/testdata/updateNFT/token-after-update-attributes-second.json b/integrationtests/testdata/updateNFT/token-after-update-attributes-second.json index 088aac10..db57f0dd 100644 --- a/integrationtests/testdata/updateNFT/token-after-update-attributes-second.json +++ b/integrationtests/testdata/updateNFT/token-after-update-attributes-second.json @@ -4,6 +4,7 @@ "numDecimals": 0, "nonce": 14, "timestamp": 5040, + "timestampMs": 5040000, "data": { "uris": [ "dXJp", diff --git a/integrationtests/testdata/updateNFT/token-after-update-attributes.json b/integrationtests/testdata/updateNFT/token-after-update-attributes.json index 43bb9c4d..27a92fe9 100644 --- a/integrationtests/testdata/updateNFT/token-after-update-attributes.json +++ b/integrationtests/testdata/updateNFT/token-after-update-attributes.json @@ -4,6 +4,7 @@ "numDecimals": 0, "nonce": 14, "timestamp": 5040, + "timestampMs": 5040000, "data": { "uris": [ "dXJp", diff --git a/integrationtests/testdata/updateNFT/token-after-update.json b/integrationtests/testdata/updateNFT/token-after-update.json index ebb9c835..1e7527e9 100644 --- a/integrationtests/testdata/updateNFT/token-after-update.json +++ b/integrationtests/testdata/updateNFT/token-after-update.json @@ -4,6 +4,7 @@ "numDecimals": 0, "nonce": 100, "timestamp": 5040, + "timestampMs": 5040000, "data": { "uris": [ "dXJp" diff --git a/integrationtests/testdata/updateNFT/token-before-recreate.json b/integrationtests/testdata/updateNFT/token-before-recreate.json index 8abec9d2..d6d65238 100644 --- a/integrationtests/testdata/updateNFT/token-before-recreate.json +++ b/integrationtests/testdata/updateNFT/token-before-recreate.json @@ -4,6 +4,7 @@ "numDecimals": 0, "nonce": 100, "timestamp": 5040, + "timestampMs": 5040000, "data": { "name": "token-token-token", "uris": [ diff --git a/integrationtests/testdata/updateNFT/token-color-1.json b/integrationtests/testdata/updateNFT/token-color-1.json index 4c4f1a45..4e7ae6e6 100644 --- a/integrationtests/testdata/updateNFT/token-color-1.json +++ b/integrationtests/testdata/updateNFT/token-color-1.json @@ -4,6 +4,7 @@ "numDecimals": 0, "nonce": 1, "timestamp": 5040, + "timestampMs": 5040000, "data": { "uris": [ "dXJp" diff --git a/integrationtests/testdata/updateNFT/token-color-2.json b/integrationtests/testdata/updateNFT/token-color-2.json index 87eccc69..fa9362db 100644 --- a/integrationtests/testdata/updateNFT/token-color-2.json +++ b/integrationtests/testdata/updateNFT/token-color-2.json @@ -4,6 +4,7 @@ "numDecimals": 0, "nonce": 2, "timestamp": 5040, + "timestampMs": 5040000, "data": { "uris": [ "dXJp" diff --git a/integrationtests/testdata/updateNFT/token.json b/integrationtests/testdata/updateNFT/token.json index cb54e606..91519905 100644 --- a/integrationtests/testdata/updateNFT/token.json +++ b/integrationtests/testdata/updateNFT/token.json @@ -4,6 +4,7 @@ "numDecimals": 0, "nonce": 14, "timestamp": 5040, + "timestampMs": 5040000, "data": { "uris": [ "dXJp", diff --git a/mock/dbAccountsHandlerStub.go b/mock/dbAccountsHandlerStub.go index 35747c27..c9305d41 100644 --- a/mock/dbAccountsHandlerStub.go +++ b/mock/dbAccountsHandlerStub.go @@ -7,7 +7,7 @@ import ( // DBAccountsHandlerStub - type DBAccountsHandlerStub struct { - PrepareAccountsHistoryCalled func(timestamp uint64, accounts map[string]*data.AccountInfo) map[string]*data.AccountBalanceHistory + PrepareAccountsHistoryCalled func(accounts map[string]*data.AccountInfo, timestampMS uint64) map[string]*data.AccountBalanceHistory SerializeAccountsHistoryCalled func(accounts map[string]*data.AccountBalanceHistory, buffSlice *data.BufferSlice, index string) error } @@ -17,19 +17,19 @@ func (dba *DBAccountsHandlerStub) GetAccounts(_ map[string]*alteredAccount.Alter } // PrepareRegularAccountsMap - -func (dba *DBAccountsHandlerStub) PrepareRegularAccountsMap(_ uint64, _ []*data.Account, _ uint32) map[string]*data.AccountInfo { +func (dba *DBAccountsHandlerStub) PrepareRegularAccountsMap(_ []*data.Account, _ uint32, _ uint64) map[string]*data.AccountInfo { return nil } // PrepareAccountsMapESDT - -func (dba *DBAccountsHandlerStub) PrepareAccountsMapESDT(_ uint64, _ []*data.AccountESDT, _ data.CountTags, _ uint32) (map[string]*data.AccountInfo, data.TokensHandler) { +func (dba *DBAccountsHandlerStub) PrepareAccountsMapESDT(_ []*data.AccountESDT, _ data.CountTags, _ uint32, _ uint64) (map[string]*data.AccountInfo, data.TokensHandler) { return nil, nil } // PrepareAccountsHistory - -func (dba *DBAccountsHandlerStub) PrepareAccountsHistory(timestamp uint64, accounts map[string]*data.AccountInfo, _ uint32) map[string]*data.AccountBalanceHistory { +func (dba *DBAccountsHandlerStub) PrepareAccountsHistory(accounts map[string]*data.AccountInfo, _ uint32, timestampMS uint64) map[string]*data.AccountBalanceHistory { if dba.PrepareAccountsHistoryCalled != nil { - return dba.PrepareAccountsHistoryCalled(timestamp, accounts) + return dba.PrepareAccountsHistoryCalled(accounts, timestampMS) } return nil diff --git a/mock/dbTransactionsHandlerStub.go b/mock/dbTransactionsHandlerStub.go index c4aff654..b50d85f9 100644 --- a/mock/dbTransactionsHandlerStub.go +++ b/mock/dbTransactionsHandlerStub.go @@ -20,7 +20,7 @@ func (tps *DBTransactionProcessorStub) SerializeTransactionsFeeData(_ map[string } // PrepareTransactionsForDatabase - -func (tps *DBTransactionProcessorStub) PrepareTransactionsForDatabase(mbs []*block.MiniBlock, header coreData.HeaderHandler, pool *outport.TransactionPool, _ bool, _ uint32) *data.PreparedResults { +func (tps *DBTransactionProcessorStub) PrepareTransactionsForDatabase(mbs []*block.MiniBlock, header coreData.HeaderHandler, pool *outport.TransactionPool, _ bool, _ uint32, _ uint64) *data.PreparedResults { if tps.PrepareTransactionsForDatabaseCalled != nil { return tps.PrepareTransactionsForDatabaseCalled(mbs, header, pool) } diff --git a/mock/elasticProcessorStub.go b/mock/elasticProcessorStub.go index 3d01b732..b9f7dd7a 100644 --- a/mock/elasticProcessorStub.go +++ b/mock/elasticProcessorStub.go @@ -12,19 +12,19 @@ type ElasticProcessorStub struct { RemoveHeaderCalled func(header coreData.HeaderHandler) error RemoveMiniblocksCalled func(header coreData.HeaderHandler, body *block.Body) error RemoveTransactionsCalled func(header coreData.HeaderHandler, body *block.Body) error - SaveMiniblocksCalled func(header coreData.HeaderHandler, miniBlocks []*block.MiniBlock) error + SaveMiniblocksCalled func(header coreData.HeaderHandler, miniBlocks []*block.MiniBlock, timestampMs uint64) error SaveTransactionsCalled func(outportBlockWithHeader *outport.OutportBlockWithHeader) error SaveValidatorsRatingCalled func(validatorsRating *outport.ValidatorsRating) error SaveRoundsInfoCalled func(infos *outport.RoundsInfo) error SaveShardValidatorsPubKeysCalled func(validators *outport.ValidatorsPubKeys) error SaveAccountsCalled func(accountsData *outport.Accounts) error - RemoveAccountsESDTCalled func(headerTimestamp uint64) error + RemoveAccountsESDTCalled func(shardID uint32, timestampMS uint64) error } // RemoveAccountsESDT - -func (eim *ElasticProcessorStub) RemoveAccountsESDT(headerTimestamp uint64, _ uint32) error { +func (eim *ElasticProcessorStub) RemoveAccountsESDT(shardID uint32, timestampMS uint64) error { if eim.RemoveAccountsESDTCalled != nil { - return eim.RemoveAccountsESDTCalled(headerTimestamp) + return eim.RemoveAccountsESDTCalled(shardID, timestampMS) } return nil @@ -55,7 +55,7 @@ func (eim *ElasticProcessorStub) RemoveMiniblocks(header coreData.HeaderHandler, } // RemoveTransactions - -func (eim *ElasticProcessorStub) RemoveTransactions(header coreData.HeaderHandler, body *block.Body) error { +func (eim *ElasticProcessorStub) RemoveTransactions(header coreData.HeaderHandler, body *block.Body, _ uint64) error { if eim.RemoveMiniblocksCalled != nil { return eim.RemoveTransactionsCalled(header, body) } @@ -63,9 +63,9 @@ func (eim *ElasticProcessorStub) RemoveTransactions(header coreData.HeaderHandle } // SaveMiniblocks - -func (eim *ElasticProcessorStub) SaveMiniblocks(header coreData.HeaderHandler, miniBlocks []*block.MiniBlock) error { +func (eim *ElasticProcessorStub) SaveMiniblocks(header coreData.HeaderHandler, miniBlocks []*block.MiniBlock, timestampMs uint64) error { if eim.SaveMiniblocksCalled != nil { - return eim.SaveMiniblocksCalled(header, miniBlocks) + return eim.SaveMiniblocksCalled(header, miniBlocks, timestampMs) } return nil } diff --git a/process/dataindexer/dataIndexer.go b/process/dataindexer/dataIndexer.go index 9f75e343..ca2460d8 100644 --- a/process/dataindexer/dataIndexer.go +++ b/process/dataindexer/dataIndexer.go @@ -115,7 +115,7 @@ func (di *dataIndexer) saveBlockData(outportBlock *outport.OutportBlock, header } miniBlocks := append(outportBlock.BlockData.Body.MiniBlocks, outportBlock.BlockData.IntraShardMiniBlocks...) - err = di.elasticProcessor.SaveMiniblocks(header, miniBlocks) + err = di.elasticProcessor.SaveMiniblocks(header, miniBlocks, outportBlock.BlockData.GetTimestampMs()) if err != nil { return fmt.Errorf("%w when saving miniblocks, block hash %s, nonce %d", err, hex.EncodeToString(headerHash), headerNonce) @@ -152,12 +152,12 @@ func (di *dataIndexer) RevertIndexedBlock(blockData *outport.BlockData) error { return err } - err = di.elasticProcessor.RemoveTransactions(header, blockData.Body) + err = di.elasticProcessor.RemoveTransactions(header, blockData.Body, blockData.TimestampMs) if err != nil { return err } - return di.elasticProcessor.RemoveAccountsESDT(header.GetTimeStamp(), header.GetShardID()) + return di.elasticProcessor.RemoveAccountsESDT(header.GetShardID(), blockData.TimestampMs) } // SaveRoundsInfo will save data about a slice of rounds in elasticsearch diff --git a/process/dataindexer/dataIndexer_test.go b/process/dataindexer/dataIndexer_test.go index 88970177..0a6404c2 100644 --- a/process/dataindexer/dataIndexer_test.go +++ b/process/dataindexer/dataIndexer_test.go @@ -62,7 +62,7 @@ func TestDataIndexer_SaveBlock(t *testing.T) { countMap[0]++ return nil }, - SaveMiniblocksCalled: func(header coreData.HeaderHandler, miniBlocks []*dataBlock.MiniBlock) error { + SaveMiniblocksCalled: func(header coreData.HeaderHandler, miniBlocks []*dataBlock.MiniBlock, timestampMs uint64) error { countMap[1]++ return nil }, @@ -167,7 +167,7 @@ func TestDataIndexer_RevertIndexedBlock(t *testing.T) { countMap[2]++ return nil }, - RemoveAccountsESDTCalled: func(headerTimestamp uint64) error { + RemoveAccountsESDTCalled: func(_ uint32, _ uint64) error { countMap[3]++ return nil }, diff --git a/process/dataindexer/errors.go b/process/dataindexer/errors.go index 9b4fbd0f..82a142fe 100644 --- a/process/dataindexer/errors.go +++ b/process/dataindexer/errors.go @@ -88,3 +88,6 @@ var ErrNilOperationsHandler = errors.New("nil operations handler") // ErrNilBlockContainerHandler signals that a nil block container handler has been provided var ErrNilBlockContainerHandler = errors.New("nil bock container handler") + +// ErrNilMappingsHandler signals that a nil mappings handler has been provided +var ErrNilMappingsHandler = errors.New("nil mappings handler") diff --git a/process/dataindexer/interface.go b/process/dataindexer/interface.go index cb99ab00..1583de6b 100644 --- a/process/dataindexer/interface.go +++ b/process/dataindexer/interface.go @@ -15,9 +15,9 @@ type ElasticProcessor interface { SaveHeader(outportBlockWithHeader *outport.OutportBlockWithHeader) error RemoveHeader(header coreData.HeaderHandler) error RemoveMiniblocks(header coreData.HeaderHandler, body *block.Body) error - RemoveTransactions(header coreData.HeaderHandler, body *block.Body) error - RemoveAccountsESDT(headerTimestamp uint64, shardID uint32) error - SaveMiniblocks(header coreData.HeaderHandler, miniBlocks []*block.MiniBlock) error + RemoveTransactions(header coreData.HeaderHandler, body *block.Body, uint65 uint64) error + RemoveAccountsESDT(shardID uint32, timestampMS uint64) error + SaveMiniblocks(header coreData.HeaderHandler, miniBlocks []*block.MiniBlock, timestampMS uint64) error SaveTransactions(outportBlockWithHeader *outport.OutportBlockWithHeader) error SaveValidatorsRating(ratingData *outport.ValidatorsRating) error SaveRoundsInfo(rounds *outport.RoundsInfo) error diff --git a/process/elasticproc/accounts/accountsProcessor.go b/process/elasticproc/accounts/accountsProcessor.go index 1c24bfea..11a92c5a 100644 --- a/process/elasticproc/accounts/accountsProcessor.go +++ b/process/elasticproc/accounts/accountsProcessor.go @@ -3,9 +3,6 @@ package accounts import ( "encoding/hex" "fmt" - "math/big" - "time" - "github.com/multiversx/mx-chain-core-go/core" "github.com/multiversx/mx-chain-core-go/core/check" "github.com/multiversx/mx-chain-core-go/data/alteredAccount" @@ -13,6 +10,7 @@ import ( "github.com/multiversx/mx-chain-es-indexer-go/process/dataindexer" "github.com/multiversx/mx-chain-es-indexer-go/process/elasticproc/converters" logger "github.com/multiversx/mx-chain-logger-go" + "math/big" ) var log = logger.GetOrCreate("indexer/process/accounts") @@ -101,8 +99,9 @@ func notZeroBalance(balance string) bool { } // PrepareRegularAccountsMap will prepare a map of regular accounts -func (ap *accountsProcessor) PrepareRegularAccountsMap(timestamp uint64, accounts []*data.Account, shardID uint32) map[string]*data.AccountInfo { +func (ap *accountsProcessor) PrepareRegularAccountsMap(accounts []*data.Account, shardID uint32, timestampMs uint64) map[string]*data.AccountInfo { accountsMap := make(map[string]*data.AccountInfo) + timestampSeconds := converters.MillisecondsToSeconds(timestampMs) for _, userAccount := range accounts { address := userAccount.UserAccount.Address addressBytes, err := ap.addressPubkeyConverter.Decode(address) @@ -129,8 +128,9 @@ func (ap *accountsProcessor) PrepareRegularAccountsMap(timestamp uint64, account BalanceNum: balanceAsFloat, IsSender: userAccount.IsSender, IsSmartContract: core.IsSmartContractAddress(addressBytes), - Timestamp: time.Duration(timestamp), + Timestamp: timestampSeconds, ShardID: shardID, + TimestampMs: timestampMs, } ap.addAdditionalDataInAccount(userAccount.UserAccount.AdditionalData, acc) @@ -179,13 +179,14 @@ func (ap *accountsProcessor) addDeveloperRewardsInAccount(additionalData *altere // PrepareAccountsMapESDT will prepare a map of accounts with ESDT tokens func (ap *accountsProcessor) PrepareAccountsMapESDT( - timestamp uint64, accounts []*data.AccountESDT, tagsCount data.CountTags, shardID uint32, + timestampMs uint64, ) (map[string]*data.AccountInfo, data.TokensHandler) { tokensData := data.NewTokensInfo() accountsESDTMap := make(map[string]*data.AccountInfo) + timestampSeconds := converters.MillisecondsToSeconds(timestampMs) for _, accountESDT := range accounts { address := accountESDT.Account.Address addressBytes, err := ap.addressPubkeyConverter.Decode(address) @@ -224,8 +225,9 @@ func (ap *accountsProcessor) PrepareAccountsMapESDT( IsSender: accountESDT.IsSender, IsSmartContract: core.IsSmartContractAddress(addressBytes), Data: tokenMetaData, - Timestamp: time.Duration(timestamp), + Timestamp: timestampSeconds, ShardID: shardID, + TimestampMs: timestampMs, } if acc.TokenNonce == 0 { @@ -250,22 +252,24 @@ func (ap *accountsProcessor) PrepareAccountsMapESDT( // PrepareAccountsHistory will prepare a map of accounts history balance from a map of accounts func (ap *accountsProcessor) PrepareAccountsHistory( - timestamp uint64, accounts map[string]*data.AccountInfo, shardID uint32, + timestampMs uint64, ) map[string]*data.AccountBalanceHistory { + timestampSeconds := converters.MillisecondsToSeconds(timestampMs) accountsMap := make(map[string]*data.AccountBalanceHistory) for _, userAccount := range accounts { acc := &data.AccountBalanceHistory{ Address: userAccount.Address, Balance: userAccount.Balance, - Timestamp: time.Duration(timestamp), + Timestamp: timestampSeconds, Token: userAccount.TokenName, TokenNonce: userAccount.TokenNonce, IsSender: userAccount.IsSender, IsSmartContract: userAccount.IsSmartContract, Identifier: converters.ComputeTokenIdentifier(userAccount.TokenName, userAccount.TokenNonce), ShardID: shardID, + TimestampMs: timestampMs, } keyInMap := fmt.Sprintf("%s-%s-%d", acc.Address, acc.Token, acc.TokenNonce) accountsMap[keyInMap] = acc diff --git a/process/elasticproc/accounts/accountsProcessor_test.go b/process/elasticproc/accounts/accountsProcessor_test.go index b9c8b7bd..03a07dee 100644 --- a/process/elasticproc/accounts/accountsProcessor_test.go +++ b/process/elasticproc/accounts/accountsProcessor_test.go @@ -4,10 +4,6 @@ import ( "bytes" "encoding/hex" "errors" - "math/big" - "testing" - "time" - "github.com/multiversx/mx-chain-core-go/core" "github.com/multiversx/mx-chain-core-go/data/alteredAccount" "github.com/multiversx/mx-chain-es-indexer-go/data" @@ -16,6 +12,8 @@ import ( "github.com/multiversx/mx-chain-es-indexer-go/process/elasticproc/converters" "github.com/multiversx/mx-chain-es-indexer-go/process/elasticproc/tags" "github.com/stretchr/testify/require" + "math/big" + "testing" ) var balanceConverter, _ = converters.NewBalanceConverter(10) @@ -74,7 +72,7 @@ func TestAccountsProcessor_PrepareRegularAccountsMapWithNil(t *testing.T) { ap, _ := NewAccountsProcessor(mock.NewPubkeyConverterMock(32), balanceConverter) - accountsInfo := ap.PrepareRegularAccountsMap(0, nil, 0) + accountsInfo := ap.PrepareRegularAccountsMap(nil, 0, 0) require.Len(t, accountsInfo, 0) } @@ -285,14 +283,15 @@ func TestAccountsProcessor_PrepareAccountsMapEGLD(t *testing.T) { balanceNum, _ := balanceConverter.ComputeBalanceAsFloat(big.NewInt(1000)) - res := ap.PrepareRegularAccountsMap(123, []*data.Account{egldAccount}, 0) + res := ap.PrepareRegularAccountsMap([]*data.Account{egldAccount}, 0, 123000) require.Equal(t, &data.AccountInfo{ Address: addr, Nonce: 1, Balance: "1000", BalanceNum: balanceNum, IsSmartContract: true, - Timestamp: time.Duration(123), + Timestamp: uint64(123), + TimestampMs: uint64(123000), CodeHash: []byte("code"), CodeMetadata: []byte("metadata"), RootHash: []byte("root"), @@ -337,7 +336,7 @@ func TestAccountsProcessor_PrepareAccountsMapESDT(t *testing.T) { } tagsCount := tags.NewTagsCount() - res, _ := ap.PrepareAccountsMapESDT(123, accountsESDT, tagsCount, 0) + res, _ := ap.PrepareAccountsMapESDT(accountsESDT, tagsCount, 0, 123000) require.Len(t, res, 2) balanceNum, _ := balanceConverter.ComputeBalanceAsFloat(big.NewInt(1000)) @@ -353,7 +352,8 @@ func TestAccountsProcessor_PrepareAccountsMapESDT(t *testing.T) { Creator: "creator", Attributes: make([]byte, 0), }, - Timestamp: time.Duration(123), + Timestamp: uint64(123), + TimestampMs: uint64(123000), }, res[hex.EncodeToString([]byte(addr))+"-token-15"]) require.Equal(t, &data.AccountInfo{ @@ -368,7 +368,8 @@ func TestAccountsProcessor_PrepareAccountsMapESDT(t *testing.T) { Creator: "creator", Attributes: make([]byte, 0), }, - Timestamp: time.Duration(123), + Timestamp: uint64(123), + TimestampMs: uint64(123000), }, res[hex.EncodeToString([]byte(addr))+"-token-16"]) } @@ -387,16 +388,17 @@ func TestAccountsProcessor_PrepareAccountsHistory(t *testing.T) { ap, _ := NewAccountsProcessor(mock.NewPubkeyConverterMock(32), balanceConverter) - res := ap.PrepareAccountsHistory(100, accounts, 0) + res := ap.PrepareAccountsHistory(accounts, 0, 100000) accountBalanceHistory := res["addr1-token-112-10"] require.Equal(t, &data.AccountBalanceHistory{ - Address: "addr1", - Timestamp: 100, - Balance: "112", - Token: "token-112", - IsSender: true, - TokenNonce: 10, - Identifier: "token-112-0a", + Address: "addr1", + Timestamp: 100, + TimestampMs: 100000, + Balance: "112", + Token: "token-112", + IsSender: true, + TokenNonce: 10, + Identifier: "token-112-0a", }, accountBalanceHistory) } diff --git a/process/elasticproc/block/blockProcessor.go b/process/elasticproc/block/blockProcessor.go index a1541029..d72570c5 100644 --- a/process/elasticproc/block/blockProcessor.go +++ b/process/elasticproc/block/blockProcessor.go @@ -4,13 +4,10 @@ import ( "encoding/hex" "errors" "fmt" - "github.com/multiversx/mx-chain-core-go/data/api" - "strconv" - "time" - "github.com/multiversx/mx-chain-core-go/core" "github.com/multiversx/mx-chain-core-go/core/check" coreData "github.com/multiversx/mx-chain-core-go/data" + "github.com/multiversx/mx-chain-core-go/data/api" "github.com/multiversx/mx-chain-core-go/data/block" nodeBlock "github.com/multiversx/mx-chain-core-go/data/block" "github.com/multiversx/mx-chain-core-go/data/outport" @@ -20,6 +17,7 @@ import ( indexer "github.com/multiversx/mx-chain-es-indexer-go/process/dataindexer" "github.com/multiversx/mx-chain-es-indexer-go/process/elasticproc/converters" logger "github.com/multiversx/mx-chain-logger-go" + "strconv" ) const ( @@ -96,7 +94,8 @@ func (bp *blockProcessor) PrepareBlockForDB(obh *outport.OutportBlockWithHeader) PubKeyBitmap: hex.EncodeToString(obh.Header.GetPubKeysBitmap()), Size: int64(blockSizeInBytes), SizeTxs: int64(sizeTxs), - Timestamp: time.Duration(obh.Header.GetTimeStamp()), + Timestamp: obh.Header.GetTimeStamp(), + TimestampMs: obh.OutportBlock.BlockData.GetTimestampMs(), TxCount: numTxs, NotarizedTxsCount: notarizedTxs, StateRootHash: hex.EncodeToString(obh.Header.GetRootHash()), diff --git a/process/elasticproc/block/blockProcessor_test.go b/process/elasticproc/block/blockProcessor_test.go index a4ca8a81..acff1533 100644 --- a/process/elasticproc/block/blockProcessor_test.go +++ b/process/elasticproc/block/blockProcessor_test.go @@ -266,6 +266,7 @@ func TestBlockProcessor_PrepareBlockForDBEpochStartMeta(t *testing.T) { TxCount: 120, }, }, + TimeStamp: 123, } headerBytes, _ := bp.marshalizer.Marshal(header) @@ -273,6 +274,7 @@ func TestBlockProcessor_PrepareBlockForDBEpochStartMeta(t *testing.T) { Header: header, OutportBlock: &outport.OutportBlock{ BlockData: &outport.BlockData{ + TimestampMs: 123000, HeaderProof: &dataBlock.HeaderProof{ PubKeysBitmap: []byte("bitmap1"), AggregatedSignature: []byte("sig1"), @@ -311,9 +313,10 @@ func TestBlockProcessor_PrepareBlockForDBEpochStartMeta(t *testing.T) { Proposer: 0, Validators: nil, PubKeyBitmap: "6269746d617031", - Size: 898, + Size: 914, SizeTxs: 0, - Timestamp: 0, + Timestamp: 123, + TimestampMs: 123000, StateRootHash: "", PrevHash: "", ShardID: core.MetachainShardId, diff --git a/process/elasticproc/check.go b/process/elasticproc/check.go index 9284376e..b6670aae 100644 --- a/process/elasticproc/check.go +++ b/process/elasticproc/check.go @@ -39,6 +39,9 @@ func checkArguments(arguments *ArgElasticProcessor) error { if check.IfNilReflect(arguments.OperationsProc) { return elasticIndexer.ErrNilOperationsHandler } + if check.IfNilReflect(arguments.MappingsHandler) { + return elasticIndexer.ErrNilMappingsHandler + } return nil } diff --git a/process/elasticproc/converters/timestamp.go b/process/elasticproc/converters/timestamp.go new file mode 100644 index 00000000..79edbd7d --- /dev/null +++ b/process/elasticproc/converters/timestamp.go @@ -0,0 +1,6 @@ +package converters + +// MillisecondsToSeconds will convert the provided milliseconds in seconds +func MillisecondsToSeconds(ms uint64) uint64 { + return ms / 1000 +} diff --git a/process/elasticproc/converters/timestamp_test.go b/process/elasticproc/converters/timestamp_test.go new file mode 100644 index 00000000..03054785 --- /dev/null +++ b/process/elasticproc/converters/timestamp_test.go @@ -0,0 +1,15 @@ +package converters + +import ( + "github.com/stretchr/testify/require" + "testing" +) + +func TestMillisecondsToSeconds(t *testing.T) { + t.Parallel() + + require.Equal(t, uint64(1), MillisecondsToSeconds(1000)) + require.Equal(t, uint64(0), MillisecondsToSeconds(0)) + require.Equal(t, uint64(12), MillisecondsToSeconds(12_000)) + require.Equal(t, uint64(12), MillisecondsToSeconds(12_123)) +} diff --git a/process/elasticproc/elasticProcessor.go b/process/elasticproc/elasticProcessor.go index 89634a95..7394ce70 100644 --- a/process/elasticproc/elasticProcessor.go +++ b/process/elasticproc/elasticProcessor.go @@ -6,8 +6,6 @@ import ( "encoding/hex" "encoding/json" "fmt" - "sync" - "github.com/multiversx/mx-chain-core-go/core" "github.com/multiversx/mx-chain-core-go/core/check" coreData "github.com/multiversx/mx-chain-core-go/data" @@ -22,6 +20,7 @@ import ( "github.com/multiversx/mx-chain-es-indexer-go/process/elasticproc/tokeninfo" "github.com/multiversx/mx-chain-es-indexer-go/templates" logger "github.com/multiversx/mx-chain-logger-go" + "sync" ) var ( @@ -43,9 +42,6 @@ type ArgElasticProcessor struct { BulkRequestMaxSize int UseKibana bool ImportDB bool - IndexTemplates map[string]*bytes.Buffer - IndexPolicies map[string]*bytes.Buffer - ExtraMappings []templates.ExtraMapping EnabledIndexes map[string]struct{} TransactionsProc DBTransactionsHandler AccountsProc DBAccountHandler @@ -56,6 +52,7 @@ type ArgElasticProcessor struct { DBClient DatabaseClientHandler LogsAndEventsProc DBLogsAndEventsHandler OperationsProc OperationsHandler + MappingsHandler TemplatesAndPoliciesHandler Version string } @@ -73,6 +70,7 @@ type elasticProcessor struct { validatorsProc DBValidatorsHandler logsAndEventsProc DBLogsAndEventsHandler operationsProc OperationsHandler + mappingsHandler TemplatesAndPoliciesHandler } // NewElasticProcessor handles Elasticsearch operations such as initialization, adding, modifying or removing data @@ -94,9 +92,10 @@ func NewElasticProcessor(arguments *ArgElasticProcessor) (*elasticProcessor, err logsAndEventsProc: arguments.LogsAndEventsProc, operationsProc: arguments.OperationsProc, bulkRequestMaxSize: arguments.BulkRequestMaxSize, + mappingsHandler: arguments.MappingsHandler, } - err = ei.init(arguments.UseKibana, arguments.IndexTemplates, arguments.IndexPolicies, arguments.ExtraMappings) + err = ei.init() if err != nil { return nil, err } @@ -107,19 +106,15 @@ func NewElasticProcessor(arguments *ArgElasticProcessor) (*elasticProcessor, err } // TODO move all the index create part in a new component -func (ei *elasticProcessor) init(useKibana bool, indexTemplates, _ map[string]*bytes.Buffer, extraMappings []templates.ExtraMapping) error { - err := ei.createOpenDistroTemplates(indexTemplates) +func (ei *elasticProcessor) init() error { + indexTemplates, _, err := ei.mappingsHandler.GetElasticTemplatesAndPolicies() if err != nil { return err } - //nolint - if useKibana { - // TODO: Re-activate after we think of a solid way to handle forks+rotating indexes - // err = ei.createIndexPolicies(indexPolicies) - // if err != nil { - // return err - // } + err = ei.createOpenDistroTemplates(indexTemplates) + if err != nil { + return err } err = ei.createIndexTemplates(indexTemplates) @@ -137,6 +132,11 @@ func (ei *elasticProcessor) init(useKibana bool, indexTemplates, _ map[string]*b return err } + extraMappings, err := ei.mappingsHandler.GetTimestampMsMappings() + if err != nil { + return err + } + return ei.addExtraMappings(extraMappings) } @@ -144,7 +144,7 @@ func (ei *elasticProcessor) addExtraMappings(extraMappings []templates.ExtraMapp for _, mappingsTuple := range extraMappings { err := ei.elasticClient.PutMappings(mappingsTuple.Index, mappingsTuple.Mappings) if err != nil { - return err + log.Warn("cannot add extra mappings", "index", mappingsTuple.Index, "error", err) } } @@ -317,7 +317,7 @@ func (ei *elasticProcessor) RemoveMiniblocks(header coreData.HeaderHandler, body } // RemoveTransactions will remove transaction that are in miniblock from the elasticsearch server -func (ei *elasticProcessor) RemoveTransactions(header coreData.HeaderHandler, body *block.Body) error { +func (ei *elasticProcessor) RemoveTransactions(header coreData.HeaderHandler, body *block.Body, timestampMs uint64) error { encodedTxsHashes, encodedScrsHashes := ei.transactionsProc.GetHexEncodedHashesForRemove(header, body) shardID := header.GetShardID() @@ -341,15 +341,15 @@ func (ei *elasticProcessor) RemoveTransactions(header coreData.HeaderHandler, bo return err } - err = ei.removeFromIndexByTimestampAndShardID(header.GetTimeStamp(), header.GetShardID(), elasticIndexer.EventsIndex) + err = ei.removeFromIndexByTimestampAndShardID(header.GetShardID(), elasticIndexer.EventsIndex, timestampMs) if err != nil { return err } - return ei.updateDelegatorsInCaseOfRevert(header, body) + return ei.updateDelegatorsInCaseOfRevert(header, body, timestampMs) } -func (ei *elasticProcessor) updateDelegatorsInCaseOfRevert(header coreData.HeaderHandler, body *block.Body) error { +func (ei *elasticProcessor) updateDelegatorsInCaseOfRevert(header coreData.HeaderHandler, body *block.Body, timestampMs uint64) error { // delegators index should be updated in case of revert only if the observer is in Metachain and the reverted block has miniblocks isMeta := header.GetShardID() == core.MetachainShardId hasMiniblocks := len(body.MiniBlocks) > 0 @@ -359,7 +359,8 @@ func (ei *elasticProcessor) updateDelegatorsInCaseOfRevert(header coreData.Heade } ctxWithValue := context.WithValue(context.Background(), request.ContextKey, request.ExtendTopicWithShardID(request.UpdateTopic, header.GetShardID())) - delegatorsQuery := ei.logsAndEventsProc.PrepareDelegatorsQueryInCaseOfRevert(header.GetTimeStamp()) + + delegatorsQuery := ei.logsAndEventsProc.PrepareDelegatorsQueryInCaseOfRevert(timestampMs) return ei.elasticClient.UpdateByQuery(ctxWithValue, elasticIndexer.DelegatorsIndex, delegatorsQuery) } @@ -377,18 +378,18 @@ func (ei *elasticProcessor) removeIfHashesNotEmpty(index string, hashes []string } // RemoveAccountsESDT will remove data from accountsesdt index and accountsesdthistory -func (ei *elasticProcessor) RemoveAccountsESDT(headerTimestamp uint64, shardID uint32) error { - err := ei.removeFromIndexByTimestampAndShardID(headerTimestamp, shardID, elasticIndexer.AccountsESDTIndex) +func (ei *elasticProcessor) RemoveAccountsESDT(shardID uint32, timestampMs uint64) error { + err := ei.removeFromIndexByTimestampAndShardID(shardID, elasticIndexer.AccountsESDTIndex, timestampMs) if err != nil { return err } - return ei.removeFromIndexByTimestampAndShardID(headerTimestamp, shardID, elasticIndexer.AccountsESDTHistoryIndex) + return ei.removeFromIndexByTimestampAndShardID(shardID, elasticIndexer.AccountsESDTHistoryIndex, timestampMs) } -func (ei *elasticProcessor) removeFromIndexByTimestampAndShardID(headerTimestamp uint64, shardID uint32, index string) error { +func (ei *elasticProcessor) removeFromIndexByTimestampAndShardID(shardID uint32, index string, timestampMs uint64) error { ctxWithValue := context.WithValue(context.Background(), request.ContextKey, request.ExtendTopicWithShardID(request.RemoveTopic, shardID)) - query := fmt.Sprintf(`{"query": {"bool": {"must": [{"match": {"shardID": {"query": %d,"operator": "AND"}}},{"match": {"timestamp": {"query": "%d","operator": "AND"}}}]}}}`, shardID, headerTimestamp) + query := fmt.Sprintf(`{"query": {"bool": {"must": [{"match": {"shardID": {"query": %d,"operator": "AND"}}},{"match": {"timestampMs": {"query": "%d","operator": "AND"}}}]}}}`, shardID, timestampMs) return ei.elasticClient.DoQueryRemove( ctxWithValue, @@ -398,12 +399,12 @@ func (ei *elasticProcessor) removeFromIndexByTimestampAndShardID(headerTimestamp } // SaveMiniblocks will prepare and save information about miniblocks in elasticsearch server -func (ei *elasticProcessor) SaveMiniblocks(header coreData.HeaderHandler, miniBlocks []*block.MiniBlock) error { +func (ei *elasticProcessor) SaveMiniblocks(header coreData.HeaderHandler, miniBlocks []*block.MiniBlock, timestampMS uint64) error { if !ei.isIndexEnabled(elasticIndexer.MiniblocksIndex) { return nil } - mbs := ei.miniblocksProc.PrepareDBMiniblocks(header, miniBlocks) + mbs := ei.miniblocksProc.PrepareDBMiniblocks(header, miniBlocks, timestampMS) if len(mbs) == 0 { return nil } @@ -419,8 +420,8 @@ func (ei *elasticProcessor) SaveTransactions(obh *outport.OutportBlockWithHeader headerTimestamp := obh.Header.GetTimeStamp() miniBlocks := append(obh.BlockData.Body.MiniBlocks, obh.BlockData.IntraShardMiniBlocks...) - preparedResults := ei.transactionsProc.PrepareTransactionsForDatabase(miniBlocks, obh.Header, obh.TransactionPool, ei.isImportDB(), obh.NumberOfShards) - logsData := ei.logsAndEventsProc.ExtractDataFromLogs(obh.TransactionPool.Logs, preparedResults, headerTimestamp, obh.Header.GetShardID(), obh.NumberOfShards) + preparedResults := ei.transactionsProc.PrepareTransactionsForDatabase(miniBlocks, obh.Header, obh.TransactionPool, ei.isImportDB(), obh.NumberOfShards, obh.BlockData.TimestampMs) + logsData := ei.logsAndEventsProc.ExtractDataFromLogs(obh.TransactionPool.Logs, preparedResults, headerTimestamp, obh.Header.GetShardID(), obh.NumberOfShards, obh.BlockData.TimestampMs) buffers := data.NewBufferSlice(ei.bulkRequestMaxSize) err := ei.indexTransactions(preparedResults.Transactions, logsData.TxHashStatusInfo, obh.Header, buffers) @@ -464,7 +465,7 @@ func (ei *elasticProcessor) SaveTransactions(obh *outport.OutportBlockWithHeader } tagsCount := tags.NewTagsCount() - err = ei.indexAlteredAccounts(headerTimestamp, logsData.NFTsDataUpdates, obh.AlteredAccounts, buffers, tagsCount, obh.Header.GetShardID()) + err = ei.indexAlteredAccounts(logsData.NFTsDataUpdates, obh.AlteredAccounts, buffers, tagsCount, obh.Header.GetShardID(), obh.BlockData.TimestampMs) if err != nil { return err } @@ -635,32 +636,32 @@ func (ei *elasticProcessor) SaveRoundsInfo(rounds *outport.RoundsInfo) error { } func (ei *elasticProcessor) indexAlteredAccounts( - timestamp uint64, updatesNFTsData []*data.NFTDataUpdate, coreAlteredAccounts map[string]*alteredAccount.AlteredAccount, buffSlice *data.BufferSlice, tagsCount data.CountTags, shardID uint32, + timestampMs uint64, ) error { regularAccountsToIndex, accountsToIndexESDT := ei.accountsProc.GetAccounts(coreAlteredAccounts) - err := ei.saveAccounts(timestamp, regularAccountsToIndex, buffSlice, shardID) + err := ei.saveAccounts(regularAccountsToIndex, buffSlice, shardID, timestampMs) if err != nil { return err } - return ei.saveAccountsESDT(timestamp, accountsToIndexESDT, updatesNFTsData, buffSlice, tagsCount, shardID) + return ei.saveAccountsESDT(accountsToIndexESDT, updatesNFTsData, buffSlice, tagsCount, shardID, timestampMs) } func (ei *elasticProcessor) saveAccountsESDT( - timestamp uint64, wrappedAccounts []*data.AccountESDT, updatesNFTsData []*data.NFTDataUpdate, buffSlice *data.BufferSlice, tagsCount data.CountTags, shardID uint32, + timestampMs uint64, ) error { - accountsESDTMap, tokensData := ei.accountsProc.PrepareAccountsMapESDT(timestamp, wrappedAccounts, tagsCount, shardID) + accountsESDTMap, tokensData := ei.accountsProc.PrepareAccountsMapESDT(wrappedAccounts, tagsCount, shardID, timestampMs) err := ei.addTokenTypeAndCurrentOwnerInAccountsESDT(tokensData, accountsESDTMap, shardID) if err != nil { return err @@ -671,7 +672,7 @@ func (ei *elasticProcessor) saveAccountsESDT( return err } - return ei.saveAccountsESDTHistory(timestamp, accountsESDTMap, buffSlice, shardID) + return ei.saveAccountsESDTHistory(accountsESDTMap, buffSlice, shardID, timestampMs) } func (ei *elasticProcessor) addTokenTypeAndCurrentOwnerInAccountsESDT(tokensData data.TokensHandler, accountsESDTMap map[string]*data.AccountInfo, shardID uint32) error { @@ -764,17 +765,17 @@ func (ei *elasticProcessor) SaveAccounts(accountsData *outport.Accounts) error { }) } - return ei.saveAccounts(accountsData.BlockTimestamp, accounts, buffSlice, accountsData.ShardID) + return ei.saveAccounts(accounts, buffSlice, accountsData.ShardID, accountsData.BlockTimestampMs) } -func (ei *elasticProcessor) saveAccounts(timestamp uint64, accts []*data.Account, buffSlice *data.BufferSlice, shardID uint32) error { - accountsMap := ei.accountsProc.PrepareRegularAccountsMap(timestamp, accts, shardID) +func (ei *elasticProcessor) saveAccounts(accts []*data.Account, buffSlice *data.BufferSlice, shardID uint32, timestampMs uint64) error { + accountsMap := ei.accountsProc.PrepareRegularAccountsMap(accts, shardID, timestampMs) err := ei.indexAccounts(accountsMap, elasticIndexer.AccountsIndex, buffSlice) if err != nil { return err } - return ei.saveAccountsHistory(timestamp, accountsMap, buffSlice, shardID) + return ei.saveAccountsHistory(accountsMap, buffSlice, shardID, timestampMs) } func (ei *elasticProcessor) indexAccounts(accountsMap map[string]*data.AccountInfo, index string, buffSlice *data.BufferSlice) error { @@ -789,22 +790,22 @@ func (ei *elasticProcessor) serializeAndIndexAccounts(accountsMap map[string]*da return ei.accountsProc.SerializeAccounts(accountsMap, buffSlice, index) } -func (ei *elasticProcessor) saveAccountsESDTHistory(timestamp uint64, accountsInfoMap map[string]*data.AccountInfo, buffSlice *data.BufferSlice, shardID uint32) error { +func (ei *elasticProcessor) saveAccountsESDTHistory(accountsInfoMap map[string]*data.AccountInfo, buffSlice *data.BufferSlice, shardID uint32, timestampMs uint64) error { if !ei.isIndexEnabled(elasticIndexer.AccountsESDTHistoryIndex) { return nil } - accountsMap := ei.accountsProc.PrepareAccountsHistory(timestamp, accountsInfoMap, shardID) + accountsMap := ei.accountsProc.PrepareAccountsHistory(accountsInfoMap, shardID, timestampMs) return ei.serializeAndIndexAccountsHistory(accountsMap, elasticIndexer.AccountsESDTHistoryIndex, buffSlice) } -func (ei *elasticProcessor) saveAccountsHistory(timestamp uint64, accountsInfoMap map[string]*data.AccountInfo, buffSlice *data.BufferSlice, shardID uint32) error { +func (ei *elasticProcessor) saveAccountsHistory(accountsInfoMap map[string]*data.AccountInfo, buffSlice *data.BufferSlice, shardID uint32, timestampMS uint64) error { if !ei.isIndexEnabled(elasticIndexer.AccountsHistoryIndex) { return nil } - accountsMap := ei.accountsProc.PrepareAccountsHistory(timestamp, accountsInfoMap, shardID) + accountsMap := ei.accountsProc.PrepareAccountsHistory(accountsInfoMap, shardID, timestampMS) return ei.serializeAndIndexAccountsHistory(accountsMap, elasticIndexer.AccountsHistoryIndex, buffSlice) } diff --git a/process/elasticproc/elasticProcessor_test.go b/process/elasticproc/elasticProcessor_test.go index ac9123b9..e045e129 100644 --- a/process/elasticproc/elasticProcessor_test.go +++ b/process/elasticproc/elasticProcessor_test.go @@ -23,6 +23,7 @@ import ( "github.com/multiversx/mx-chain-es-indexer-go/process/elasticproc/operations" "github.com/multiversx/mx-chain-es-indexer-go/process/elasticproc/statistics" "github.com/multiversx/mx-chain-es-indexer-go/process/elasticproc/tags" + "github.com/multiversx/mx-chain-es-indexer-go/process/elasticproc/templatesAndPolicies" "github.com/multiversx/mx-chain-es-indexer-go/process/elasticproc/transactions" "github.com/multiversx/mx-chain-es-indexer-go/process/elasticproc/validators" "github.com/stretchr/testify/require" @@ -87,6 +88,7 @@ func createMockElasticProcessorArgs() *ArgElasticProcessor { BlockProc: bp, LogsAndEventsProc: lp, OperationsProc: op, + MappingsHandler: templatesAndPolicies.NewTemplatesAndPolicyReader(), } } @@ -200,6 +202,15 @@ func TestNewElasticProcessor(t *testing.T) { }, exErr: dataindexer.ErrNilTransactionsHandler, }, + { + name: "NilMappingsHandler", + args: func() *ArgElasticProcessor { + arguments := createMockElasticProcessorArgs() + arguments.MappingsHandler = nil + return arguments + }, + exErr: dataindexer.ErrNilMappingsHandler, + }, { name: "InitError", args: func() *ArgElasticProcessor { @@ -411,7 +422,7 @@ func TestElasticProcessor_SaveMiniblocks(t *testing.T) { body := &dataBlock.Body{MiniBlocks: dataBlock.MiniBlockSlice{ {SenderShardID: 0, ReceiverShardID: 1}, }} - err := elasticProc.SaveMiniblocks(header, body.MiniBlocks) + err := elasticProc.SaveMiniblocks(header, body.MiniBlocks, 0) require.Equal(t, localErr, err) } @@ -470,7 +481,7 @@ func TestElasticProcessor_RemoveTransactions(t *testing.T) { called = true } else { require.Equal(t, - `{"query": {"bool": {"must": [{"match": {"shardID": {"query": 4294967295,"operator": "AND"}}},{"match": {"timestamp": {"query": "0","operator": "AND"}}}]}}}`, + `{"query": {"bool": {"must": [{"match": {"shardID": {"query": 4294967295,"operator": "AND"}}},{"match": {"timestampMs": {"query": "0","operator": "AND"}}}]}}}`, body.String(), ) } @@ -505,7 +516,7 @@ func TestElasticProcessor_RemoveTransactions(t *testing.T) { }, } - err := elasticSearchProc.RemoveTransactions(header, blk) + err := elasticSearchProc.RemoveTransactions(header, blk, 0) require.Nil(t, err) require.True(t, called) } @@ -588,7 +599,7 @@ func TestElasticProcessor_IndexAlteredAccounts(t *testing.T) { buffSlice := data.NewBufferSlice(data.DefaultMaxBulkSize) tagsCount := tags.NewTagsCount() - err := elasticSearchProc.indexAlteredAccounts(100, nil, nil, buffSlice, tagsCount, 0) + err := elasticSearchProc.indexAlteredAccounts(nil, nil, buffSlice, tagsCount, 0, 0) require.Nil(t, err) require.True(t, called) } diff --git a/process/elasticproc/factory/elasticProcessorFactory.go b/process/elasticproc/factory/elasticProcessorFactory.go index 37ea72e0..47481245 100644 --- a/process/elasticproc/factory/elasticProcessorFactory.go +++ b/process/elasticproc/factory/elasticProcessorFactory.go @@ -35,15 +35,7 @@ type ArgElasticProcessorFactory struct { // CreateElasticProcessor will create a new instance of ElasticProcessor func CreateElasticProcessor(arguments ArgElasticProcessorFactory) (dataindexer.ElasticProcessor, error) { - templatesAndPoliciesReader := templatesAndPolicies.CreateTemplatesAndPoliciesReader(arguments.UseKibana) - indexTemplates, indexPolicies, err := templatesAndPoliciesReader.GetElasticTemplatesAndPolicies() - if err != nil { - return nil, err - } - extraMappings, err := templatesAndPoliciesReader.GetExtraMappings() - if err != nil { - return nil, err - } + templatesAndPoliciesReader := templatesAndPolicies.NewTemplatesAndPolicyReader() enabledIndexesMap := make(map[string]struct{}) for _, index := range arguments.EnabledIndexes { @@ -121,12 +113,10 @@ func CreateElasticProcessor(arguments ArgElasticProcessorFactory) (dataindexer.E DBClient: arguments.DBClient, EnabledIndexes: enabledIndexesMap, UseKibana: arguments.UseKibana, - IndexTemplates: indexTemplates, - IndexPolicies: indexPolicies, - ExtraMappings: extraMappings, OperationsProc: operationsProc, ImportDB: arguments.ImportDB, Version: arguments.Version, + MappingsHandler: templatesAndPoliciesReader, } return elasticproc.NewElasticProcessor(args) diff --git a/process/elasticproc/interface.go b/process/elasticproc/interface.go index fe4b565f..4caa6af8 100644 --- a/process/elasticproc/interface.go +++ b/process/elasticproc/interface.go @@ -10,6 +10,7 @@ import ( "github.com/multiversx/mx-chain-core-go/data/outport" "github.com/multiversx/mx-chain-es-indexer-go/data" "github.com/multiversx/mx-chain-es-indexer-go/process/elasticproc/tokeninfo" + "github.com/multiversx/mx-chain-es-indexer-go/templates" ) // DatabaseClientHandler defines the actions that a component that handles requests should do @@ -33,9 +34,9 @@ type DatabaseClientHandler interface { // DBAccountHandler defines the actions that an accounts' handler should do type DBAccountHandler interface { GetAccounts(coreAlteredAccounts map[string]*alteredAccount.AlteredAccount) ([]*data.Account, []*data.AccountESDT) - PrepareRegularAccountsMap(timestamp uint64, accounts []*data.Account, shardID uint32) map[string]*data.AccountInfo - PrepareAccountsMapESDT(timestamp uint64, accounts []*data.AccountESDT, tagsCount data.CountTags, shardID uint32) (map[string]*data.AccountInfo, data.TokensHandler) - PrepareAccountsHistory(timestamp uint64, accounts map[string]*data.AccountInfo, shardID uint32) map[string]*data.AccountBalanceHistory + PrepareRegularAccountsMap(accounts []*data.Account, shardID uint32, timestampMs uint64) map[string]*data.AccountInfo + PrepareAccountsMapESDT(accounts []*data.AccountESDT, tagsCount data.CountTags, shardID uint32, timestampMs uint64) (map[string]*data.AccountInfo, data.TokensHandler) + PrepareAccountsHistory(accounts map[string]*data.AccountInfo, shardID uint32, timestampMs uint64) map[string]*data.AccountBalanceHistory PutTokenMedataDataInTokens(tokensData []*data.TokenInfo, coreAlteredAccounts map[string]*alteredAccount.AlteredAccount) SerializeAccountsHistory(accounts map[string]*data.AccountBalanceHistory, buffSlice *data.BufferSlice, index string) error @@ -62,6 +63,7 @@ type DBTransactionsHandler interface { pool *outport.TransactionPool, isImportDB bool, numOfShards uint32, + timestampMS uint64, ) *data.PreparedResults GetHexEncodedHashesForRemove(header coreData.HeaderHandler, body *block.Body) ([]string, []string) @@ -73,7 +75,7 @@ type DBTransactionsHandler interface { // DBMiniblocksHandler defines the actions that a miniblocks handler should do type DBMiniblocksHandler interface { - PrepareDBMiniblocks(header coreData.HeaderHandler, miniBlocks []*block.MiniBlock) []*data.Miniblock + PrepareDBMiniblocks(header coreData.HeaderHandler, miniBlocks []*block.MiniBlock, timestampMS uint64) []*data.Miniblock GetMiniblocksHashesHexEncoded(header coreData.HeaderHandler, body *block.Body) []string SerializeBulkMiniBlocks(bulkMbs []*data.Miniblock, buffSlice *data.BufferSlice, index string, shardID uint32) @@ -98,6 +100,7 @@ type DBLogsAndEventsHandler interface { timestamp uint64, shardID uint32, numOfShards uint32, + timestampMs uint64, ) *data.PreparedLogsResults SerializeEvents(events []*data.LogEvent, buffSlice *data.BufferSlice, index string) error @@ -112,7 +115,7 @@ type DBLogsAndEventsHandler interface { buffSlice *data.BufferSlice, index string, ) error - PrepareDelegatorsQueryInCaseOfRevert(timestamp uint64) *bytes.Buffer + PrepareDelegatorsQueryInCaseOfRevert(timestampMs uint64) *bytes.Buffer } // OperationsHandler defines the actions that an operations' handler should do @@ -120,3 +123,10 @@ type OperationsHandler interface { ProcessTransactionsAndSCRs(txs []*data.Transaction, scrs []*data.ScResult, isImportDB bool, shardID uint32) ([]*data.Transaction, []*data.ScResult) SerializeSCRs(scrs []*data.ScResult, buffSlice *data.BufferSlice, index string, shardID uint32) error } + +// TemplatesAndPoliciesHandler defines the actions that a templates and policies handler should do +type TemplatesAndPoliciesHandler interface { + GetElasticTemplatesAndPolicies() (map[string]*bytes.Buffer, map[string]*bytes.Buffer, error) + GetExtraMappings() ([]templates.ExtraMapping, error) + GetTimestampMsMappings() ([]templates.ExtraMapping, error) +} diff --git a/process/elasticproc/logsevents/delegatorsProcessor.go b/process/elasticproc/logsevents/delegatorsProcessor.go index 1cf6c6e7..d4d171e7 100644 --- a/process/elasticproc/logsevents/delegatorsProcessor.go +++ b/process/elasticproc/logsevents/delegatorsProcessor.go @@ -2,13 +2,11 @@ package logsevents import ( "encoding/hex" - "math/big" - "strconv" - "time" - "github.com/multiversx/mx-chain-core-go/core" "github.com/multiversx/mx-chain-es-indexer-go/data" indexer "github.com/multiversx/mx-chain-es-indexer-go/process/dataindexer" + "math/big" + "strconv" ) const ( @@ -101,7 +99,8 @@ func (dp *delegatorsProc) processEvent(args *argsProcessEvent) argOutputProcessE Contract: contractAddr, ActiveStake: activeStake.String(), ActiveStakeNum: activeStakeNum, - Timestamp: time.Duration(args.timestamp), + Timestamp: args.timestamp, + TimestampMs: args.timestampMs, } if eventIdentifierStr == withdrawFunc && len(topics) >= minNumTopicsDelegators+1 { @@ -121,10 +120,11 @@ func (dp *delegatorsProc) processEvent(args *argsProcessEvent) argOutputProcessE } delegator.UnDelegateInfo = &data.UnDelegate{ - Timestamp: time.Duration(args.timestamp), - Value: unDelegateValue.String(), - ValueNum: unDelegatedValueNum, - ID: hex.EncodeToString(topics[4]), + Timestamp: args.timestamp, + TimestampMs: args.timestampMs, + Value: unDelegateValue.String(), + ValueNum: unDelegatedValueNum, + ID: hex.EncodeToString(topics[4]), } } diff --git a/process/elasticproc/logsevents/delegatorsProcessor_test.go b/process/elasticproc/logsevents/delegatorsProcessor_test.go index 8d8a5471..16dde022 100644 --- a/process/elasticproc/logsevents/delegatorsProcessor_test.go +++ b/process/elasticproc/logsevents/delegatorsProcessor_test.go @@ -24,6 +24,7 @@ func TestDelegatorsProcessor_ProcessEvent(t *testing.T) { } args := &argsProcessEvent{ timestamp: 1234, + timestampMs: 1234000, event: event, logAddress: []byte("contract"), selfShardID: core.MetachainShardId, @@ -40,6 +41,7 @@ func TestDelegatorsProcessor_ProcessEvent(t *testing.T) { ActiveStakeNum: 0.1, ActiveStake: "1000000000", Timestamp: 1234, + TimestampMs: 1234000, }, res.delegator) } @@ -53,6 +55,7 @@ func TestDelegatorProcessor_WithdrawWithDelete(t *testing.T) { } args := &argsProcessEvent{ timestamp: 1234, + timestampMs: 1234000, event: event, logAddress: []byte("contract"), selfShardID: core.MetachainShardId, @@ -70,6 +73,7 @@ func TestDelegatorProcessor_WithdrawWithDelete(t *testing.T) { ActiveStake: "0", ShouldDelete: true, Timestamp: 1234, + TimestampMs: 1234000, WithdrawFundIDs: []string{"61"}, }, res.delegator) } diff --git a/process/elasticproc/logsevents/esdtIssueProcessor.go b/process/elasticproc/logsevents/esdtIssueProcessor.go index 6f5c9fa3..e221ad27 100644 --- a/process/elasticproc/logsevents/esdtIssueProcessor.go +++ b/process/elasticproc/logsevents/esdtIssueProcessor.go @@ -1,11 +1,9 @@ package logsevents import ( - "math/big" - "time" - "github.com/multiversx/mx-chain-core-go/core" "github.com/multiversx/mx-chain-es-indexer-go/data" + "math/big" ) const ( @@ -91,11 +89,13 @@ func (eip *esdtIssueProcessor) processEvent(args *argsProcessEvent) argOutputPro NumDecimals: numDecimals, Issuer: encodedAddr, CurrentOwner: encodedAddr, - Timestamp: time.Duration(args.timestamp), + Timestamp: args.timestamp, + TimestampMs: args.timestampMs, OwnersHistory: []*data.OwnerData{ { - Address: encodedAddr, - Timestamp: time.Duration(args.timestamp), + Address: encodedAddr, + Timestamp: args.timestamp, + TimestampMs: args.timestampMs, }, }, Properties: &data.TokenProperties{}, diff --git a/process/elasticproc/logsevents/esdtIssueProcessor_test.go b/process/elasticproc/logsevents/esdtIssueProcessor_test.go index f62d2ab3..214a295a 100644 --- a/process/elasticproc/logsevents/esdtIssueProcessor_test.go +++ b/process/elasticproc/logsevents/esdtIssueProcessor_test.go @@ -1,14 +1,12 @@ package logsevents import ( - "testing" - "time" - "github.com/multiversx/mx-chain-core-go/core" "github.com/multiversx/mx-chain-core-go/data/transaction" "github.com/multiversx/mx-chain-es-indexer-go/data" "github.com/multiversx/mx-chain-es-indexer-go/mock" "github.com/stretchr/testify/require" + "testing" ) func TestIssueESDTProcessor(t *testing.T) { @@ -25,6 +23,7 @@ func TestIssueESDTProcessor(t *testing.T) { timestamp: 1234, event: event, selfShardID: core.MetachainShardId, + timestampMs: 1234000, } res := esdtIssueProc.processEvent(args) @@ -33,14 +32,16 @@ func TestIssueESDTProcessor(t *testing.T) { Token: "MYTOKEN-abcd", Name: "my-token", Ticker: "MYTOKEN", - Timestamp: time.Duration(1234), + Timestamp: 1234, + TimestampMs: 1234000, Type: core.NonFungibleESDT, Issuer: "61646472", CurrentOwner: "61646472", OwnersHistory: []*data.OwnerData{ { - Address: "61646472", - Timestamp: time.Duration(1234), + Address: "61646472", + Timestamp: 1234, + TimestampMs: 1234000, }, }, Properties: &data.TokenProperties{}, @@ -59,6 +60,7 @@ func TestIssueESDTProcessor_TransferOwnership(t *testing.T) { } args := &argsProcessEvent{ timestamp: 1234, + timestampMs: 1234000, event: event, selfShardID: core.MetachainShardId, } @@ -69,14 +71,16 @@ func TestIssueESDTProcessor_TransferOwnership(t *testing.T) { Token: "MYTOKEN-abcd", Name: "my-token", Ticker: "MYTOKEN", - Timestamp: time.Duration(1234), + Timestamp: 1234, + TimestampMs: 1234000, Type: core.NonFungibleESDT, Issuer: "61646472", CurrentOwner: "6e65774f776e6572", OwnersHistory: []*data.OwnerData{ { - Address: "6e65774f776e6572", - Timestamp: time.Duration(1234), + Address: "6e65774f776e6572", + Timestamp: 1234, + TimestampMs: 1234000, }, }, TransferOwnership: true, @@ -96,6 +100,7 @@ func TestIssueESDTProcessor_EventWithShardID0ShouldBeIgnored(t *testing.T) { } args := &argsProcessEvent{ timestamp: 1234, + timestampMs: 1234000, event: event, selfShardID: 0, } diff --git a/process/elasticproc/logsevents/interface.go b/process/elasticproc/logsevents/interface.go index 4d434cef..ff845ef9 100644 --- a/process/elasticproc/logsevents/interface.go +++ b/process/elasticproc/logsevents/interface.go @@ -19,6 +19,7 @@ type argsProcessEvent struct { tokenRolesAndProperties *tokeninfo.TokenRolesAndProperties txHashStatusInfoProc txHashStatusInfoHandler timestamp uint64 + timestampMs uint64 logAddress []byte selfShardID uint32 numOfShards uint32 diff --git a/process/elasticproc/logsevents/logsAndEventsProcessor.go b/process/elasticproc/logsevents/logsAndEventsProcessor.go index 39d8085a..5b4ffa88 100644 --- a/process/elasticproc/logsevents/logsAndEventsProcessor.go +++ b/process/elasticproc/logsevents/logsAndEventsProcessor.go @@ -3,8 +3,6 @@ package logsevents import ( "encoding/hex" "fmt" - "time" - "github.com/multiversx/mx-chain-core-go/core" "github.com/multiversx/mx-chain-core-go/core/check" coreData "github.com/multiversx/mx-chain-core-go/data" @@ -95,8 +93,9 @@ func (lep *logsAndEventsProcessor) ExtractDataFromLogs( timestamp uint64, shardID uint32, numOfShards uint32, + timestampMs uint64, ) *data.PreparedLogsResults { - lgData := newLogsData(timestamp, preparedResults.Transactions, preparedResults.ScResults) + lgData := newLogsData(timestamp, preparedResults.Transactions, preparedResults.ScResults, timestampMs) for _, txLog := range logsAndEvents { if txLog == nil { continue @@ -117,7 +116,7 @@ func (lep *logsAndEventsProcessor) ExtractDataFromLogs( } } - dbLogs, dbEvents := lep.prepareLogsForDB(lgData, logsAndEvents, timestamp, shardID) + dbLogs, dbEvents := lep.prepareLogsForDB(lgData, logsAndEvents, timestamp, shardID, timestampMs) return &data.PreparedLogsResults{ Tokens: lgData.tokens, @@ -153,6 +152,7 @@ func (lep *logsAndEventsProcessor) processEvent(lgData *logsData, logHashHexEnco tokens: lgData.tokens, tokensSupply: lgData.tokensSupply, timestamp: lgData.timestamp, + timestampMs: lgData.timestampMs, scDeploys: lgData.scDeploys, txs: lgData.txsMap, scrs: lgData.scrsMap, @@ -194,6 +194,7 @@ func (lep *logsAndEventsProcessor) prepareLogsForDB( logsAndEvents []*outport.LogData, timestamp uint64, shardID uint32, + timestampMs uint64, ) ([]*data.Logs, []*data.LogEvent) { logs := make([]*data.Logs, 0, len(logsAndEvents)) events := make([]*data.LogEvent, 0) @@ -203,7 +204,7 @@ func (lep *logsAndEventsProcessor) prepareLogsForDB( continue } - dbLog, logEvents := lep.prepareLog(lgData, txLog.TxHash, txLog.Log, timestamp, shardID) + dbLog, logEvents := lep.prepareLog(lgData, txLog.TxHash, txLog.Log, timestamp, shardID, timestampMs) logs = append(logs, dbLog) events = append(events, logEvents...) @@ -218,6 +219,7 @@ func (lep *logsAndEventsProcessor) prepareLog( eventLogs *transaction.Log, timestamp uint64, shardID uint32, + timestampMs uint64, ) (*data.Logs, []*data.LogEvent) { originalTxHash := lep.getOriginalTxHash(lgData, logHashHex) encodedAddr := lep.pubKeyConverter.SilentEncode(eventLogs.GetAddress(), log) @@ -226,8 +228,9 @@ func (lep *logsAndEventsProcessor) prepareLog( ID: logHashHex, OriginalTxHash: originalTxHash, Address: encodedAddr, - Timestamp: time.Duration(timestamp), + Timestamp: timestamp, Events: make([]*data.Event, 0, len(eventLogs.Events)), + TimestampMs: timestampMs, } dbEvents := make([]*data.LogEvent, 0, len(eventLogs.Events)) @@ -247,13 +250,13 @@ func (lep *logsAndEventsProcessor) prepareLog( logsDB.Events = append(logsDB.Events, logEvent) executionOrder := lep.getExecutionOrder(lgData, logHashHex) - dbEvents = append(dbEvents, lep.prepareLogEvent(logsDB, logEvent, shardID, executionOrder)) + dbEvents = append(dbEvents, lep.prepareLogEvent(logsDB, logEvent, shardID, executionOrder, timestampMs)) } return logsDB, dbEvents } -func (lep *logsAndEventsProcessor) prepareLogEvent(dbLog *data.Logs, event *data.Event, shardID uint32, execOrder int) *data.LogEvent { +func (lep *logsAndEventsProcessor) prepareLogEvent(dbLog *data.Logs, event *data.Event, shardID uint32, execOrder int, timestampMs uint64) *data.LogEvent { dbEvent := &data.LogEvent{ UUID: converters.GenerateBase64UUID(), TxHash: dbLog.ID, @@ -269,6 +272,7 @@ func (lep *logsAndEventsProcessor) prepareLogEvent(dbLog *data.Logs, event *data OriginalTxHash: dbLog.OriginalTxHash, Timestamp: dbLog.Timestamp, ID: fmt.Sprintf(eventIDFormat, dbLog.ID, shardID, event.Order), + TimestampMs: timestampMs, } return dbEvent diff --git a/process/elasticproc/logsevents/logsAndEventsProcessor_test.go b/process/elasticproc/logsevents/logsAndEventsProcessor_test.go index 5fa6c582..0020af6f 100644 --- a/process/elasticproc/logsevents/logsAndEventsProcessor_test.go +++ b/process/elasticproc/logsevents/logsAndEventsProcessor_test.go @@ -2,10 +2,6 @@ package logsevents import ( "encoding/hex" - "math/big" - "testing" - "time" - "github.com/multiversx/mx-chain-core-go/core" "github.com/multiversx/mx-chain-core-go/data/outport" "github.com/multiversx/mx-chain-core-go/data/transaction" @@ -14,6 +10,8 @@ import ( elasticIndexer "github.com/multiversx/mx-chain-es-indexer-go/process/dataindexer" "github.com/multiversx/mx-chain-es-indexer-go/process/elasticproc/converters" "github.com/stretchr/testify/require" + "math/big" + "testing" ) func createMockArgs() ArgsLogsAndEventsProcessor { @@ -157,7 +155,7 @@ func TestLogsAndEventsProcessor_ExtractDataFromLogsAndPutInAltered(t *testing.T) args.BalanceConverter = balanceConverter proc, _ := NewLogsAndEventsProcessor(args) - resLogs := proc.ExtractDataFromLogs(logsAndEvents, res, 1000, core.MetachainShardId, 3) + resLogs := proc.ExtractDataFromLogs(logsAndEvents, res, 1000, core.MetachainShardId, 3, 1000000) require.NotNil(t, resLogs.Tokens) require.True(t, res.Transactions[0].HasOperations) require.True(t, res.ScResults[0].HasOperations) @@ -169,6 +167,7 @@ func TestLogsAndEventsProcessor_ExtractDataFromLogsAndPutInAltered(t *testing.T) Creator: "6164647232", CurrentOwner: "6164647232", Timestamp: uint64(1000), + TimestampMs: uint64(1000000), CodeHash: []byte("codeHash"), }, resLogs.ScDeploys["6164647231"]) @@ -178,12 +177,14 @@ func TestLogsAndEventsProcessor_ExtractDataFromLogsAndPutInAltered(t *testing.T) Token: "SEMI-abcd", Type: core.SemiFungibleESDT, Timestamp: 1000, + TimestampMs: 1000000, Issuer: "61646472", CurrentOwner: "61646472", OwnersHistory: []*data.OwnerData{ { - Address: "61646472", - Timestamp: 1000, + Address: "61646472", + Timestamp: 1000, + TimestampMs: 1000000, }, }, Properties: &data.TokenProperties{}, @@ -194,14 +195,16 @@ func TestLogsAndEventsProcessor_ExtractDataFromLogsAndPutInAltered(t *testing.T) Contract: "636f6e7472616374", ActiveStakeNum: 0.1, ActiveStake: "1000000000", - Timestamp: time.Duration(1000), + Timestamp: 1000, + TimestampMs: 1000000, }, resLogs.Delegators["61646472636f6e7472616374"]) require.Equal(t, &data.Delegator{ Address: "61646472", Contract: "636f6e74726163742d7365636f6e64", ActiveStakeNum: 0.1, ActiveStake: "1000000000", - Timestamp: time.Duration(1000), + Timestamp: 1000, + TimestampMs: 1000000, }, resLogs.Delegators["61646472636f6e74726163742d7365636f6e64"]) } @@ -234,7 +237,7 @@ func TestLogsAndEventsProcessor_PrepareLogsForDB(t *testing.T) { Hash: "747848617368", OriginalTxHash: "orignalHash", }, - }}, 1234, 0, 3) + }}, 1234, 0, 3, 1234000) result.DBLogs[0].UUID = "" @@ -242,7 +245,8 @@ func TestLogsAndEventsProcessor_PrepareLogsForDB(t *testing.T) { ID: "747848617368", Address: "61646472657373", OriginalTxHash: "orignalHash", - Timestamp: time.Duration(1234), + Timestamp: 1234, + TimestampMs: 1234000, Events: []*data.Event{ { Address: "61646472", @@ -290,12 +294,14 @@ func TestLogsAndEventsProcessor_ExtractDataFromLogsNFTBurn(t *testing.T) { args.BalanceConverter = balanceConverter proc, _ := NewLogsAndEventsProcessor(args) - resLogs := proc.ExtractDataFromLogs(logsAndEventsSlice, res, 1000, 2, 3) + resLogs := proc.ExtractDataFromLogs(logsAndEventsSlice, res, 1000, 2, 3, 1000000) require.Equal(t, 1, resLogs.TokensSupply.Len()) tokensSupply := resLogs.TokensSupply.GetAll() require.Equal(t, "MY-NFT", tokensSupply[0].Token) require.Equal(t, "MY-NFT-02", tokensSupply[0].Identifier) + require.Equal(t, uint64(1000), tokensSupply[0].Timestamp) + require.Equal(t, uint64(1000000), tokensSupply[0].TimestampMs) } func TestPrepareLogsAndEvents_LogEvents(t *testing.T) { @@ -333,7 +339,7 @@ func TestPrepareLogsAndEvents_LogEvents(t *testing.T) { Hash: "747848617368", OriginalTxHash: "originalHash", }, - }}, 1234, 1, 3) + }}, 1234, 1, 3, 1234000) results.DBEvents[0].UUID = "" results.DBEvents[1].UUID = "" @@ -351,6 +357,7 @@ func TestPrepareLogsAndEvents_LogEvents(t *testing.T) { Order: 0, ShardID: 1, Timestamp: 1234, + TimestampMs: 1234000, TxOrder: 0, }, { @@ -366,6 +373,7 @@ func TestPrepareLogsAndEvents_LogEvents(t *testing.T) { Order: 1, ShardID: 1, Timestamp: 1234, + TimestampMs: 1234000, TxOrder: 0, }, }, results.DBEvents) diff --git a/process/elasticproc/logsevents/logsData.go b/process/elasticproc/logsevents/logsData.go index caacb880..0b45f903 100644 --- a/process/elasticproc/logsevents/logsData.go +++ b/process/elasticproc/logsevents/logsData.go @@ -8,6 +8,7 @@ import ( type logsData struct { timestamp uint64 + timestampMs uint64 txHashStatusInfoProc txHashStatusInfoHandler tokens data.TokensHandler tokensSupply data.TokensHandler @@ -25,6 +26,7 @@ func newLogsData( timestamp uint64, txs []*data.Transaction, scrs []*data.ScResult, + timestampMs uint64, ) *logsData { ld := &logsData{} @@ -40,6 +42,7 @@ func newLogsData( ld.nftsDataUpdates = make([]*data.NFTDataUpdate, 0) ld.tokenRolesAndProperties = tokeninfo.NewTokenRolesAndProperties() ld.txHashStatusInfoProc = newTxHashStatusInfoProcessor() + ld.timestampMs = timestampMs return ld } diff --git a/process/elasticproc/logsevents/nftsProcessor.go b/process/elasticproc/logsevents/nftsProcessor.go index 4189f964..01618c5c 100644 --- a/process/elasticproc/logsevents/nftsProcessor.go +++ b/process/elasticproc/logsevents/nftsProcessor.go @@ -1,9 +1,6 @@ package logsevents import ( - "math/big" - "time" - "github.com/multiversx/mx-chain-core-go/core" "github.com/multiversx/mx-chain-core-go/core/sharding" coreData "github.com/multiversx/mx-chain-core-go/data" @@ -13,6 +10,7 @@ import ( "github.com/multiversx/mx-chain-es-indexer-go/data" "github.com/multiversx/mx-chain-es-indexer-go/process/elasticproc/converters" logger "github.com/multiversx/mx-chain-logger-go" + "math/big" ) const ( @@ -65,7 +63,7 @@ func (np *nftsProcessor) processEvent(args *argsProcessEvent) argOutputProcessEv sender := args.event.GetAddress() senderShardID := sharding.ComputeShardID(sender, args.numOfShards) if senderShardID == args.selfShardID { - np.processNFTEventOnSender(args.event, args.tokens, args.tokensSupply, args.timestamp) + np.processNFTEventOnSender(args.event, args.tokens, args.tokensSupply, args.timestamp, args.timestampMs) } token := string(topics[0]) @@ -87,10 +85,11 @@ func (np *nftsProcessor) processEvent(args *argsProcessEvent) argOutputProcessEv if eventIdentifier == core.BuiltInFunctionESDTWipe { args.tokensSupply.Add(&data.TokenInfo{ - Token: token, - Identifier: identifier, - Timestamp: time.Duration(args.timestamp), - Nonce: nonceBig.Uint64(), + Token: token, + Identifier: identifier, + Timestamp: args.timestamp, + TimestampMs: args.timestampMs, + Nonce: nonceBig.Uint64(), }) } @@ -116,6 +115,7 @@ func (np *nftsProcessor) processNFTEventOnSender( tokensCreateInfo data.TokensHandler, tokensSupply data.TokensHandler, timestamp uint64, + timestampMs uint64, ) { topics := event.GetTopics() token := string(topics[0]) @@ -123,10 +123,11 @@ func (np *nftsProcessor) processNFTEventOnSender( eventIdentifier := string(event.GetIdentifier()) if eventIdentifier == core.BuiltInFunctionESDTNFTBurn || eventIdentifier == core.BuiltInFunctionESDTWipe { tokensSupply.Add(&data.TokenInfo{ - Token: token, - Identifier: converters.ComputeTokenIdentifier(token, nonceBig.Uint64()), - Timestamp: time.Duration(timestamp), - Nonce: nonceBig.Uint64(), + Token: token, + Identifier: converters.ComputeTokenIdentifier(token, nonceBig.Uint64()), + Timestamp: timestamp, + TimestampMs: timestampMs, + Nonce: nonceBig.Uint64(), }) } @@ -146,11 +147,12 @@ func (np *nftsProcessor) processNFTEventOnSender( tokenMetaData := converters.PrepareTokenMetaData(convertMetaData(np.pubKeyConverter, esdtToken.TokenMetaData)) tokensCreateInfo.Add(&data.TokenInfo{ - Token: token, - Identifier: converters.ComputeTokenIdentifier(token, nonceBig.Uint64()), - Timestamp: time.Duration(timestamp), - Data: tokenMetaData, - Nonce: nonceBig.Uint64(), + Token: token, + Identifier: converters.ComputeTokenIdentifier(token, nonceBig.Uint64()), + Timestamp: timestamp, + TimestampMs: timestampMs, + Data: tokenMetaData, + Nonce: nonceBig.Uint64(), }) } diff --git a/process/elasticproc/logsevents/nftsProcessor_test.go b/process/elasticproc/logsevents/nftsProcessor_test.go index f8c25925..30189b09 100644 --- a/process/elasticproc/logsevents/nftsProcessor_test.go +++ b/process/elasticproc/logsevents/nftsProcessor_test.go @@ -3,16 +3,14 @@ package logsevents import ( "encoding/hex" "encoding/json" - "math/big" - "testing" - "time" - "github.com/multiversx/mx-chain-core-go/core" "github.com/multiversx/mx-chain-core-go/data/esdt" "github.com/multiversx/mx-chain-core-go/data/transaction" "github.com/multiversx/mx-chain-es-indexer-go/data" "github.com/multiversx/mx-chain-es-indexer-go/mock" "github.com/stretchr/testify/require" + "math/big" + "testing" ) func TestNftsProcessor_processLogAndEventsNFTs(t *testing.T) { @@ -82,6 +80,6 @@ func TestNftsProcessor_processLogAndEventsNFTs_Wipe(t *testing.T) { Identifier: "nft-0123-14", Token: "nft-0123", Nonce: 20, - Timestamp: time.Duration(10000), + Timestamp: 10000, }, tokensSupply.GetAll()[0]) } diff --git a/process/elasticproc/logsevents/scDeploys.go b/process/elasticproc/logsevents/scDeploys.go index 03c990ff..3a315098 100644 --- a/process/elasticproc/logsevents/scDeploys.go +++ b/process/elasticproc/logsevents/scDeploys.go @@ -1,8 +1,6 @@ package logsevents import ( - "time" - "github.com/multiversx/mx-chain-core-go/core" "github.com/multiversx/mx-chain-es-indexer-go/data" ) @@ -56,6 +54,7 @@ func (sdp *scDeploysProcessor) processEvent(args *argsProcessEvent) argOutputPro CurrentOwner: creatorAddress, CodeHash: topics[2], Timestamp: args.timestamp, + TimestampMs: args.timestampMs, } return argOutputProcessEvent{ @@ -67,9 +66,10 @@ func (sdp *scDeploysProcessor) processChangeOwnerEvent(args *argsProcessEvent) a scAddress := sdp.pubKeyConverter.SilentEncode(args.event.GetAddress(), log) newOwner := sdp.pubKeyConverter.SilentEncode(args.event.GetTopics()[0], log) args.changeOwnerOperations[scAddress] = &data.OwnerData{ - TxHash: args.txHashHexEncoded, - Address: newOwner, - Timestamp: time.Duration(args.timestamp), + TxHash: args.txHashHexEncoded, + Address: newOwner, + Timestamp: args.timestamp, + TimestampMs: args.timestampMs, } return argOutputProcessEvent{ diff --git a/process/elasticproc/logsevents/scDeploys_test.go b/process/elasticproc/logsevents/scDeploys_test.go index a725fb4b..8c29af56 100644 --- a/process/elasticproc/logsevents/scDeploys_test.go +++ b/process/elasticproc/logsevents/scDeploys_test.go @@ -25,6 +25,7 @@ func TestScDeploysProcessor(t *testing.T) { res := scDeploysProc.processEvent(&argsProcessEvent{ event: event, timestamp: 1000, + timestampMs: 1000000, scDeploys: scDeploys, txHashHexEncoded: "01020304", }) @@ -34,6 +35,7 @@ func TestScDeploysProcessor(t *testing.T) { TxHash: "01020304", Creator: "6164647232", Timestamp: uint64(1000), + TimestampMs: uint64(1000000), CurrentOwner: "6164647232", CodeHash: []byte("codeHash"), }, scDeploys["6164647231"]) @@ -53,13 +55,15 @@ func TestScDeploysProcessorChangeOwner(t *testing.T) { event: event, changeOwnerOperations: changeOwnerOperations, timestamp: 2000, + timestampMs: 2000000, txHashHexEncoded: "01020304", }) require.True(t, res.processed) require.Equal(t, &data.OwnerData{ - TxHash: "01020304", - Address: "6e65774f776e6572", - Timestamp: 2000, + TxHash: "01020304", + Address: "6e65774f776e6572", + Timestamp: 2000, + TimestampMs: 2000000, }, changeOwnerOperations["636f6e747261637441646472"]) } diff --git a/process/elasticproc/logsevents/serialize.go b/process/elasticproc/logsevents/serialize.go index 57d69f7e..ef406550 100644 --- a/process/elasticproc/logsevents/serialize.go +++ b/process/elasticproc/logsevents/serialize.go @@ -154,10 +154,11 @@ func serializeDeploy(deployInfo *data.ScDeployInfo) ([]byte, error) { } upgradeData := &data.Upgrade{ - TxHash: deployInfo.TxHash, - Upgrader: deployInfo.Creator, - Timestamp: deployInfo.Timestamp, - CodeHash: deployInfo.CodeHash, + TxHash: deployInfo.TxHash, + Upgrader: deployInfo.Creator, + Timestamp: deployInfo.Timestamp, + CodeHash: deployInfo.CodeHash, + TimestampMs: deployInfo.TimestampMs, } upgradeSerialized, errPrepareU := json.Marshal(upgradeData) if errPrepareU != nil { diff --git a/process/elasticproc/logsevents/serializeDelegators.go b/process/elasticproc/logsevents/serializeDelegators.go index b5b023da..1d3b1b74 100644 --- a/process/elasticproc/logsevents/serializeDelegators.go +++ b/process/elasticproc/logsevents/serializeDelegators.go @@ -28,26 +28,26 @@ func (lep *logsAndEventsProcessor) SerializeDelegators(delegators map[string]*da } // PrepareDelegatorsQueryInCaseOfRevert will prepare the delegators query in case of revert -func (lep *logsAndEventsProcessor) PrepareDelegatorsQueryInCaseOfRevert(timestamp uint64) *bytes.Buffer { +func (lep *logsAndEventsProcessor) PrepareDelegatorsQueryInCaseOfRevert(timestampMs uint64) *bytes.Buffer { codeToExecute := ` if ( !ctx._source.containsKey('unDelegateInfo') ) { return } if ( ctx._source.unDelegateInfo.length == 0 ) { return } - ctx._source.unDelegateInfo.removeIf(info -> info.timestamp.equals(params.timestamp)); + ctx._source.unDelegateInfo.removeIf(info -> info.timestampMs.equals(params.timestampMs)); ` query := fmt.Sprintf(` { "query": { "match": { - "timestamp": "%d" + "timestampMs": "%d" } }, "script": { "source": "%s", "lang": "painless", - "params": {"timestamp": %d} + "params": {"timestampMs": %d} } - }`, timestamp, converters.FormatPainlessSource(codeToExecute), timestamp) + }`, timestampMs, converters.FormatPainlessSource(codeToExecute), timestampMs) return bytes.NewBuffer([]byte(query)) } @@ -85,6 +85,7 @@ func prepareSerializedDataForDelegator(delegatorSerialized []byte) []byte { ctx._source.activeStake = params.delegator.activeStake; ctx._source.activeStakeNum = params.delegator.activeStakeNum; ctx._source.timestamp = params.delegator.timestamp; + ctx._source.timestampMs = params.delegator.timestampMs; } ` serializedDataStr := fmt.Sprintf(`{"scripted_upsert": true, "script": {`+ @@ -117,6 +118,7 @@ func prepareSerializedDataForUnDelegate(delegator *data.Delegator, delegatorSeri ctx._source.activeStake = params.delegator.activeStake; ctx._source.activeStakeNum = params.delegator.activeStakeNum; ctx._source.timestamp = params.delegator.timestamp; + ctx._source.timestampMs = params.delegator.timestampMs; } ` serializedDataStr := fmt.Sprintf(`{"scripted_upsert": true, "script": {`+ @@ -158,6 +160,7 @@ func prepareSerializedDataForWithdrawal(delegator *data.Delegator, delegatorSeri ctx._source.activeStake = params.delegator.activeStake; ctx._source.activeStakeNum = params.delegator.activeStakeNum; ctx._source.timestamp = params.delegator.timestamp; + ctx._source.timestampMs = params.delegator.timestampMs; } ` serializedDataStr := fmt.Sprintf(`{"scripted_upsert": true, "script": {`+ diff --git a/process/elasticproc/logsevents/serialize_test.go b/process/elasticproc/logsevents/serialize_test.go index f547e18d..30c84362 100644 --- a/process/elasticproc/logsevents/serialize_test.go +++ b/process/elasticproc/logsevents/serialize_test.go @@ -1,14 +1,12 @@ package logsevents import ( - "math/big" - "testing" - "time" - "github.com/multiversx/mx-chain-core-go/core" "github.com/multiversx/mx-chain-es-indexer-go/data" "github.com/multiversx/mx-chain-es-indexer-go/mock" "github.com/stretchr/testify/require" + "math/big" + "testing" ) func TestLogsAndEventsProcessor_SerializeLogs(t *testing.T) { @@ -18,7 +16,7 @@ func TestLogsAndEventsProcessor_SerializeLogs(t *testing.T) { { ID: "747848617368", Address: "61646472657373", - Timestamp: time.Duration(1234), + Timestamp: 1234, Events: []*data.Event{ { Address: "61646472", @@ -46,9 +44,10 @@ func TestLogsAndEventsProcessor_SerializeSCDeploys(t *testing.T) { scDeploys := map[string]*data.ScDeployInfo{ "scAddr": { - Creator: "creator", - Timestamp: 123, - TxHash: "hash", + Creator: "creator", + Timestamp: 123, + TxHash: "hash", + TimestampMs: 123000, }, } @@ -57,7 +56,7 @@ func TestLogsAndEventsProcessor_SerializeSCDeploys(t *testing.T) { require.Nil(t, err) expectedRes := `{ "update" : { "_index":"scdeploys", "_id" : "scAddr" } } -{"script": {"source": "if (!ctx._source.containsKey('upgrades')) {ctx._source.upgrades = [params.elem];} else {ctx._source.upgrades.add(params.elem);}","lang": "painless","params": {"elem": {"upgradeTxHash":"hash","upgrader":"creator","timestamp":123,"codeHash":null}}},"upsert": {"deployTxHash":"hash","deployer":"creator","currentOwner":"","initialCodeHash":null,"timestamp":123,"upgrades":[],"owners":[]}} +{"script": {"source": "if (!ctx._source.containsKey('upgrades')) {ctx._source.upgrades = [params.elem];} else {ctx._source.upgrades.add(params.elem);}","lang": "painless","params": {"elem": {"upgradeTxHash":"hash","upgrader":"creator","timestamp":123,"timestampMs":123000,"codeHash":null}}},"upsert": {"deployTxHash":"hash","deployer":"creator","currentOwner":"","initialCodeHash":null,"timestamp":123,"timestampMs":123000,"upgrades":[],"owners":[]}} ` require.Equal(t, expectedRes, buffSlice.Buffers()[0].String()) } @@ -134,7 +133,7 @@ func TestLogsAndEventsProcessor_SerializeDelegators(t *testing.T) { require.Nil(t, err) expectedRes := `{ "update" : { "_index":"delegators", "_id" : "/GeogJjDjtpxnceK9t6+BVBYWuuJHbjmsWK0/1BlH9c=" } } -{"scripted_upsert": true, "script": {"source": "if ('create' == ctx.op) {ctx._source = params.delegator} else {ctx._source.activeStake = params.delegator.activeStake;ctx._source.activeStakeNum = params.delegator.activeStakeNum;ctx._source.timestamp = params.delegator.timestamp;}","lang": "painless","params": { "delegator": {"address":"addr1","contract":"contract1","timestamp":0,"activeStake":"100000000000000","activeStakeNum":0.1} }},"upsert": {}} +{"scripted_upsert": true, "script": {"source": "if ('create' == ctx.op) {ctx._source = params.delegator} else {ctx._source.activeStake = params.delegator.activeStake;ctx._source.activeStakeNum = params.delegator.activeStakeNum;ctx._source.timestamp = params.delegator.timestamp;ctx._source.timestampMs = params.delegator.timestampMs;}","lang": "painless","params": { "delegator": {"address":"addr1","contract":"contract1","timestamp":0,"activeStake":"100000000000000","activeStakeNum":0.1} }},"upsert": {}} ` require.Equal(t, expectedRes, buffSlice.Buffers()[0].String()) } diff --git a/process/elasticproc/miniblocks/miniblocksProcessor.go b/process/elasticproc/miniblocks/miniblocksProcessor.go index c4c1c061..451991cd 100644 --- a/process/elasticproc/miniblocks/miniblocksProcessor.go +++ b/process/elasticproc/miniblocks/miniblocksProcessor.go @@ -2,8 +2,6 @@ package miniblocks import ( "encoding/hex" - "time" - "github.com/multiversx/mx-chain-core-go/core" "github.com/multiversx/mx-chain-core-go/core/check" coreData "github.com/multiversx/mx-chain-core-go/data" @@ -41,7 +39,7 @@ func NewMiniblocksProcessor( } // PrepareDBMiniblocks will prepare miniblocks -func (mp *miniblocksProcessor) PrepareDBMiniblocks(header coreData.HeaderHandler, miniBlocks []*block.MiniBlock) []*data.Miniblock { +func (mp *miniblocksProcessor) PrepareDBMiniblocks(header coreData.HeaderHandler, miniBlocks []*block.MiniBlock, timestampMS uint64) []*data.Miniblock { headerHash, err := mp.calculateHash(header) if err != nil { log.Warn("indexer: could not calculate header hash", "error", err) @@ -56,7 +54,7 @@ func (mp *miniblocksProcessor) PrepareDBMiniblocks(header coreData.HeaderHandler continue } - dbMiniBlock, errPrepareMiniBlock := mp.prepareMiniblockForDB(mbIndex, miniBlock, header, headerHash) + dbMiniBlock, errPrepareMiniBlock := mp.prepareMiniblockForDB(mbIndex, miniBlock, header, headerHash, timestampMS) if errPrepareMiniBlock != nil { log.Warn("miniblocksProcessor.PrepareDBMiniBlocks cannot prepare miniblock", "error", errPrepareMiniBlock) continue @@ -73,6 +71,7 @@ func (mp *miniblocksProcessor) prepareMiniblockForDB( miniblock *block.MiniBlock, header coreData.HeaderHandler, headerHash []byte, + timestampMS uint64, ) (*data.Miniblock, error) { mbHash, err := mp.calculateHash(miniblock) if err != nil { @@ -86,7 +85,8 @@ func (mp *miniblocksProcessor) prepareMiniblockForDB( SenderShardID: miniblock.SenderShardID, ReceiverShardID: miniblock.ReceiverShardID, Type: miniblock.Type.String(), - Timestamp: time.Duration(header.GetTimeStamp()), + Timestamp: header.GetTimeStamp(), + TimestampMs: timestampMS, Reserved: miniblock.Reserved, } diff --git a/process/elasticproc/miniblocks/miniblocksProcessor_test.go b/process/elasticproc/miniblocks/miniblocksProcessor_test.go index f9cf687b..180b16fe 100644 --- a/process/elasticproc/miniblocks/miniblocksProcessor_test.go +++ b/process/elasticproc/miniblocks/miniblocksProcessor_test.go @@ -65,7 +65,7 @@ func TestMiniblocksProcessor_PrepareDBMiniblocks(t *testing.T) { }, } - miniblocks := mp.PrepareDBMiniblocks(header, body.MiniBlocks) + miniblocks := mp.PrepareDBMiniblocks(header, body.MiniBlocks, 1234000) require.Len(t, miniblocks, 3) } @@ -90,6 +90,7 @@ func TestMiniblocksProcessor_PrepareScheduledMB(t *testing.T) { Reserved: mbhrBytes, }, }, + TimeStamp: 1234, } miniBlocks := []*dataBlock.MiniBlock{ { @@ -106,7 +107,7 @@ func TestMiniblocksProcessor_PrepareScheduledMB(t *testing.T) { }, } - miniblocks := mp.PrepareDBMiniblocks(header, miniBlocks) + miniblocks := mp.PrepareDBMiniblocks(header, miniBlocks, 1234000) require.Len(t, miniblocks, 3) require.Equal(t, dataBlock.Scheduled.String(), miniblocks[1].ProcessingTypeOnSource) @@ -114,11 +115,13 @@ func TestMiniblocksProcessor_PrepareScheduledMB(t *testing.T) { Hash: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", SenderShardID: 0, ReceiverShardID: 0, - SenderBlockHash: "84b80cbf612d067201b5260b4c6f90fa7b5c11e898fa9c1c65f4c75e61e41619", - ReceiverBlockHash: "84b80cbf612d067201b5260b4c6f90fa7b5c11e898fa9c1c65f4c75e61e41619", + SenderBlockHash: "64ad61aaddb68f8d0b38ceda3b2b1f76a6749a0e848ed9e95bdaff46b4e73423", + ReceiverBlockHash: "64ad61aaddb68f8d0b38ceda3b2b1f76a6749a0e848ed9e95bdaff46b4e73423", ProcessingTypeOnSource: dataBlock.Normal.String(), ProcessingTypeOnDestination: dataBlock.Normal.String(), Type: dataBlock.TxBlock.String(), + Timestamp: 1234, + TimestampMs: 1234000, }, miniblocks[2]) } diff --git a/process/elasticproc/statistics/serialize.go b/process/elasticproc/statistics/serialize.go index 09879f25..61edf964 100644 --- a/process/elasticproc/statistics/serialize.go +++ b/process/elasticproc/statistics/serialize.go @@ -4,8 +4,6 @@ import ( "bytes" "encoding/json" "fmt" - "time" - "github.com/multiversx/mx-chain-core-go/data/outport" "github.com/multiversx/mx-chain-es-indexer-go/data" logger "github.com/multiversx/mx-chain-logger-go" @@ -31,7 +29,8 @@ func (sp *statisticsProcessor) SerializeRoundsInfo(rounds *outport.RoundsInfo) * BlockWasProposed: info.BlockWasProposed, ShardId: info.ShardId, Epoch: info.Epoch, - Timestamp: time.Duration(info.Timestamp), + Timestamp: info.Timestamp, + TimestampMs: info.TimestampMs, }) buff.Grow(len(meta) + len(serializedRoundInfo)) diff --git a/process/elasticproc/statistics/serialize_test.go b/process/elasticproc/statistics/serialize_test.go index a0cd079c..cf9e96c6 100644 --- a/process/elasticproc/statistics/serialize_test.go +++ b/process/elasticproc/statistics/serialize_test.go @@ -14,11 +14,13 @@ func TestStatisticsProcessor_SerializeRoundsInfo(t *testing.T) { buff := sp.SerializeRoundsInfo(&outport.RoundsInfo{ RoundsInfo: []*outport.RoundInfo{{ - Epoch: 1, + Epoch: 1, + Timestamp: 1234, + TimestampMs: 1234000, }}, }) expectedBuff := `{ "index" : { "_id" : "0_0" } } -{"round":0,"signersIndexes":null,"blockWasProposed":false,"shardId":0,"epoch":1,"timestamp":0} +{"round":0,"signersIndexes":null,"blockWasProposed":false,"shardId":0,"epoch":1,"timestamp":1234,"timestampMs":1234000} ` require.Equal(t, expectedBuff, buff.String()) } diff --git a/process/elasticproc/templatesAndPolicies/interface.go b/process/elasticproc/templatesAndPolicies/interface.go deleted file mode 100644 index 2215c781..00000000 --- a/process/elasticproc/templatesAndPolicies/interface.go +++ /dev/null @@ -1,13 +0,0 @@ -package templatesAndPolicies - -import ( - "bytes" - - "github.com/multiversx/mx-chain-es-indexer-go/templates" -) - -// TemplatesAndPoliciesHandler defines the actions that a templates and policies handler should do -type TemplatesAndPoliciesHandler interface { - GetElasticTemplatesAndPolicies() (map[string]*bytes.Buffer, map[string]*bytes.Buffer, error) - GetExtraMappings() ([]templates.ExtraMapping, error) -} diff --git a/process/elasticproc/templatesAndPolicies/noKibana.go b/process/elasticproc/templatesAndPolicies/noKibana.go deleted file mode 100644 index 3840c71c..00000000 --- a/process/elasticproc/templatesAndPolicies/noKibana.go +++ /dev/null @@ -1,53 +0,0 @@ -package templatesAndPolicies - -import ( - "bytes" - - indexer "github.com/multiversx/mx-chain-es-indexer-go/process/dataindexer" - "github.com/multiversx/mx-chain-es-indexer-go/templates" - "github.com/multiversx/mx-chain-es-indexer-go/templates/noKibana" -) - -type templatesAndPolicyReaderNoKibana struct{} - -// NewTemplatesAndPolicyReaderNoKibana will create a new instance of templatesAndPolicyReaderNoKibana -func NewTemplatesAndPolicyReaderNoKibana() *templatesAndPolicyReaderNoKibana { - return new(templatesAndPolicyReaderNoKibana) -} - -// GetElasticTemplatesAndPolicies will return templates and policies -func (tr *templatesAndPolicyReaderNoKibana) GetElasticTemplatesAndPolicies() (map[string]*bytes.Buffer, map[string]*bytes.Buffer, error) { - indexPolicies := make(map[string]*bytes.Buffer) - indexTemplates := make(map[string]*bytes.Buffer) - - indexTemplates["opendistro"] = noKibana.OpenDistro.ToBuffer() - indexTemplates[indexer.TransactionsIndex] = noKibana.Transactions.ToBuffer() - indexTemplates[indexer.BlockIndex] = noKibana.Blocks.ToBuffer() - indexTemplates[indexer.MiniblocksIndex] = noKibana.Miniblocks.ToBuffer() - indexTemplates[indexer.RatingIndex] = noKibana.Rating.ToBuffer() - indexTemplates[indexer.RoundsIndex] = noKibana.Rounds.ToBuffer() - indexTemplates[indexer.ValidatorsIndex] = noKibana.Validators.ToBuffer() - indexTemplates[indexer.AccountsIndex] = noKibana.Accounts.ToBuffer() - indexTemplates[indexer.AccountsHistoryIndex] = noKibana.AccountsHistory.ToBuffer() - indexTemplates[indexer.AccountsESDTIndex] = noKibana.AccountsESDT.ToBuffer() - indexTemplates[indexer.AccountsESDTHistoryIndex] = noKibana.AccountsESDTHistory.ToBuffer() - indexTemplates[indexer.EpochInfoIndex] = noKibana.EpochInfo.ToBuffer() - indexTemplates[indexer.ReceiptsIndex] = noKibana.Receipts.ToBuffer() - indexTemplates[indexer.ScResultsIndex] = noKibana.SCResults.ToBuffer() - indexTemplates[indexer.SCDeploysIndex] = noKibana.SCDeploys.ToBuffer() - indexTemplates[indexer.TokensIndex] = noKibana.Tokens.ToBuffer() - indexTemplates[indexer.TagsIndex] = noKibana.Tags.ToBuffer() - indexTemplates[indexer.LogsIndex] = noKibana.Logs.ToBuffer() - indexTemplates[indexer.DelegatorsIndex] = noKibana.Delegators.ToBuffer() - indexTemplates[indexer.OperationsIndex] = noKibana.Operations.ToBuffer() - indexTemplates[indexer.ESDTsIndex] = noKibana.ESDTs.ToBuffer() - indexTemplates[indexer.ValuesIndex] = noKibana.Values.ToBuffer() - indexTemplates[indexer.EventsIndex] = noKibana.Events.ToBuffer() - - return indexTemplates, indexPolicies, nil -} - -// GetExtraMappings will return an array of indices extra mappings -func (tr *templatesAndPolicyReaderNoKibana) GetExtraMappings() ([]templates.ExtraMapping, error) { - return []templates.ExtraMapping{}, nil -} diff --git a/process/elasticproc/templatesAndPolicies/reader.go b/process/elasticproc/templatesAndPolicies/reader.go new file mode 100644 index 00000000..35db2efb --- /dev/null +++ b/process/elasticproc/templatesAndPolicies/reader.go @@ -0,0 +1,128 @@ +package templatesAndPolicies + +import ( + "bytes" + + indexer "github.com/multiversx/mx-chain-es-indexer-go/process/dataindexer" + "github.com/multiversx/mx-chain-es-indexer-go/templates" + "github.com/multiversx/mx-chain-es-indexer-go/templates/indices" +) + +type templatesAndPolicyReader struct{} + +// NewTemplatesAndPolicyReader will create a new instance of templatesAndPolicyReader +func NewTemplatesAndPolicyReader() *templatesAndPolicyReader { + return new(templatesAndPolicyReader) +} + +// GetElasticTemplatesAndPolicies will return templates and policies +func (tr *templatesAndPolicyReader) GetElasticTemplatesAndPolicies() (map[string]*bytes.Buffer, map[string]*bytes.Buffer, error) { + indexPolicies := make(map[string]*bytes.Buffer) + indexTemplates := make(map[string]*bytes.Buffer) + + indexTemplates["opendistro"] = indices.OpenDistro.ToBuffer() + indexTemplates[indexer.TransactionsIndex] = indices.Transactions.ToBuffer() + indexTemplates[indexer.BlockIndex] = indices.Blocks.ToBuffer() + indexTemplates[indexer.MiniblocksIndex] = indices.Miniblocks.ToBuffer() + indexTemplates[indexer.RatingIndex] = indices.Rating.ToBuffer() + indexTemplates[indexer.RoundsIndex] = indices.Rounds.ToBuffer() + indexTemplates[indexer.ValidatorsIndex] = indices.Validators.ToBuffer() + indexTemplates[indexer.AccountsIndex] = indices.Accounts.ToBuffer() + indexTemplates[indexer.AccountsHistoryIndex] = indices.AccountsHistory.ToBuffer() + indexTemplates[indexer.AccountsESDTIndex] = indices.AccountsESDT.ToBuffer() + indexTemplates[indexer.AccountsESDTHistoryIndex] = indices.AccountsESDTHistory.ToBuffer() + indexTemplates[indexer.EpochInfoIndex] = indices.EpochInfo.ToBuffer() + indexTemplates[indexer.ReceiptsIndex] = indices.Receipts.ToBuffer() + indexTemplates[indexer.ScResultsIndex] = indices.SCResults.ToBuffer() + indexTemplates[indexer.SCDeploysIndex] = indices.SCDeploys.ToBuffer() + indexTemplates[indexer.TokensIndex] = indices.Tokens.ToBuffer() + indexTemplates[indexer.TagsIndex] = indices.Tags.ToBuffer() + indexTemplates[indexer.LogsIndex] = indices.Logs.ToBuffer() + indexTemplates[indexer.DelegatorsIndex] = indices.Delegators.ToBuffer() + indexTemplates[indexer.OperationsIndex] = indices.Operations.ToBuffer() + indexTemplates[indexer.ESDTsIndex] = indices.ESDTs.ToBuffer() + indexTemplates[indexer.ValuesIndex] = indices.Values.ToBuffer() + indexTemplates[indexer.EventsIndex] = indices.Events.ToBuffer() + + return indexTemplates, indexPolicies, nil +} + +// GetTimestampMsMappings will return the timestampMs field mappings for all indices +func (tr *templatesAndPolicyReader) GetTimestampMsMappings() ([]templates.ExtraMapping, error) { + return []templates.ExtraMapping{ + { + Index: indexer.TransactionsIndex, + Mappings: indices.TimestampMs.ToBuffer(), + }, + { + Index: indexer.BlockIndex, + Mappings: indices.TimestampMs.ToBuffer(), + }, + { + Index: indexer.MiniblocksIndex, + Mappings: indices.TimestampMs.ToBuffer(), + }, + { + Index: indexer.RoundsIndex, + Mappings: indices.TimestampMs.ToBuffer(), + }, + { + Index: indexer.AccountsIndex, + Mappings: indices.TimestampMs.ToBuffer(), + }, + { + Index: indexer.AccountsESDTIndex, + Mappings: indices.TimestampMs.ToBuffer(), + }, + { + Index: indexer.AccountsHistoryIndex, + Mappings: indices.TimestampMs.ToBuffer(), + }, + { + Index: indexer.AccountsESDTHistoryIndex, + Mappings: indices.TimestampMs.ToBuffer(), + }, + { + Index: indexer.ReceiptsIndex, + Mappings: indices.TimestampMs.ToBuffer(), + }, + + { + Index: indexer.ScResultsIndex, + Mappings: indices.TimestampMs.ToBuffer(), + }, + { + Index: indexer.LogsIndex, + Mappings: indices.TimestampMs.ToBuffer(), + }, + { + Index: indexer.OperationsIndex, + Mappings: indices.TimestampMs.ToBuffer(), + }, + { + Index: indexer.EventsIndex, + Mappings: indices.TimestampMs.ToBuffer(), + }, + { + Index: indexer.TokensIndex, + Mappings: indices.TokensTimestampMs.ToBuffer(), + }, + { + Index: indexer.ESDTsIndex, + Mappings: indices.TokensTimestampMs.ToBuffer(), + }, + { + Index: indexer.DelegatorsIndex, + Mappings: indices.DelegatorsTimestampMs.ToBuffer(), + }, + { + Index: indexer.SCDeploysIndex, + Mappings: indices.DeploysTimestampMs.ToBuffer(), + }, + }, nil +} + +// GetExtraMappings will return an array of indices extra mappings +func (tr *templatesAndPolicyReader) GetExtraMappings() ([]templates.ExtraMapping, error) { + return []templates.ExtraMapping{}, nil +} diff --git a/process/elasticproc/templatesAndPolicies/noKibana_test.go b/process/elasticproc/templatesAndPolicies/reader_test.go similarity index 87% rename from process/elasticproc/templatesAndPolicies/noKibana_test.go rename to process/elasticproc/templatesAndPolicies/reader_test.go index 7cbf22b9..6626311e 100644 --- a/process/elasticproc/templatesAndPolicies/noKibana_test.go +++ b/process/elasticproc/templatesAndPolicies/reader_test.go @@ -9,7 +9,7 @@ import ( func TestTemplatesAndPolicyReaderNoKibana_GetElasticTemplatesAndPolicies(t *testing.T) { t.Parallel() - reader := NewTemplatesAndPolicyReaderNoKibana() + reader := NewTemplatesAndPolicyReader() templates, policies, err := reader.GetElasticTemplatesAndPolicies() require.Nil(t, err) diff --git a/process/elasticproc/templatesAndPolicies/templatesAndPoliciesFactory.go b/process/elasticproc/templatesAndPolicies/templatesAndPoliciesFactory.go deleted file mode 100644 index e3a32e32..00000000 --- a/process/elasticproc/templatesAndPolicies/templatesAndPoliciesFactory.go +++ /dev/null @@ -1,10 +0,0 @@ -package templatesAndPolicies - -// CreateTemplatesAndPoliciesReader will create a new instance of templatesAndPoliciesReader -func CreateTemplatesAndPoliciesReader(useKibana bool) TemplatesAndPoliciesHandler { - if useKibana { - return NewTemplatesAndPolicyReaderWithKibana() - } - - return NewTemplatesAndPolicyReaderNoKibana() -} diff --git a/process/elasticproc/templatesAndPolicies/templatesAndPoliciesFactory_test.go b/process/elasticproc/templatesAndPolicies/templatesAndPoliciesFactory_test.go deleted file mode 100644 index 8e9e0f45..00000000 --- a/process/elasticproc/templatesAndPolicies/templatesAndPoliciesFactory_test.go +++ /dev/null @@ -1,25 +0,0 @@ -package templatesAndPolicies - -import ( - "testing" - - "github.com/stretchr/testify/require" -) - -func TestCreateTemplatesAndPoliciesReader_NoKibana(t *testing.T) { - t.Parallel() - - reader := CreateTemplatesAndPoliciesReader(false) - - _, ok := reader.(*templatesAndPolicyReaderNoKibana) - require.True(t, ok) -} - -func TestCreateTemplatesAndPoliciesReader_WithKibana(t *testing.T) { - t.Parallel() - - reader := CreateTemplatesAndPoliciesReader(true) - - _, ok := reader.(*templatesAndPolicyReaderWithKibana) - require.True(t, ok) -} diff --git a/process/elasticproc/templatesAndPolicies/withKibana.go b/process/elasticproc/templatesAndPolicies/withKibana.go deleted file mode 100644 index 7ffe6b2f..00000000 --- a/process/elasticproc/templatesAndPolicies/withKibana.go +++ /dev/null @@ -1,77 +0,0 @@ -package templatesAndPolicies - -import ( - "bytes" - - indexer "github.com/multiversx/mx-chain-es-indexer-go/process/dataindexer" - "github.com/multiversx/mx-chain-es-indexer-go/templates" - "github.com/multiversx/mx-chain-es-indexer-go/templates/withKibana" -) - -type templatesAndPolicyReaderWithKibana struct{} - -// NewTemplatesAndPolicyReaderWithKibana will create a new instance of templatesAndPolicyReaderWithKibana -func NewTemplatesAndPolicyReaderWithKibana() *templatesAndPolicyReaderWithKibana { - return new(templatesAndPolicyReaderWithKibana) -} - -// GetElasticTemplatesAndPolicies will return templates and policies -func (tr *templatesAndPolicyReaderWithKibana) GetElasticTemplatesAndPolicies() (map[string]*bytes.Buffer, map[string]*bytes.Buffer, error) { - indexTemplates := getTemplatesKibana() - indexPolicies := getPolicies() - - return indexTemplates, indexPolicies, nil -} - -// GetExtraMappings will return an array of indices extra mappings -func (tr *templatesAndPolicyReaderWithKibana) GetExtraMappings() ([]templates.ExtraMapping, error) { - return []templates.ExtraMapping{}, nil -} - -func getTemplatesKibana() map[string]*bytes.Buffer { - indexTemplates := make(map[string]*bytes.Buffer) - - indexTemplates["opendistro"] = withKibana.OpenDistro.ToBuffer() - indexTemplates[indexer.TransactionsIndex] = withKibana.Transactions.ToBuffer() - indexTemplates[indexer.BlockIndex] = withKibana.Blocks.ToBuffer() - indexTemplates[indexer.MiniblocksIndex] = withKibana.Miniblocks.ToBuffer() - indexTemplates[indexer.RatingIndex] = withKibana.Rating.ToBuffer() - indexTemplates[indexer.RoundsIndex] = withKibana.Rounds.ToBuffer() - indexTemplates[indexer.ValidatorsIndex] = withKibana.Validators.ToBuffer() - indexTemplates[indexer.AccountsIndex] = withKibana.Accounts.ToBuffer() - indexTemplates[indexer.AccountsHistoryIndex] = withKibana.AccountsHistory.ToBuffer() - indexTemplates[indexer.AccountsESDTIndex] = withKibana.AccountsESDT.ToBuffer() - indexTemplates[indexer.AccountsESDTHistoryIndex] = withKibana.AccountsESDTHistory.ToBuffer() - indexTemplates[indexer.EpochInfoIndex] = withKibana.EpochInfo.ToBuffer() - indexTemplates[indexer.ReceiptsIndex] = withKibana.Receipts.ToBuffer() - indexTemplates[indexer.ScResultsIndex] = withKibana.SCResults.ToBuffer() - indexTemplates[indexer.SCDeploysIndex] = withKibana.SCDeploys.ToBuffer() - indexTemplates[indexer.TokensIndex] = withKibana.Tokens.ToBuffer() - indexTemplates[indexer.TagsIndex] = withKibana.Tags.ToBuffer() - indexTemplates[indexer.LogsIndex] = withKibana.Logs.ToBuffer() - indexTemplates[indexer.DelegatorsIndex] = withKibana.Delegators.ToBuffer() - indexTemplates[indexer.OperationsIndex] = withKibana.Operations.ToBuffer() - indexTemplates[indexer.ESDTsIndex] = withKibana.ESDTs.ToBuffer() - - return indexTemplates -} - -func getPolicies() map[string]*bytes.Buffer { - indexesPolicies := make(map[string]*bytes.Buffer) - - indexesPolicies[indexer.TransactionsPolicy] = withKibana.TransactionsPolicy.ToBuffer() - indexesPolicies[indexer.BlockPolicy] = withKibana.BlocksPolicy.ToBuffer() - indexesPolicies[indexer.MiniblocksPolicy] = withKibana.MiniblocksPolicy.ToBuffer() - indexesPolicies[indexer.RatingPolicy] = withKibana.RatingPolicy.ToBuffer() - indexesPolicies[indexer.RoundsPolicy] = withKibana.RoundsPolicy.ToBuffer() - indexesPolicies[indexer.ValidatorsPolicy] = withKibana.ValidatorsPolicy.ToBuffer() - indexesPolicies[indexer.AccountsHistoryPolicy] = withKibana.AccountsHistoryPolicy.ToBuffer() - indexesPolicies[indexer.AccountsPolicy] = withKibana.AccountsPolicy.ToBuffer() - indexesPolicies[indexer.AccountsESDTPolicy] = withKibana.AccountsESDTPolicy.ToBuffer() - indexesPolicies[indexer.AccountsESDTHistoryPolicy] = withKibana.AccountsESDTHistoryPolicy.ToBuffer() - indexesPolicies[indexer.AccountsHistoryPolicy] = withKibana.AccountsHistoryPolicy.ToBuffer() - indexesPolicies[indexer.ReceiptsPolicy] = withKibana.ReceiptsPolicy.ToBuffer() - indexesPolicies[indexer.ScResultsPolicy] = withKibana.ScResultsPolicy.ToBuffer() - - return indexesPolicies -} diff --git a/process/elasticproc/templatesAndPolicies/withKibana_test.go b/process/elasticproc/templatesAndPolicies/withKibana_test.go deleted file mode 100644 index 0a9ab191..00000000 --- a/process/elasticproc/templatesAndPolicies/withKibana_test.go +++ /dev/null @@ -1,18 +0,0 @@ -package templatesAndPolicies - -import ( - "testing" - - "github.com/stretchr/testify/require" -) - -func TestTemplatesAndPolicyReaderWithKibana_GetElasticTemplatesAndPolicies(t *testing.T) { - t.Parallel() - - reader := NewTemplatesAndPolicyReaderWithKibana() - - templates, policies, err := reader.GetElasticTemplatesAndPolicies() - require.Nil(t, err) - require.Len(t, policies, 12) - require.Len(t, templates, 21) -} diff --git a/process/elasticproc/transactions/smartContractResultsProcessor.go b/process/elasticproc/transactions/smartContractResultsProcessor.go index 495978cd..4eaf71d7 100644 --- a/process/elasticproc/transactions/smartContractResultsProcessor.go +++ b/process/elasticproc/transactions/smartContractResultsProcessor.go @@ -2,9 +2,6 @@ package transactions import ( "encoding/hex" - "strconv" - "time" - "github.com/multiversx/mx-chain-core-go/core" coreData "github.com/multiversx/mx-chain-core-go/data" "github.com/multiversx/mx-chain-core-go/data/block" @@ -14,6 +11,7 @@ import ( indexerData "github.com/multiversx/mx-chain-es-indexer-go/data" "github.com/multiversx/mx-chain-es-indexer-go/process/dataindexer" "github.com/multiversx/mx-chain-es-indexer-go/process/elasticproc/converters" + "strconv" ) type smartContractResultsProcessor struct { @@ -45,6 +43,7 @@ func (proc *smartContractResultsProcessor) processSCRs( header coreData.HeaderHandler, scrs map[string]*outport.SCRInfo, numOfShards uint32, + timestampMs uint64, ) []*indexerData.ScResult { allSCRs := make([]*indexerData.ScResult, 0, len(scrs)) @@ -55,14 +54,14 @@ func (proc *smartContractResultsProcessor) processSCRs( continue } - indexerSCRs := proc.processSCRsFromMiniblock(header, mb, workingSCRSMap, numOfShards) + indexerSCRs := proc.processSCRsFromMiniblock(header, mb, workingSCRSMap, numOfShards, timestampMs) allSCRs = append(allSCRs, indexerSCRs...) } selfShardID := header.GetShardID() for scrHashHex, noMBScrInfo := range workingSCRSMap { - indexerScr := proc.prepareSmartContractResult(scrHashHex, nil, noMBScrInfo, header, selfShardID, selfShardID, numOfShards) + indexerScr := proc.prepareSmartContractResult(scrHashHex, nil, noMBScrInfo, header, selfShardID, selfShardID, numOfShards, timestampMs) allSCRs = append(allSCRs, indexerScr) } @@ -75,6 +74,7 @@ func (proc *smartContractResultsProcessor) processSCRsFromMiniblock( mb *block.MiniBlock, scrs map[string]*outport.SCRInfo, numOfShards uint32, + timestampMs uint64, ) []*indexerData.ScResult { mbHash, err := core.CalculateHash(proc.marshalizer, proc.hasher, mb) if err != nil { @@ -93,7 +93,7 @@ func (proc *smartContractResultsProcessor) processSCRsFromMiniblock( continue } - indexerSCR := proc.prepareSmartContractResult(hex.EncodeToString(scrHash), mbHash, scrInfo, header, mb.SenderShardID, mb.ReceiverShardID, numOfShards) + indexerSCR := proc.prepareSmartContractResult(hex.EncodeToString(scrHash), mbHash, scrInfo, header, mb.SenderShardID, mb.ReceiverShardID, numOfShards, timestampMs) indexerSCRs = append(indexerSCRs, indexerSCR) delete(scrs, scrHashHex) @@ -110,6 +110,7 @@ func (proc *smartContractResultsProcessor) prepareSmartContractResult( senderShard uint32, receiverShard uint32, numOfShards uint32, + timestampMs uint64, ) *indexerData.ScResult { scr := scrInfo.SmartContractResult hexEncodedMBHash := "" @@ -174,7 +175,7 @@ func (proc *smartContractResultsProcessor) prepareSmartContractResult( CallType: strconv.Itoa(int(scr.CallType)), CodeMetadata: scr.CodeMetadata, ReturnMessage: string(scr.ReturnMessage), - Timestamp: time.Duration(header.GetTimeStamp()), + Timestamp: header.GetTimeStamp(), SenderAddressBytes: scr.SndAddr, SenderShard: senderShard, ReceiverShard: receiverShard, @@ -193,6 +194,7 @@ func (proc *smartContractResultsProcessor) prepareSmartContractResult( ExecutionOrder: int(scrInfo.ExecutionOrder), UUID: converters.GenerateBase64UUID(), Epoch: header.GetEpoch(), + TimestampMs: timestampMs, } } diff --git a/process/elasticproc/transactions/smartContractResultsProcessor_test.go b/process/elasticproc/transactions/smartContractResultsProcessor_test.go index ac35dfd8..940669f6 100644 --- a/process/elasticproc/transactions/smartContractResultsProcessor_test.go +++ b/process/elasticproc/transactions/smartContractResultsProcessor_test.go @@ -2,10 +2,6 @@ package transactions import ( "encoding/hex" - "math/big" - "testing" - "time" - "github.com/multiversx/mx-chain-core-go/data/block" "github.com/multiversx/mx-chain-core-go/data/outport" "github.com/multiversx/mx-chain-core-go/data/smartContractResult" @@ -14,6 +10,8 @@ import ( "github.com/multiversx/mx-chain-es-indexer-go/process/elasticproc/converters" datafield "github.com/multiversx/mx-chain-vm-common-go/parsers/dataField" "github.com/stretchr/testify/require" + "math/big" + "testing" ) func createDataFieldParserMock() DataFieldParser { @@ -60,7 +58,7 @@ func TestPrepareSmartContractResult(t *testing.T) { header := &block.Header{TimeStamp: 100} mbHash := []byte("hash") - scRes := scrsProc.prepareSmartContractResult(scHash, mbHash, scrInfo, header, 0, 1, 3) + scRes := scrsProc.prepareSmartContractResult(scHash, mbHash, scrInfo, header, 0, 1, 3, 100000) scRes.UUID = "" senderAddr, err := pubKeyConverter.Encode(sndAddr) @@ -79,7 +77,8 @@ func TestPrepareSmartContractResult(t *testing.T) { Receiver: receiverAddr, Value: "", CallType: "1", - Timestamp: time.Duration(100), + Timestamp: uint64(100), + TimestampMs: uint64(100000), SenderShard: 0, ReceiverShard: 1, Operation: "transfer", diff --git a/process/elasticproc/transactions/transactionDBBuilder.go b/process/elasticproc/transactions/transactionDBBuilder.go index 3bb75015..ebba6838 100644 --- a/process/elasticproc/transactions/transactionDBBuilder.go +++ b/process/elasticproc/transactions/transactionDBBuilder.go @@ -3,8 +3,6 @@ package transactions import ( "encoding/hex" "fmt" - "time" - "github.com/multiversx/mx-chain-core-go/core" "github.com/multiversx/mx-chain-core-go/core/sharding" coreData "github.com/multiversx/mx-chain-core-go/data" @@ -42,6 +40,7 @@ func (dtb *dbTransactionBuilder) prepareTransaction( header coreData.HeaderHandler, txStatus string, numOfShards uint32, + timestampMs uint64, ) *data.Transaction { tx := txInfo.Transaction @@ -106,7 +105,7 @@ func (dtb *dbTransactionBuilder) prepareTransaction( GasLimit: tx.GasLimit, Data: tx.Data, Signature: hex.EncodeToString(tx.Signature), - Timestamp: time.Duration(header.GetTimeStamp()), + Timestamp: header.GetTimeStamp(), Status: txStatus, GasUsed: feeInfo.GasUsed, InitialPaidFee: feeInfo.InitialPaidFee.String(), @@ -128,6 +127,7 @@ func (dtb *dbTransactionBuilder) prepareTransaction( HadRefund: feeInfo.HadRefund, UUID: converters.GenerateBase64UUID(), Epoch: header.GetEpoch(), + TimestampMs: timestampMs, } hasValidRelayer := len(eTx.RelayedAddr) == len(eTx.Sender) && len(eTx.RelayedAddr) > 0 @@ -149,6 +149,7 @@ func (dtb *dbTransactionBuilder) prepareRewardTransaction( mb *block.MiniBlock, header coreData.HeaderHandler, txStatus string, + timestampMs uint64, ) *data.Transaction { rTx := rTxInfo.Reward valueNum, err := dtb.balanceConverter.ConvertBigValueToFloat(rTx.Value) @@ -174,12 +175,13 @@ func (dtb *dbTransactionBuilder) prepareRewardTransaction( GasLimit: 0, Data: make([]byte, 0), Signature: "", - Timestamp: time.Duration(header.GetTimeStamp()), + Timestamp: header.GetTimeStamp(), Status: txStatus, Operation: rewardsOperation, ExecutionOrder: int(rTxInfo.ExecutionOrder), UUID: converters.GenerateBase64UUID(), Epoch: header.GetEpoch(), + TimestampMs: timestampMs, } } @@ -187,15 +189,17 @@ func (dtb *dbTransactionBuilder) prepareReceipt( recHashHex string, rec *receipt.Receipt, header coreData.HeaderHandler, + timestampMs uint64, ) *data.Receipt { senderAddr := dtb.addressPubkeyConverter.SilentEncode(rec.SndAddr, log) return &data.Receipt{ - Hash: recHashHex, - Value: rec.Value.String(), - Sender: senderAddr, - Data: string(rec.Data), - TxHash: hex.EncodeToString(rec.TxHash), - Timestamp: time.Duration(header.GetTimeStamp()), + Hash: recHashHex, + Value: rec.Value.String(), + Sender: senderAddr, + Data: string(rec.Data), + TxHash: hex.EncodeToString(rec.TxHash), + Timestamp: header.GetTimeStamp(), + TimestampMs: timestampMs, } } diff --git a/process/elasticproc/transactions/transactionDBBuilder_test.go b/process/elasticproc/transactions/transactionDBBuilder_test.go index ce67ece1..74be210a 100644 --- a/process/elasticproc/transactions/transactionDBBuilder_test.go +++ b/process/elasticproc/transactions/transactionDBBuilder_test.go @@ -3,10 +3,6 @@ package transactions import ( "encoding/hex" "fmt" - "math/big" - "testing" - "time" - "github.com/multiversx/mx-chain-core-go/core" "github.com/multiversx/mx-chain-core-go/data/block" "github.com/multiversx/mx-chain-core-go/data/outport" @@ -16,6 +12,8 @@ import ( "github.com/multiversx/mx-chain-es-indexer-go/mock" "github.com/multiversx/mx-chain-es-indexer-go/process/elasticproc/converters" "github.com/stretchr/testify/require" + "math/big" + "testing" ) func createCommonProcessor() dbTransactionBuilder { @@ -33,7 +31,7 @@ func TestGetMoveBalanceTransaction(t *testing.T) { txHash := []byte("txHash") mbHash := []byte("mbHash") mb := &block.MiniBlock{TxHashes: [][]byte{txHash}} - header := &block.Header{Nonce: 2} + header := &block.Header{Nonce: 2, TimeStamp: 1234} status := "Success" gasPrice := uint64(1000) gasLimit := uint64(1000) @@ -86,7 +84,6 @@ func TestGetMoveBalanceTransaction(t *testing.T) { InitialPaidFee: "100", Data: tx.Data, Signature: hex.EncodeToString(tx.Signature), - Timestamp: time.Duration(header.GetTimeStamp()), Status: status, Fee: "100", FeeNum: 1e-16, @@ -96,9 +93,11 @@ func TestGetMoveBalanceTransaction(t *testing.T) { Operation: "transfer", Version: 1, Receivers: []string{}, + Timestamp: 1234, + TimestampMs: 1234000, } - dbTx := cp.prepareTransaction(txInfo, txHash, mbHash, mb, header, status, 3) + dbTx := cp.prepareTransaction(txInfo, txHash, mbHash, mb, header, status, 3, 1234000) dbTx.UUID = "" require.Equal(t, expectedTx, dbTx) } @@ -114,24 +113,26 @@ func TestGetTransactionByType_RewardTx(t *testing.T) { txHash := []byte("txHash") mbHash := []byte("mbHash") mb := &block.MiniBlock{TxHashes: [][]byte{txHash}} - header := &block.Header{Nonce: 2} + header := &block.Header{Nonce: 2, TimeStamp: 1234} status := "Success" rewardInfo := &outport.RewardInfo{ Reward: rwdTx, } - resultTx := cp.prepareRewardTransaction(rewardInfo, txHash, mbHash, mb, header, status) + resultTx := cp.prepareRewardTransaction(rewardInfo, txHash, mbHash, mb, header, status, 1234000) resultTx.UUID = "" expectedTx := &data.Transaction{ - Hash: hex.EncodeToString(txHash), - MBHash: hex.EncodeToString(mbHash), - Round: round, - Receiver: hex.EncodeToString(rcvAddr), - Status: status, - Value: "", - Sender: fmt.Sprintf("%d", core.MetachainShardId), - Data: make([]byte, 0), - Operation: rewardsOperation, + Hash: hex.EncodeToString(txHash), + MBHash: hex.EncodeToString(mbHash), + Round: round, + Receiver: hex.EncodeToString(rcvAddr), + Status: status, + Value: "", + Sender: fmt.Sprintf("%d", core.MetachainShardId), + Data: make([]byte, 0), + Operation: rewardsOperation, + Timestamp: 1234, + TimestampMs: 1234000, } require.Equal(t, expectedTx, resultTx) @@ -143,7 +144,7 @@ func TestRelayedV3Transaction(t *testing.T) { txHash := []byte("txHash") mbHash := []byte("mbHash") mb := &block.MiniBlock{TxHashes: [][]byte{txHash}, Type: block.InvalidBlock} - header := &block.Header{Nonce: 2} + header := &block.Header{Nonce: 2, TimeStamp: 1234} status := transaction.TxStatusInvalid.String() gasPrice := uint64(1000) gasLimit := uint64(1000) @@ -183,7 +184,6 @@ func TestRelayedV3Transaction(t *testing.T) { InitialPaidFee: "100", Data: tx.Data, Signature: hex.EncodeToString(tx.Signature), - Timestamp: time.Duration(header.GetTimeStamp()), Status: status, Fee: "100", FeeNum: 1e-16, @@ -195,6 +195,8 @@ func TestRelayedV3Transaction(t *testing.T) { ESDTValuesNum: []float64{}, RelayedAddr: hex.EncodeToString(tx.RelayerAddr), RelayedSignature: hex.EncodeToString(tx.RelayerSignature), + Timestamp: 1234, + TimestampMs: 1234000, } txInfo := &outport.TxInfo{ @@ -207,7 +209,7 @@ func TestRelayedV3Transaction(t *testing.T) { ExecutionOrder: 0, } - dbTx := cp.prepareTransaction(txInfo, txHash, mbHash, mb, header, status, 3) + dbTx := cp.prepareTransaction(txInfo, txHash, mbHash, mb, header, status, 3, 1234000) dbTx.UUID = "" require.Equal(t, expectedTx, dbTx) } @@ -218,7 +220,7 @@ func TestGetMoveBalanceTransactionInvalid(t *testing.T) { txHash := []byte("txHash") mbHash := []byte("mbHash") mb := &block.MiniBlock{TxHashes: [][]byte{txHash}, Type: block.InvalidBlock} - header := &block.Header{Nonce: 2} + header := &block.Header{Nonce: 2, TimeStamp: 1234} status := transaction.TxStatusInvalid.String() gasPrice := uint64(1000) gasLimit := uint64(1000) @@ -256,7 +258,6 @@ func TestGetMoveBalanceTransactionInvalid(t *testing.T) { InitialPaidFee: "100", Data: tx.Data, Signature: hex.EncodeToString(tx.Signature), - Timestamp: time.Duration(header.GetTimeStamp()), Status: status, Fee: "100", FeeNum: 1e-16, @@ -266,6 +267,8 @@ func TestGetMoveBalanceTransactionInvalid(t *testing.T) { Version: 1, Receivers: []string{}, ESDTValuesNum: []float64{}, + Timestamp: 1234, + TimestampMs: 1234000, } txInfo := &outport.TxInfo{ @@ -278,7 +281,7 @@ func TestGetMoveBalanceTransactionInvalid(t *testing.T) { ExecutionOrder: 0, } - dbTx := cp.prepareTransaction(txInfo, txHash, mbHash, mb, header, status, 3) + dbTx := cp.prepareTransaction(txInfo, txHash, mbHash, mb, header, status, 3, 1234000) dbTx.UUID = "" require.Equal(t, expectedTx, dbTx) } diff --git a/process/elasticproc/transactions/transactionsGrouper.go b/process/elasticproc/transactions/transactionsGrouper.go index 5aaf15a4..1c7e237a 100644 --- a/process/elasticproc/transactions/transactionsGrouper.go +++ b/process/elasticproc/transactions/transactionsGrouper.go @@ -43,6 +43,7 @@ func (tg *txsGrouper) groupNormalTxs( txs map[string]*outport.TxInfo, isImportDB bool, numOfShards uint32, + timestampMs uint64, ) (map[string]*data.Transaction, error) { transactions := make(map[string]*data.Transaction) @@ -55,7 +56,7 @@ func (tg *txsGrouper) groupNormalTxs( executedTxHashes := extractExecutedTxHashes(mbIndex, mb.TxHashes, header) mbStatus := computeStatus(selfShardID, mb.ReceiverShardID) for _, txHash := range executedTxHashes { - dbTx, ok := tg.prepareNormalTxForDB(mbHash, mb, mbStatus, txHash, txs, header, numOfShards) + dbTx, ok := tg.prepareNormalTxForDB(mbHash, mb, mbStatus, txHash, txs, header, numOfShards, timestampMs) if !ok { continue } @@ -97,13 +98,14 @@ func (tg *txsGrouper) prepareNormalTxForDB( txs map[string]*outport.TxInfo, header coreData.HeaderHandler, numOfShards uint32, + timestampMs uint64, ) (*data.Transaction, bool) { txInfo, okGet := txs[hex.EncodeToString(txHash)] if !okGet { return nil, false } - dbTx := tg.txBuilder.prepareTransaction(txInfo, txHash, mbHash, mb, header, mbStatus, numOfShards) + dbTx := tg.txBuilder.prepareTransaction(txInfo, txHash, mbHash, mb, header, mbStatus, numOfShards, timestampMs) return dbTx, true } @@ -114,6 +116,7 @@ func (tg *txsGrouper) groupRewardsTxs( header coreData.HeaderHandler, txs map[string]*outport.RewardInfo, isImportDB bool, + timestampMs uint64, ) (map[string]*data.Transaction, error) { rewardsTxs := make(map[string]*data.Transaction) mbHash, err := core.CalculateHash(tg.marshalizer, tg.hasher, mb) @@ -125,7 +128,7 @@ func (tg *txsGrouper) groupRewardsTxs( mbStatus := computeStatus(selfShardID, mb.ReceiverShardID) executedTxHashes := extractExecutedTxHashes(mbIndex, mb.TxHashes, header) for _, txHash := range executedTxHashes { - rewardDBTx, ok := tg.prepareRewardTxForDB(mbHash, mb, mbStatus, txHash, txs, header) + rewardDBTx, ok := tg.prepareRewardTxForDB(mbHash, mb, mbStatus, txHash, txs, header, timestampMs) if !ok { continue } @@ -145,13 +148,14 @@ func (tg *txsGrouper) prepareRewardTxForDB( txHash []byte, txs map[string]*outport.RewardInfo, header coreData.HeaderHandler, + timestampMs uint64, ) (*data.Transaction, bool) { rtx, okGet := txs[hex.EncodeToString(txHash)] if !okGet { return nil, false } - dbTx := tg.txBuilder.prepareRewardTransaction(rtx, txHash, mbHash, mb, header, mbStatus) + dbTx := tg.txBuilder.prepareRewardTransaction(rtx, txHash, mbHash, mb, header, mbStatus, timestampMs) return dbTx, true } @@ -162,6 +166,7 @@ func (tg *txsGrouper) groupInvalidTxs( header coreData.HeaderHandler, txs map[string]*outport.TxInfo, numOfShards uint32, + timestampMs uint64, ) (map[string]*data.Transaction, error) { transactions := make(map[string]*data.Transaction) mbHash, err := core.CalculateHash(tg.marshalizer, tg.hasher, mb) @@ -171,7 +176,7 @@ func (tg *txsGrouper) groupInvalidTxs( executedTxHashes := extractExecutedTxHashes(mbIndex, mb.TxHashes, header) for _, txHash := range executedTxHashes { - invalidDBTx, ok := tg.prepareInvalidTxForDB(mbHash, mb, txHash, txs, header, numOfShards) + invalidDBTx, ok := tg.prepareInvalidTxForDB(mbHash, mb, txHash, txs, header, numOfShards, timestampMs) if !ok { continue } @@ -189,13 +194,14 @@ func (tg *txsGrouper) prepareInvalidTxForDB( txs map[string]*outport.TxInfo, header coreData.HeaderHandler, numOfShards uint32, + timestampMs uint64, ) (*data.Transaction, bool) { txInfo, okGet := txs[hex.EncodeToString(txHash)] if !okGet { return nil, false } - dbTx := tg.txBuilder.prepareTransaction(txInfo, txHash, mbHash, mb, header, transaction.TxStatusInvalid.String(), numOfShards) + dbTx := tg.txBuilder.prepareTransaction(txInfo, txHash, mbHash, mb, header, transaction.TxStatusInvalid.String(), numOfShards, timestampMs) return dbTx, true } @@ -208,10 +214,10 @@ func (tg *txsGrouper) shouldIndex(destinationShardID uint32, isImportDB bool, se return selfShardID == destinationShardID } -func (tg *txsGrouper) groupReceipts(header coreData.HeaderHandler, txsPool map[string]*receipt.Receipt) []*data.Receipt { +func (tg *txsGrouper) groupReceipts(header coreData.HeaderHandler, txsPool map[string]*receipt.Receipt, timestampMs uint64) []*data.Receipt { dbReceipts := make([]*data.Receipt, 0) for hashHex, rec := range txsPool { - dbReceipts = append(dbReceipts, tg.txBuilder.prepareReceipt(hashHex, rec, header)) + dbReceipts = append(dbReceipts, tg.txBuilder.prepareReceipt(hashHex, rec, header, timestampMs)) } return dbReceipts diff --git a/process/elasticproc/transactions/transactionsGrouper_test.go b/process/elasticproc/transactions/transactionsGrouper_test.go index 12c6b75e..da468802 100644 --- a/process/elasticproc/transactions/transactionsGrouper_test.go +++ b/process/elasticproc/transactions/transactionsGrouper_test.go @@ -2,8 +2,6 @@ package transactions import ( "encoding/hex" - "testing" - "github.com/multiversx/mx-chain-core-go/data/block" "github.com/multiversx/mx-chain-core-go/data/outport" "github.com/multiversx/mx-chain-core-go/data/receipt" @@ -12,6 +10,7 @@ import ( "github.com/multiversx/mx-chain-es-indexer-go/mock" "github.com/multiversx/mx-chain-es-indexer-go/process/elasticproc/converters" "github.com/stretchr/testify/require" + "testing" ) func TestGroupNormalTxs(t *testing.T) { @@ -28,7 +27,7 @@ func TestGroupNormalTxs(t *testing.T) { TxHashes: [][]byte{txHash1, txHash2}, Type: block.TxBlock, } - header := &block.Header{} + header := &block.Header{TimeStamp: 1234} txs := map[string]*outport.TxInfo{ hex.EncodeToString(txHash1): { Transaction: &transaction.Transaction{ @@ -46,8 +45,10 @@ func TestGroupNormalTxs(t *testing.T) { }, } - normalTxs, _ := grouper.groupNormalTxs(0, mb, header, txs, false, 3) + normalTxs, _ := grouper.groupNormalTxs(0, mb, header, txs, false, 3, 1234000) require.Len(t, normalTxs, 2) + require.Equal(t, uint64(1234), normalTxs[string(txHash1)].Timestamp) + require.Equal(t, uint64(1234000), normalTxs[string(txHash1)].TimestampMs) } func TestGroupRewardsTxs(t *testing.T) { @@ -64,7 +65,7 @@ func TestGroupRewardsTxs(t *testing.T) { TxHashes: [][]byte{txHash1, txHash2}, Type: block.RewardsBlock, } - header := &block.Header{} + header := &block.Header{TimeStamp: 1234} txs := map[string]*outport.RewardInfo{ hex.EncodeToString(txHash1): {Reward: &rewardTx.RewardTx{ RcvAddr: []byte("receiver1"), @@ -74,8 +75,10 @@ func TestGroupRewardsTxs(t *testing.T) { }}, } - normalTxs, _ := grouper.groupRewardsTxs(0, mb, header, txs, false) + normalTxs, _ := grouper.groupRewardsTxs(0, mb, header, txs, false, 1234000) require.Len(t, normalTxs, 2) + require.Equal(t, uint64(1234), normalTxs[string(txHash1)].Timestamp) + require.Equal(t, uint64(1234000), normalTxs[string(txHash1)].TimestampMs) } func TestGroupInvalidTxs(t *testing.T) { @@ -92,7 +95,7 @@ func TestGroupInvalidTxs(t *testing.T) { TxHashes: [][]byte{txHash1, txHash2}, Type: block.InvalidBlock, } - header := &block.Header{} + header := &block.Header{TimeStamp: 1234} txs := map[string]*outport.TxInfo{ hex.EncodeToString(txHash1): { Transaction: &transaction.Transaction{ @@ -106,8 +109,10 @@ func TestGroupInvalidTxs(t *testing.T) { }, FeeInfo: &outport.FeeInfo{}}, } - normalTxs, _ := grouper.groupInvalidTxs(0, mb, header, txs, 3) + normalTxs, _ := grouper.groupInvalidTxs(0, mb, header, txs, 3, 1234000) require.Len(t, normalTxs, 2) + require.Equal(t, uint64(1234), normalTxs[string(txHash1)].Timestamp) + require.Equal(t, uint64(1234000), normalTxs[string(txHash1)].TimestampMs) } func TestGroupReceipts(t *testing.T) { @@ -120,7 +125,7 @@ func TestGroupReceipts(t *testing.T) { txHash1 := []byte("txHash1") txHash2 := []byte("txHash2") - header := &block.Header{} + header := &block.Header{TimeStamp: 1234} txs := map[string]*receipt.Receipt{ hex.EncodeToString(txHash1): { SndAddr: []byte("sender1"), @@ -130,6 +135,8 @@ func TestGroupReceipts(t *testing.T) { }, } - receipts := grouper.groupReceipts(header, txs) + receipts := grouper.groupReceipts(header, txs, 1234000) require.Len(t, receipts, 2) + require.Equal(t, uint64(1234), receipts[0].Timestamp) + require.Equal(t, uint64(1234000), receipts[0].TimestampMs) } diff --git a/process/elasticproc/transactions/transactionsProcessor.go b/process/elasticproc/transactions/transactionsProcessor.go index b85c9b71..93aef8e9 100644 --- a/process/elasticproc/transactions/transactionsProcessor.go +++ b/process/elasticproc/transactions/transactionsProcessor.go @@ -71,6 +71,7 @@ func (tdp *txsDatabaseProcessor) PrepareTransactionsForDatabase( pool *outport.TransactionPool, isImportDB bool, numOfShards uint32, + timestampMs uint64, ) *data.PreparedResults { err := checkPrepareTransactionForDatabaseArguments(header, pool) if err != nil { @@ -93,21 +94,21 @@ func (tdp *txsDatabaseProcessor) PrepareTransactionsForDatabase( continue } - txs, errGroup := tdp.txsGrouper.groupNormalTxs(mbIndex, mb, header, pool.Transactions, isImportDB, numOfShards) + txs, errGroup := tdp.txsGrouper.groupNormalTxs(mbIndex, mb, header, pool.Transactions, isImportDB, numOfShards, timestampMs) if errGroup != nil { log.Warn("txsDatabaseProcessor.groupNormalTxs", "error", errGroup) continue } mergeTxsMaps(normalTxs, txs) case block.RewardsBlock: - txs, errGroup := tdp.txsGrouper.groupRewardsTxs(mbIndex, mb, header, pool.Rewards, isImportDB) + txs, errGroup := tdp.txsGrouper.groupRewardsTxs(mbIndex, mb, header, pool.Rewards, isImportDB, timestampMs) if errGroup != nil { log.Warn("txsDatabaseProcessor.groupRewardsTxs", "error", errGroup) continue } mergeTxsMaps(rewardsTxs, txs) case block.InvalidBlock: - txs, errGroup := tdp.txsGrouper.groupInvalidTxs(mbIndex, mb, header, pool.InvalidTxs, numOfShards) + txs, errGroup := tdp.txsGrouper.groupInvalidTxs(mbIndex, mb, header, pool.InvalidTxs, numOfShards, timestampMs) if errGroup != nil { log.Warn("txsDatabaseProcessor.groupInvalidTxs", "error", errGroup) continue @@ -119,8 +120,8 @@ func (tdp *txsDatabaseProcessor) PrepareTransactionsForDatabase( } normalTxs = tdp.setTransactionSearchOrder(normalTxs) - dbReceipts := tdp.txsGrouper.groupReceipts(header, pool.Receipts) - dbSCResults := tdp.scrsProc.processSCRs(miniBlocks, header, pool.SmartContractResults, numOfShards) + dbReceipts := tdp.txsGrouper.groupReceipts(header, pool.Receipts, timestampMs) + dbSCResults := tdp.scrsProc.processSCRs(miniBlocks, header, pool.SmartContractResults, numOfShards, timestampMs) srcsNoTxInCurrentShard := tdp.scrsDataToTxs.attachSCRsToTransactionsAndReturnSCRsWithoutTx(normalTxs, dbSCResults) tdp.scrsDataToTxs.processTransactionsAfterSCRsWereAttached(normalTxs) diff --git a/process/elasticproc/transactions/transactionsProcessor_test.go b/process/elasticproc/transactions/transactionsProcessor_test.go index 1348e427..230c2bd6 100644 --- a/process/elasticproc/transactions/transactionsProcessor_test.go +++ b/process/elasticproc/transactions/transactionsProcessor_test.go @@ -211,7 +211,7 @@ func TestPrepareTransactionsForDatabase(t *testing.T) { txDbProc, _ := NewTransactionsProcessor(createMockArgsTxsDBProc()) - results := txDbProc.PrepareTransactionsForDatabase(mbs, header, pool, false, 3) + results := txDbProc.PrepareTransactionsForDatabase(mbs, header, pool, false, 3, 1234000) assert.Equal(t, 7, len(results.Transactions)) } @@ -267,7 +267,7 @@ func TestRelayedTransactions(t *testing.T) { txDbProc, _ := NewTransactionsProcessor(createMockArgsTxsDBProc()) - results := txDbProc.PrepareTransactionsForDatabase(mbs, header, pool, false, 3) + results := txDbProc.PrepareTransactionsForDatabase(mbs, header, pool, false, 3, 1234000) assert.Equal(t, 1, len(results.Transactions)) assert.Equal(t, 2, len(results.Transactions[0].SmartContractResults)) assert.Equal(t, transaction.TxStatusSuccess.String(), results.Transactions[0].Status) @@ -375,7 +375,7 @@ func TestCheckGasUsedInvalidTransaction(t *testing.T) { }, } - results := txDbProc.PrepareTransactionsForDatabase(mbs, header, pool, false, 3) + results := txDbProc.PrepareTransactionsForDatabase(mbs, header, pool, false, 3, 1234000) require.Len(t, results.Transactions, 1) require.Equal(t, tx1.Transaction.GetGasLimit(), results.Transactions[0].GasUsed) } @@ -505,7 +505,7 @@ func TestTxsDatabaseProcessor_PrepareTransactionsForDatabaseInvalidTxWithSCR(t * }, } - results := txDbProc.PrepareTransactionsForDatabase(mbs, header, pool, false, 3) + results := txDbProc.PrepareTransactionsForDatabase(mbs, header, pool, false, 3, 1234000) require.NotNil(t, results) require.Len(t, results.Transactions, 1) require.Len(t, results.ScResults, 1) @@ -562,7 +562,7 @@ func TestTxsDatabaseProcessor_PrepareTransactionsForDatabaseESDTNFTTransfer(t *t }, } - results := txDbProc.PrepareTransactionsForDatabase(mbs, header, pool, false, 3) + results := txDbProc.PrepareTransactionsForDatabase(mbs, header, pool, false, 3, 1234000) require.NotNil(t, results) require.Len(t, results.Transactions, 1) require.Len(t, results.ScResults, 1) @@ -626,7 +626,7 @@ func TestTxsDatabaseProcessor_IssueESDTTx(t *testing.T) { }, } - res := txDbProc.PrepareTransactionsForDatabase(mbs, header, pool, false, 3) + res := txDbProc.PrepareTransactionsForDatabase(mbs, header, pool, false, 3, 1234000) require.Equal(t, "success", res.Transactions[0].Status) require.Equal(t, 2, len(res.ScResults)) @@ -649,7 +649,7 @@ func TestTxsDatabaseProcessor_IssueESDTTx(t *testing.T) { }, } - res = txDbProc.PrepareTransactionsForDatabase(mbs, header, pool, false, 3) + res = txDbProc.PrepareTransactionsForDatabase(mbs, header, pool, false, 3, 1234000) require.Equal(t, "success", res.Transactions[0].Status) require.Equal(t, 1, len(res.ScResults)) } diff --git a/templates/noKibana/accounts.go b/templates/indices/accounts.go similarity index 98% rename from templates/noKibana/accounts.go rename to templates/indices/accounts.go index ac8b64ea..18ab6be6 100644 --- a/templates/noKibana/accounts.go +++ b/templates/indices/accounts.go @@ -1,4 +1,4 @@ -package noKibana +package indices import ( "github.com/multiversx/mx-chain-es-indexer-go/templates" diff --git a/templates/noKibana/accountsESDT.go b/templates/indices/accountsESDT.go similarity index 97% rename from templates/noKibana/accountsESDT.go rename to templates/indices/accountsESDT.go index 6ccf1945..c06bc4f2 100644 --- a/templates/noKibana/accountsESDT.go +++ b/templates/indices/accountsESDT.go @@ -1,4 +1,4 @@ -package noKibana +package indices // AccountsESDT will hold the configuration for the accountsesdt index var AccountsESDT = Object{ @@ -74,7 +74,7 @@ var AccountsESDT = Object{ "format": "epoch_second", }, "token": Object{ - "type": "text", + "type": "keyword", }, "tokenNonce": Object{ "type": "double", diff --git a/templates/noKibana/accountsESDTHistory.go b/templates/indices/accountsESDTHistory.go similarity index 95% rename from templates/noKibana/accountsESDTHistory.go rename to templates/indices/accountsESDTHistory.go index 0fd102ea..ed3050f3 100644 --- a/templates/noKibana/accountsESDTHistory.go +++ b/templates/indices/accountsESDTHistory.go @@ -1,4 +1,4 @@ -package noKibana +package indices // AccountsESDTHistory will hold the configuration for the accountsesdthistory index var AccountsESDTHistory = Object{ @@ -35,7 +35,7 @@ var AccountsESDTHistory = Object{ "format": "epoch_second", }, "token": Object{ - "type": "text", + "type": "keyword", }, "tokenNonce": Object{ "type": "double", diff --git a/templates/noKibana/accountsHistory.go b/templates/indices/accountsHistory.go similarity index 97% rename from templates/noKibana/accountsHistory.go rename to templates/indices/accountsHistory.go index cf46b285..69d314ae 100644 --- a/templates/noKibana/accountsHistory.go +++ b/templates/indices/accountsHistory.go @@ -1,4 +1,4 @@ -package noKibana +package indices // AccountsHistory will hold the configuration for the accountshistory index var AccountsHistory = Object{ diff --git a/templates/noKibana/blocks.go b/templates/indices/blocks.go similarity index 99% rename from templates/noKibana/blocks.go rename to templates/indices/blocks.go index 00d2381d..816ec6a5 100644 --- a/templates/noKibana/blocks.go +++ b/templates/indices/blocks.go @@ -1,4 +1,4 @@ -package noKibana +package indices // Blocks will hold the configuration for the blocks index var Blocks = Object{ diff --git a/templates/noKibana/delegators.go b/templates/indices/delegators.go similarity index 98% rename from templates/noKibana/delegators.go rename to templates/indices/delegators.go index 91f33c94..c5bc031a 100644 --- a/templates/noKibana/delegators.go +++ b/templates/indices/delegators.go @@ -1,4 +1,4 @@ -package noKibana +package indices // Delegators will hold the configuration for the delegators index var Delegators = Object{ diff --git a/templates/noKibana/deploys.go b/templates/indices/deploys.go similarity index 96% rename from templates/noKibana/deploys.go rename to templates/indices/deploys.go index 18f04afd..057d48e6 100644 --- a/templates/noKibana/deploys.go +++ b/templates/indices/deploys.go @@ -1,4 +1,4 @@ -package noKibana +package indices // SCDeploys will hold the configuration for the scdeploys index var SCDeploys = Object{ @@ -47,7 +47,6 @@ var SCDeploys = Object{ }, }, "owners": Object{ - "type": "nested", "properties": Object{ "timestamp": Object{ "type": "date", diff --git a/templates/noKibana/epochInfo.go b/templates/indices/epochInfo.go similarity index 96% rename from templates/noKibana/epochInfo.go rename to templates/indices/epochInfo.go index 337941f1..849b8630 100644 --- a/templates/noKibana/epochInfo.go +++ b/templates/indices/epochInfo.go @@ -1,4 +1,4 @@ -package noKibana +package indices // EpochInfo will hold the configuration for the epochinfo index var EpochInfo = Object{ diff --git a/templates/noKibana/esdts.go b/templates/indices/esdts.go similarity index 99% rename from templates/noKibana/esdts.go rename to templates/indices/esdts.go index 9ea5588b..aa15da35 100644 --- a/templates/noKibana/esdts.go +++ b/templates/indices/esdts.go @@ -1,4 +1,4 @@ -package noKibana +package indices // ESDTs will hold the configuration for the esdts index var ESDTs = Object{ diff --git a/templates/noKibana/events.go b/templates/indices/events.go similarity index 98% rename from templates/noKibana/events.go rename to templates/indices/events.go index cdf3613a..332971cb 100644 --- a/templates/noKibana/events.go +++ b/templates/indices/events.go @@ -1,4 +1,4 @@ -package noKibana +package indices // Events will hold the configuration for the events index var Events = Object{ diff --git a/templates/noKibana/logs.go b/templates/indices/logs.go similarity index 97% rename from templates/noKibana/logs.go rename to templates/indices/logs.go index 21cd297d..a3451253 100644 --- a/templates/noKibana/logs.go +++ b/templates/indices/logs.go @@ -1,4 +1,4 @@ -package noKibana +package indices // Logs will hold the configuration for the logs index var Logs = Object{ diff --git a/templates/noKibana/miniblocks.go b/templates/indices/miniblocks.go similarity index 98% rename from templates/noKibana/miniblocks.go rename to templates/indices/miniblocks.go index 30ef3360..a0952ac8 100644 --- a/templates/noKibana/miniblocks.go +++ b/templates/indices/miniblocks.go @@ -1,4 +1,4 @@ -package noKibana +package indices // Miniblocks will hold the configuration for the miniblocks index var Miniblocks = Object{ diff --git a/templates/noKibana/opendistro.go b/templates/indices/opendistro.go similarity index 93% rename from templates/noKibana/opendistro.go rename to templates/indices/opendistro.go index 66a0bca8..a09095a0 100644 --- a/templates/noKibana/opendistro.go +++ b/templates/indices/opendistro.go @@ -1,4 +1,4 @@ -package noKibana +package indices // OpenDistro will hold the configuration for the opendistro var OpenDistro = Object{ diff --git a/templates/noKibana/operations.go b/templates/indices/operations.go similarity index 99% rename from templates/noKibana/operations.go rename to templates/indices/operations.go index d9598f58..c161a589 100644 --- a/templates/noKibana/operations.go +++ b/templates/indices/operations.go @@ -1,4 +1,4 @@ -package noKibana +package indices // Operations will hold the configuration for the operations index var Operations = Object{ diff --git a/templates/noKibana/rating.go b/templates/indices/rating.go similarity index 95% rename from templates/noKibana/rating.go rename to templates/indices/rating.go index 53add6b8..49d80422 100644 --- a/templates/noKibana/rating.go +++ b/templates/indices/rating.go @@ -1,4 +1,4 @@ -package noKibana +package indices // Rating will hold the configuration for the rating index var Rating = Object{ diff --git a/templates/noKibana/receipts.go b/templates/indices/receipts.go similarity index 97% rename from templates/noKibana/receipts.go rename to templates/indices/receipts.go index b5869cd1..2eacdd71 100644 --- a/templates/noKibana/receipts.go +++ b/templates/indices/receipts.go @@ -1,4 +1,4 @@ -package noKibana +package indices // Receipts will hold the configuration for the receipts index var Receipts = Object{ diff --git a/templates/noKibana/rounds.go b/templates/indices/rounds.go similarity index 97% rename from templates/noKibana/rounds.go rename to templates/indices/rounds.go index 890b3077..043d8604 100644 --- a/templates/noKibana/rounds.go +++ b/templates/indices/rounds.go @@ -1,4 +1,4 @@ -package noKibana +package indices // Rounds will hold the configuration for the rounds index var Rounds = Object{ diff --git a/templates/noKibana/scResults.go b/templates/indices/scResults.go similarity index 99% rename from templates/noKibana/scResults.go rename to templates/indices/scResults.go index d8c02de1..710e7816 100644 --- a/templates/noKibana/scResults.go +++ b/templates/indices/scResults.go @@ -1,4 +1,4 @@ -package noKibana +package indices // SCResults will hold the configuration for the scresults index var SCResults = Object{ diff --git a/templates/noKibana/tags.go b/templates/indices/tags.go similarity index 95% rename from templates/noKibana/tags.go rename to templates/indices/tags.go index 45918b70..aa6b5643 100644 --- a/templates/noKibana/tags.go +++ b/templates/indices/tags.go @@ -1,4 +1,4 @@ -package noKibana +package indices // Tags will hold the configuration for the tags index var Tags = Object{ diff --git a/templates/indices/timestampMs.go b/templates/indices/timestampMs.go new file mode 100644 index 00000000..c3785340 --- /dev/null +++ b/templates/indices/timestampMs.go @@ -0,0 +1,81 @@ +package indices + +// TimestampMs holds the configuration for the timestampMs field +var TimestampMs = Object{ + "properties": Object{ + "timestampMs": Object{ + "type": "date", + "format": "epoch_millis", + }, + }, +} + +// TokensTimestampMs holds the configuration for the tokens index timestampMs fields +var TokensTimestampMs = Object{ + "properties": Object{ + "timestampMs": Object{ + "type": "date", + "format": "epoch_millis", + }, + "changedToDynamicTimestampMs": Object{ + "type": "date", + "format": "epoch_millis", + }, + "ownersHistory": Object{ + "type": "nested", + "properties": Object{ + "timestampMs": Object{ + "index": "false", + "type": "date", + "format": "epoch_millis", + }, + }, + }, + }, +} + +// DelegatorsTimestampMs holds the configuration for the delegators index timestampMs fields +var DelegatorsTimestampMs = Object{ + "properties": Object{ + "timestampMs": Object{ + "type": "date", + "format": "epoch_millis", + }, + "unDelegateInfo": Object{ + "properties": Object{ + "timestampMs": Object{ + "index": "false", + "type": "date", + "format": "epoch_millis", + }, + }, + }, + }, +} + +// DeploysTimestampMs holds the configuration for the scdeploys index timestampMs fields +var DeploysTimestampMs = Object{ + "properties": Object{ + "timestampMs": Object{ + "type": "date", + "format": "epoch_millis", + }, + "upgrades": Object{ + "type": "nested", + "properties": Object{ + "timestampMs": Object{ + "type": "date", + "format": "epoch_millis", + }, + }, + }, + "owners": Object{ + "properties": Object{ + "timestampMs": Object{ + "type": "date", + "format": "epoch_millis", + }, + }, + }, + }, +} diff --git a/templates/noKibana/tokens.go b/templates/indices/tokens.go similarity index 98% rename from templates/noKibana/tokens.go rename to templates/indices/tokens.go index a7de2dce..46b64f58 100644 --- a/templates/noKibana/tokens.go +++ b/templates/indices/tokens.go @@ -1,4 +1,4 @@ -package noKibana +package indices // Tokens will hold the configuration for the tokens index var Tokens = Object{ @@ -167,7 +167,7 @@ var Tokens = Object{ "format": "epoch_second", }, "token": Object{ - "type": "text", + "type": "keyword", }, "type": Object{ "type": "keyword", diff --git a/templates/noKibana/transactions.go b/templates/indices/transactions.go similarity index 99% rename from templates/noKibana/transactions.go rename to templates/indices/transactions.go index 4935807c..f03d76df 100644 --- a/templates/noKibana/transactions.go +++ b/templates/indices/transactions.go @@ -1,4 +1,4 @@ -package noKibana +package indices // Transactions will hold the configuration for the transactions index var Transactions = Object{ diff --git a/templates/noKibana/validators.go b/templates/indices/validators.go similarity index 95% rename from templates/noKibana/validators.go rename to templates/indices/validators.go index 88c09295..15dce9f2 100644 --- a/templates/noKibana/validators.go +++ b/templates/indices/validators.go @@ -1,4 +1,4 @@ -package noKibana +package indices // Validators will hold the configuration for the validators index var Validators = Object{ diff --git a/templates/noKibana/values.go b/templates/indices/values.go similarity index 95% rename from templates/noKibana/values.go rename to templates/indices/values.go index 707a3329..2f76457a 100644 --- a/templates/noKibana/values.go +++ b/templates/indices/values.go @@ -1,4 +1,4 @@ -package noKibana +package indices // Values will hold the configuration for the values index var Values = Object{ diff --git a/templates/withKibana/accounts.go b/templates/withKibana/accounts.go deleted file mode 100644 index b6a37c88..00000000 --- a/templates/withKibana/accounts.go +++ /dev/null @@ -1,61 +0,0 @@ -package withKibana - -import ( - "github.com/multiversx/mx-chain-es-indexer-go/templates" -) - -type Object = templates.Object -type Array = templates.Array - -// Accounts will hold the configuration for the accounts index -var Accounts = Object{ - "index_patterns": Array{ - "accounts-*", - }, - "settings": Object{ - "number_of_shards": 3, - "number_of_replicas": 0, - "opendistro.index_state_management.rollover_alias": "accounts", - }, - "mappings": Object{ - "properties": Object{ - "balanceNum": Object{ - "type": "double", - }, - "totalBalanceWithStakeNum": Object{ - "type": "double", - }, - "nonce": Object{ - "type": "double", - }, - "address": Object{ - "type": "keyword", - }, - "balance": Object{ - "type": "keyword", - }, - "totalBalanceWithStake": Object{ - "type": "keyword", - }, - "shardID": Object{ - "type": "long", - }, - "timestamp": Object{ - "type": "date", - "format": "epoch_second", - }, - "userName": Object{ - "type": "keyword", - }, - "owner": Object{ - "type": "keyword", - }, - "developerRewards": Object{ - "type": "keyword", - }, - "developerRewardsNum": Object{ - "type": "double", - }, - }, - }, -} diff --git a/templates/withKibana/accountsESDT.go b/templates/withKibana/accountsESDT.go deleted file mode 100644 index 2d0f9152..00000000 --- a/templates/withKibana/accountsESDT.go +++ /dev/null @@ -1,86 +0,0 @@ -package withKibana - -// AccountsESDT will hold the configuration for the accountsesdt index -var AccountsESDT = Object{ - "index_patterns": Array{ - "accountsesdt-*", - }, - "settings": Object{ - "number_of_shards": 3, - "number_of_replicas": 0, - }, - "mappings": Object{ - "properties": Object{ - "address": Object{ - "type": "keyword", - }, - "balance": Object{ - "type": "keyword", - }, - "balanceNum": Object{ - "type": "double", - }, - "currentOwner": Object{ - "type": "keyword", - }, - "data": Object{ - "type": "nested", - "properties": Object{ - "attributes": Object{ - "index": "false", - "type": "keyword", - }, - "creator": Object{ - "type": "keyword", - }, - "hash": Object{ - "index": "false", - "type": "keyword", - }, - "metadata": Object{ - "index": "false", - "type": "keyword", - }, - "name": Object{ - "type": "keyword", - }, - "nonEmptyURIs": Object{ - "type": "boolean", - }, - "royalties": Object{ - "index": "false", - "type": "long", - }, - "tags": Object{ - "type": "text", - }, - "uris": Object{ - "type": "text", - }, - }, - }, - "identifier": Object{ - "type": "text", - }, - "properties": Object{ - "type": "keyword", - }, - "shardID": Object{ - "type": "long", - }, - "timestamp": Object{ - "type": "date", - "format": "epoch_second", - }, - "token": Object{ - "type": "text", - }, - "tokenNonce": Object{ - "type": "double", - }, - "type": Object{ - "type": "keyword", - }, - }, - }, -} diff --git a/templates/withKibana/accountsESDTHistory.go b/templates/withKibana/accountsESDTHistory.go deleted file mode 100644 index a9b14832..00000000 --- a/templates/withKibana/accountsESDTHistory.go +++ /dev/null @@ -1,45 +0,0 @@ -package withKibana - -// AccountsESDTHistory will hold the configuration for the accountsesdthistory index -var AccountsESDTHistory = Object{ - "index_patterns": Array{ - "accountsesdthistory-*", - }, - "settings": Object{ - "number_of_shards": 5, - "number_of_replicas": 0, - "opendistro.index_state_management.rollover_alias": "accountsesdthistory", - }, - "mappings": Object{ - "properties": Object{ - "address": Object{ - "type": "keyword", - }, - "balance": Object{ - "type": "keyword", - }, - "identifier": Object{ - "type": "text", - }, - "isSender": Object{ - "type": "boolean", - }, - "isSmartContract": Object{ - "type": "boolean", - }, - "shardID": Object{ - "type": "long", - }, - "timestamp": Object{ - "type": "date", - "format": "epoch_second", - }, - "token": Object{ - "type": "text", - }, - "tokenNonce": Object{ - "type": "double", - }, - }, - }, -} diff --git a/templates/withKibana/accountsESDTHistoryPolicy.go b/templates/withKibana/accountsESDTHistoryPolicy.go deleted file mode 100644 index 7bc33203..00000000 --- a/templates/withKibana/accountsESDTHistoryPolicy.go +++ /dev/null @@ -1,44 +0,0 @@ -package withKibana - -// AccountsESDTHistoryPolicy will hold the configuration for the accountsesdthistory index policy -var AccountsESDTHistoryPolicy = Object{ - "policy": Object{ - "description": "Open distro policy for the accountsesdthistory elastic index.", - "default_state": "hot", - "states": Array{ - Object{ - "name": "hot", - "actions": Array{ - Object{ - "rollover": Object{ - "min_size": "85gb", - }, - }, - }, - "transitions": Array{ - Object{ - "state_name": "warm", - "conditions": Object{ - "min_size": "85gb", - }, - }, - }, - }, - Object{ - "name": "warm", - "actions": Array{ - Object{ - "replica_count": Object{ - "number_of_replicas": 1, - }, - }, - }, - "transitions": Array{}, - }, - }, - "ism_template": Object{ - "index_patterns": Array{"accountsesdthistory-*"}, - "priority": 100, - }, - }, -} diff --git a/templates/withKibana/accountsESDTPolicy.go b/templates/withKibana/accountsESDTPolicy.go deleted file mode 100644 index 7e9cc3c6..00000000 --- a/templates/withKibana/accountsESDTPolicy.go +++ /dev/null @@ -1,44 +0,0 @@ -package withKibana - -// AccountsESDTPolicy will hold the configuration for the accountsesdt index policy -var AccountsESDTPolicy = Object{ - "policy": Object{ - "description": "Open distro policy for the accountsesdt elastic index.", - "default_state": "hot", - "states": Array{ - Object{ - "name": "hot", - "actions": Array{ - Object{ - "rollover": Object{ - "min_size": "85gb", - }, - }, - }, - "transitions": Array{ - Object{ - "state_name": "warm", - "conditions": Object{ - "min_size": "85gb", - }, - }, - }, - }, - Object{ - "name": "warm", - "actions": Array{ - Object{ - "replica_count": Object{ - "number_of_replicas": 1, - }, - }, - }, - "transitions": Array{}, - }, - }, - "ism_template": Object{ - "index_patterns": Array{"accountsesdt-*"}, - "priority": 100, - }, - }, -} diff --git a/templates/withKibana/accountsHistory.go b/templates/withKibana/accountsHistory.go deleted file mode 100644 index a23baef8..00000000 --- a/templates/withKibana/accountsHistory.go +++ /dev/null @@ -1,36 +0,0 @@ -package withKibana - -// AccountsHistory will hold the configuration for the accountshistory index -var AccountsHistory = Object{ - "index_patterns": Array{ - "accountshistory-*", - }, - "settings": Object{ - "number_of_shards": 5, - "number_of_replicas": 0, - "opendistro.index_state_management.rollover_alias": "accountshistory", - }, - "mappings": Object{ - "properties": Object{ - "address": Object{ - "type": "keyword", - }, - "balance": Object{ - "type": "keyword", - }, - "isSender": Object{ - "type": "boolean", - }, - "isSmartContract": Object{ - "type": "boolean", - }, - "shardID": Object{ - "type": "long", - }, - "timestamp": Object{ - "type": "date", - "format": "epoch_second", - }, - }, - }, -} diff --git a/templates/withKibana/accountsHistoryPolicy.go b/templates/withKibana/accountsHistoryPolicy.go deleted file mode 100644 index 24ccd4ef..00000000 --- a/templates/withKibana/accountsHistoryPolicy.go +++ /dev/null @@ -1,44 +0,0 @@ -package withKibana - -// AccountsHistoryPolicy will hold the configuration for the accountshistory index policy -var AccountsHistoryPolicy = Object{ - "policy": Object{ - "description": "Open distro policy for the accountshistory elastic index.", - "default_state": "hot", - "states": Array{ - Object{ - "name": "hot", - "actions": Array{ - Object{ - "rollover": Object{ - "min_size": "85gb", - }, - }, - }, - "transitions": Array{ - Object{ - "state_name": "warm", - "conditions": Object{ - "min_size": "85gb", - }, - }, - }, - }, - Object{ - "name": "warm", - "actions": Array{ - Object{ - "replica_count": Object{ - "number_of_replicas": 1, - }, - }, - }, - "transitions": Array{}, - }, - }, - "ism_template": Object{ - "index_patterns": Array{"accountshistory-*"}, - "priority": 100, - }, - }, -} diff --git a/templates/withKibana/accountsPolicy.go b/templates/withKibana/accountsPolicy.go deleted file mode 100644 index d7222ccb..00000000 --- a/templates/withKibana/accountsPolicy.go +++ /dev/null @@ -1,44 +0,0 @@ -package withKibana - -// AccountsPolicy will hold the configuration for the accounts index policy -var AccountsPolicy = Object{ - "policy": Object{ - "description": "Open distro policy for the accounts elastic index.", - "default_state": "hot", - "states": Array{ - Object{ - "name": "hot", - "actions": Array{ - Object{ - "rollover": Object{ - "min_size": "85gb", - }, - }, - }, - "transitions": Array{ - Object{ - "state_name": "warm", - "conditions": Object{ - "min_size": "85gb", - }, - }, - }, - }, - Object{ - "name": "warm", - "actions": Array{ - Object{ - "replica_count": Object{ - "number_of_replicas": 1, - }, - }, - }, - "transitions": Array{}, - }, - }, - "ism_template": Object{ - "index_patterns": Array{"accounts-*"}, - "priority": 100, - }, - }, -} diff --git a/templates/withKibana/blocks.go b/templates/withKibana/blocks.go deleted file mode 100644 index e3cc043d..00000000 --- a/templates/withKibana/blocks.go +++ /dev/null @@ -1,251 +0,0 @@ -package withKibana - -// Blocks will hold the configuration for the blocks index -var Blocks = Object{ - "index_patterns": Array{ - "blocks-*", - }, - "settings": Object{ - "number_of_shards": 3, - "number_of_replicas": 0, - "opendistro.index_state_management.rollover_alias": "blocks", - "index": Object{ - "sort.field": Array{ - "timestamp", "nonce", - }, - "sort.order": Array{ - "desc", "desc", - }, - }, - }, - "mappings": Object{ - "properties": Object{ - "accumulatedFees": Object{ - "index": "false", - "type": "keyword", - }, - "developerFees": Object{ - "index": "false", - "type": "keyword", - }, - "epoch": Object{ - "type": "long", - }, - "epochStartBlock": Object{ - "type": "boolean", - }, - "epochStartInfo": Object{ - "properties": Object{ - "nodePrice": Object{ - "index": "false", - "type": "keyword", - }, - "prevEpochStartHash": Object{ - "index": "false", - "type": "keyword", - }, - "prevEpochStartRound": Object{ - "index": "false", - "type": "double", - }, - "rewardsForProtocolSustainability": Object{ - "index": "false", - "type": "keyword", - }, - "rewardsPerBlock": Object{ - "index": "false", - "type": "keyword", - }, - "totalNewlyMinted": Object{ - "index": "false", - "type": "keyword", - }, - "totalSupply": Object{ - "index": "false", - "type": "keyword", - }, - "totalToDistribute": Object{ - "index": "false", - "type": "keyword", - }, - }, - }, - "epochStartShardsData": Object{ - "properties": Object{ - "epoch": Object{ - "index": "false", - "type": "long", - }, - "firstPendingMetaBlock": Object{ - "index": "false", - "type": "keyword", - }, - "headerHash": Object{ - "index": "false", - "type": "keyword", - }, - "lastFinishedMetaBlock": Object{ - "index": "false", - "type": "keyword", - }, - "nonce": Object{ - "index": "false", - "type": "double", - }, - "pendingMiniBlockHeaders": Object{ - "properties": Object{ - "hash": Object{ - "index": "false", - "type": "keyword", - }, - "receiverShard": Object{ - "index": "false", - "type": "long", - }, - "senderShard": Object{ - "index": "false", - "type": "long", - }, - "timestamp": Object{ - "index": "false", - "type": "date", - "format": "epoch_second", - }, - "type": Object{ - "index": "false", - "type": "keyword", - }, - }, - }, - "rootHash": Object{ - "index": "false", - "type": "keyword", - }, - "round": Object{ - "index": "false", - "type": "double", - }, - "scheduledRootHash": Object{ - "index": "false", - "type": "keyword", - }, - "shardID": Object{ - "index": "false", - "type": "long", - }, - }, - }, - "gasPenalized": Object{ - "type": "double", - }, - "gasProvided": Object{ - "type": "double", - }, - "gasRefunded": Object{ - "type": "double", - }, - "maxGasLimit": Object{ - "type": "double", - }, - "miniBlocksDetails": Object{ - "properties": Object{ - "firstProcessedTx": Object{ - "index": "false", - "type": "long", - }, - "lastProcessedTx": Object{ - "index": "false", - "type": "long", - }, - "mbIndex": Object{ - "index": "false", - "type": "long", - }, - }, - }, - "miniBlocksHashes": Object{ - "type": "keyword", - }, - "nonce": Object{ - "type": "double", - }, - "notarizedBlocksHashes": Object{ - "type": "keyword", - }, - "notarizedTxsCount": Object{ - "index": "false", - "type": "long", - }, - "prevHash": Object{ - "type": "keyword", - }, - "proposer": Object{ - "type": "long", - }, - "pubKeyBitmap": Object{ - "index": "false", - "type": "keyword", - }, - "round": Object{ - "type": "double", - }, - "scheduledData": Object{ - "properties": Object{ - "accumulatedFees": Object{ - "index": "false", - "type": "keyword", - }, - "developerFees": Object{ - "index": "false", - "type": "keyword", - }, - "gasProvided": Object{ - "index": "false", - "type": "double", - }, - "gasRefunded": Object{ - "index": "false", - "type": "double", - }, - "penalized": Object{ - "index": "false", - "type": "double", - }, - "rootHash": Object{ - "index": "false", - "type": "keyword", - }, - }, - }, - "searchOrder": Object{ - "type": "long", - }, - "shardId": Object{ - "type": "long", - }, - "size": Object{ - "index": "false", - "type": "long", - }, - "sizeTxs": Object{ - "index": "false", - "type": "long", - }, - "stateRootHash": Object{ - "type": "keyword", - }, - "timestamp": Object{ - "type": "date", - "format": "epoch_second", - }, - "txCount": Object{ - "index": "false", - "type": "long", - }, - "validators": Object{ - "index": "false", - "type": "long", - }, - }, - }, -} diff --git a/templates/withKibana/blocksPolicy.go b/templates/withKibana/blocksPolicy.go deleted file mode 100644 index a9a59b10..00000000 --- a/templates/withKibana/blocksPolicy.go +++ /dev/null @@ -1,44 +0,0 @@ -package withKibana - -// BlocksPolicy will hold the configuration for the blocks index policy -var BlocksPolicy = Object{ - "policy": Object{ - "description": "Open distro policy for the blocks elastic index.", - "default_state": "hot", - "states": Array{ - Object{ - "name": "hot", - "actions": Array{ - Object{ - "rollover": Object{ - "min_size": "60gb", - }, - }, - }, - "transitions": Array{ - Object{ - "state_name": "warm", - "conditions": Object{ - "min_size": "60gb", - }, - }, - }, - }, - Object{ - "name": "warm", - "actions": Array{ - Object{ - "replica_count": Object{ - "number_of_replicas": 1, - }, - }, - }, - "transitions": Array{}, - }, - }, - "ism_template": Object{ - "index_patterns": Array{"blocks-*"}, - "priority": 100, - }, - }, -} diff --git a/templates/withKibana/delegators.go b/templates/withKibana/delegators.go deleted file mode 100644 index da97b3e8..00000000 --- a/templates/withKibana/delegators.go +++ /dev/null @@ -1,54 +0,0 @@ -package withKibana - -// Delegators will hold the configuration for the delegators index -var Delegators = Object{ - "index_patterns": Array{ - "delegators-*", - }, - "settings": Object{ - "number_of_shards": 3, - "number_of_replicas": 0, - }, - - "mappings": Object{ - "properties": Object{ - "activeStake": Object{ - "type": "keyword", - }, - "activeStakeNum": Object{ - "type": "double", - }, - "address": Object{ - "type": "keyword", - }, - "contract": Object{ - "type": "keyword", - }, - "timestamp": Object{ - "type": "date", - "format": "epoch_second", - }, - "unDelegateInfo": Object{ - "properties": Object{ - "id": Object{ - "index": "false", - "type": "keyword", - }, - "value": Object{ - "index": "false", - "type": "keyword", - }, - "valueNum": Object{ - "index": "false", - "type": "double", - }, - "timestamp": Object{ - "index": "false", - "type": "date", - "format": "epoch_second", - }, - }, - }, - }, - }, -} diff --git a/templates/withKibana/deploys.go b/templates/withKibana/deploys.go deleted file mode 100644 index 1f75d3db..00000000 --- a/templates/withKibana/deploys.go +++ /dev/null @@ -1,65 +0,0 @@ -package withKibana - -// SCDeploys will hold the configuration for the scdeploys index -var SCDeploys = Object{ - "index_patterns": Array{ - "scdeploys-*", - }, - "settings": Object{ - "number_of_shards": 3, - "number_of_replicas": 0, - }, - "mappings": Object{ - "properties": Object{ - "deployTxHash": Object{ - "type": "keyword", - }, - "deployer": Object{ - "type": "keyword", - }, - "timestamp": Object{ - "type": "date", - "format": "epoch_second", - }, - "currentOwner": Object{ - "type": "keyword", - }, - "initialCodeHash": Object{ - "type": "keyword", - }, - "upgrades": Object{ - "type": "nested", - "properties": Object{ - "timestamp": Object{ - "type": "date", - "format": "epoch_second", - }, - "upgradeTxHash": Object{ - "type": "keyword", - }, - "upgrader": Object{ - "type": "keyword", - }, - "codeHash": Object{ - "type": "keyword", - }, - }, - }, - "owners": Object{ - "type": "nested", - "properties": Object{ - "timestamp": Object{ - "type": "date", - "format": "epoch_second", - }, - "txHash": Object{ - "type": "keyword", - }, - "address": Object{ - "type": "keyword", - }, - }, - }, - }, - }, -} diff --git a/templates/withKibana/epochInfo.go b/templates/withKibana/epochInfo.go deleted file mode 100644 index 0aa8fb43..00000000 --- a/templates/withKibana/epochInfo.go +++ /dev/null @@ -1,22 +0,0 @@ -package withKibana - -// EpochInfo will hold the configuration for the epochinfo index -var EpochInfo = Object{ - "index_patterns": Array{ - "epochinfo-*", - }, - "settings": Object{ - "number_of_shards": 3, - "number_of_replicas": 0, - }, - "mappings": Object{ - "properties": Object{ - "accumulatedFees": Object{ - "type": "keyword", - }, - "developerFees": Object{ - "type": "keyword", - }, - }, - }, -} diff --git a/templates/withKibana/esdts.go b/templates/withKibana/esdts.go deleted file mode 100644 index cc27f793..00000000 --- a/templates/withKibana/esdts.go +++ /dev/null @@ -1,130 +0,0 @@ -package withKibana - -// ESDTs will hold the configuration for the esdts index -var ESDTs = Object{ - "index_patterns": Array{ - "esdts-*", - }, - "settings": Object{ - "number_of_shards": 3, - "number_of_replicas": 0, - }, - "mappings": Object{ - "properties": Object{ - "name": Object{ - "type": "keyword", - }, - "ticker": Object{ - "type": "keyword", - }, - "token": Object{ - "type": "text", - }, - "issuer": Object{ - "type": "keyword", - }, - "currentOwner": Object{ - "type": "keyword", - }, - "numDecimals": Object{ - "type": "long", - }, - "type": Object{ - "type": "keyword", - }, - "timestamp": Object{ - "type": "date", - "format": "epoch_second", - }, - "ownersHistory": Object{ - "type": "nested", - "properties": Object{ - "timestamp": Object{ - "index": "false", - "type": "date", - "format": "epoch_second", - }, - "address": Object{ - "type": "keyword", - }, - }, - }, - "paused": Object{ - "type": "boolean", - }, - "properties": Object{ - "properties": Object{ - "canMint": Object{ - "index": "false", - "type": "boolean", - }, - "canBurn": Object{ - "index": "false", - "type": "boolean", - }, - "canUpgrade": Object{ - "index": "false", - "type": "boolean", - }, - "canTransferNFTCreateRole": Object{ - "index": "false", - "type": "boolean", - }, - "canAddSpecialRoles": Object{ - "index": "false", - "type": "boolean", - }, - "canPause": Object{ - "index": "false", - "type": "boolean", - }, - "canFreeze": Object{ - "index": "false", - "type": "boolean", - }, - "canWipe": Object{ - "index": "false", - "type": "boolean", - }, - "canChangeOwner": Object{ - "index": "false", - "type": "boolean", - }, - "canCreateMultiShard": Object{ - "index": "false", - "type": "boolean", - }, - }, - }, - "roles": Object{ - "type": "nested", - "properties": Object{ - "ESDTRoleLocalBurn": Object{ - "type": "keyword", - }, - "ESDTRoleLocalMint": Object{ - "type": "keyword", - }, - "ESDTRoleNFTAddQuantity": Object{ - "type": "keyword", - }, - "ESDTRoleNFTAddURI": Object{ - "type": "keyword", - }, - "ESDTRoleNFTBurn": Object{ - "type": "keyword", - }, - "ESDTRoleNFTCreate": Object{ - "type": "keyword", - }, - "ESDTRoleNFTUpdateAttributes": Object{ - "type": "keyword", - }, - "ESDTTransferRole": Object{ - "type": "keyword", - }, - }, - }, - }, - }, -} diff --git a/templates/withKibana/logs.go b/templates/withKibana/logs.go deleted file mode 100644 index 1dcc4c27..00000000 --- a/templates/withKibana/logs.go +++ /dev/null @@ -1,44 +0,0 @@ -package withKibana - -// Logs will hold the configuration for the logs index -var Logs = Object{ - "index_patterns": Array{ - "logs-*", - }, - "settings": Object{ - "number_of_shards": 3, - "number_of_replicas": 0, - }, - "mappings": Object{ - "properties": Object{ - "address": Object{ - "type": "keyword", - }, - "events": Object{ - "type": "nested", - "properties": Object{ - "address": Object{ - "type": "keyword", - }, - "data": Object{ - "index": "false", - "type": "text", - }, - "identifier": Object{ - "type": "keyword", - }, - "topics": Object{ - "type": "text", - }, - }, - }, - "originalTxHash": Object{ - "type": "keyword", - }, - "timestamp": Object{ - "type": "date", - "format": "epoch_second", - }, - }, - }, -} diff --git a/templates/withKibana/miniblocks.go b/templates/withKibana/miniblocks.go deleted file mode 100644 index 05a38b08..00000000 --- a/templates/withKibana/miniblocks.go +++ /dev/null @@ -1,45 +0,0 @@ -package withKibana - -// Miniblocks will hold the configuration for the miniblocks index -var Miniblocks = Object{ - "index_patterns": Array{ - "miniblocks-*", - }, - "settings": Object{ - "number_of_shards": 3, - "number_of_replicas": 0, - }, - "mappings": Object{ - "properties": Object{ - "procTypeD": Object{ - "type": "keyword", - }, - "procTypeS": Object{ - "type": "keyword", - }, - "receiverBlockHash": Object{ - "type": "keyword", - }, - "receiverShard": Object{ - "type": "long", - }, - "reserved": Object{ - "index": "false", - "type": "keyword", - }, - "senderBlockHash": Object{ - "type": "keyword", - }, - "senderShard": Object{ - "type": "long", - }, - "timestamp": Object{ - "type": "date", - "format": "epoch_second", - }, - "type": Object{ - "type": "keyword", - }, - }, - }, -} diff --git a/templates/withKibana/miniblocksPolicy.go b/templates/withKibana/miniblocksPolicy.go deleted file mode 100644 index 60805b39..00000000 --- a/templates/withKibana/miniblocksPolicy.go +++ /dev/null @@ -1,44 +0,0 @@ -package withKibana - -// MiniblocksPolicy will hold the configuration for the miniblocks index policy -var MiniblocksPolicy = Object{ - "policy": Object{ - "description": "Open distro policy for the miniblocks elastic index.", - "default_state": "hot", - "states": Array{ - Object{ - "name": "hot", - "actions": Array{ - Object{ - "rollover": Object{ - "min_size": "60gb", - }, - }, - }, - "transitions": Array{ - Object{ - "state_name": "warm", - "conditions": Object{ - "min_size": "60gb", - }, - }, - }, - }, - Object{ - "name": "warm", - "actions": Array{ - Object{ - "replica_count": Object{ - "number_of_replicas": 1, - }, - }, - }, - "transitions": Array{}, - }, - }, - "ism_template": Object{ - "index_patterns": Array{"miniblocks-*"}, - "priority": 100, - }, - }, -} diff --git a/templates/withKibana/opendistro.go b/templates/withKibana/opendistro.go deleted file mode 100644 index 26e518df..00000000 --- a/templates/withKibana/opendistro.go +++ /dev/null @@ -1,12 +0,0 @@ -package withKibana - -// OpenDistro will hold the configuration for the opendistro -var OpenDistro = Object{ - "index_patterns": Array{ - ".opendistro-*", - }, - "settings": Object{ - "number_of_shards": 1, - "number_of_replicas": 0, - }, -} diff --git a/templates/withKibana/operations.go b/templates/withKibana/operations.go deleted file mode 100644 index 5753e762..00000000 --- a/templates/withKibana/operations.go +++ /dev/null @@ -1,174 +0,0 @@ -package withKibana - -// Operations will hold the configuration for the operations index -var Operations = Object{ - "index_patterns": Array{ - "operations-*", - }, - "settings": Object{ - "number_of_shards": 5, - "number_of_replicas": 0, - "index": Object{ - "sort.field": Array{ - "timestamp", "nonce", - }, - "sort.order": Array{ - "desc", "desc", - }, - }, - }, - - "mappings": Object{ - "properties": Object{ - "callType": Object{ - "index": "false", - "type": "keyword", - }, - "canBeIgnored": Object{ - "type": "boolean", - }, - "code": Object{ - "index": "false", - "type": "text", - }, - "data": Object{ - "type": "text", - }, - "esdtValues": Object{ - "type": "keyword", - }, - "esdtValuesNum": Object{ - "type": "double", - }, - "fee": Object{ - "index": "false", - "type": "keyword", - }, - "feeNum": Object{ - "type": "double", - }, - "function": Object{ - "type": "keyword", - }, - "gasLimit": Object{ - "index": "false", - "type": "double", - }, - "gasPrice": Object{ - "index": "false", - "type": "double", - }, - "gasUsed": Object{ - "index": "false", - "type": "double", - }, - "hasOperations": Object{ - "type": "boolean", - }, - "hasScResults": Object{ - "type": "boolean", - }, - "hasLogs": Object{ - "type": "boolean", - }, - "initialPaidFee": Object{ - "index": "false", - "type": "keyword", - }, - "isRelayed": Object{ - "type": "boolean", - }, - "isScCall": Object{ - "type": "boolean", - }, - "miniBlockHash": Object{ - "type": "keyword", - }, - "nonce": Object{ - "type": "double", - }, - "operation": Object{ - "type": "keyword", - }, - "originalSender": Object{ - "type": "keyword", - }, - "originalTxHash": Object{ - "type": "keyword", - }, - "prevTxHash": Object{ - "type": "keyword", - }, - "receiver": Object{ - "type": "keyword", - }, - "receiverShard": Object{ - "type": "long", - }, - "receivers": Object{ - "type": "keyword", - }, - "receiversShardIDs": Object{ - "type": "long", - }, - "relayedValue": Object{ - "index": "false", - "type": "keyword", - }, - "relayerAddr": Object{ - "type": "keyword", - }, - "returnMessage": Object{ - "type": "text", - }, - "round": Object{ - "type": "double", - }, - "searchOrder": Object{ - "type": "long", - }, - "sender": Object{ - "type": "keyword", - }, - "senderShard": Object{ - "type": "long", - }, - "senderUserName": Object{ - "type": "keyword", - }, - "signature": Object{ - "index": "false", - "type": "keyword", - }, - "status": Object{ - "type": "keyword", - }, - "timestamp": Object{ - "type": "date", - "format": "epoch_second", - }, - "tokens": Object{ - "type": "text", - }, - "type": Object{ - "type": "keyword", - }, - "value": Object{ - "type": "keyword", - }, - "valueNum": Object{ - "type": "double", - }, - "version": Object{ - "type": "long", - }, - "guardian": Object{ - "type": "keyword", - }, - "guardianSignature": Object{ - "index": "false", - "type": "keyword", - }, - }, - }, -} diff --git a/templates/withKibana/rating.go b/templates/withKibana/rating.go deleted file mode 100644 index 3ce1a75e..00000000 --- a/templates/withKibana/rating.go +++ /dev/null @@ -1,20 +0,0 @@ -package withKibana - -// Rating will hold the configuration for the rating index -var Rating = Object{ - "index_patterns": Array{ - "rating-*", - }, - "settings": Object{ - "number_of_shards": 1, - "number_of_replicas": 0, - "opendistro.index_state_management.rollover_alias": "rating", - }, - "mappings": Object{ - "properties": Object{ - "rating": Object{ - "type": "double", - }, - }, - }, -} diff --git a/templates/withKibana/ratingPolicy.go b/templates/withKibana/ratingPolicy.go deleted file mode 100644 index 732648c1..00000000 --- a/templates/withKibana/ratingPolicy.go +++ /dev/null @@ -1,44 +0,0 @@ -package withKibana - -// RatingPolicy will hold the configuration for the ratings index policy -var RatingPolicy = Object{ - "policy": Object{ - "description": "Open distro policy for the ratings elastic index.", - "default_state": "hot", - "states": Array{ - Object{ - "name": "hot", - "actions": Array{ - Object{ - "rollover": Object{ - "min_size": "20gb", - }, - }, - }, - "transitions": Array{ - Object{ - "state_name": "warm", - "conditions": Object{ - "min_size": "20gb", - }, - }, - }, - }, - Object{ - "name": "warm", - "actions": Array{ - Object{ - "replica_count": Object{ - "number_of_replicas": 1, - }, - }, - }, - "transitions": Array{}, - }, - }, - "ism_template": Object{ - "index_patterns": Array{"rating-*"}, - "priority": 100, - }, - }, -} diff --git a/templates/withKibana/receipts.go b/templates/withKibana/receipts.go deleted file mode 100644 index e900d00c..00000000 --- a/templates/withKibana/receipts.go +++ /dev/null @@ -1,42 +0,0 @@ -package withKibana - -// Receipts will hold the configuration for the receipts index -var Receipts = Object{ - "index_patterns": Array{ - "receipts-*", - }, - "settings": Object{ - "number_of_shards": 3, - "number_of_replicas": 0, - "index": Object{ - "sort.field": Array{ - "timestamp", - }, - "sort.order": Array{ - "desc", - }, - }, - "opendistro.index_state_management.rollover_alias": "receipts", - }, - "mappings": Object{ - "properties": Object{ - "data": Object{ - "type": "keyword", - }, - "sender": Object{ - "type": "keyword", - }, - "timestamp": Object{ - "type": "date", - "format": "epoch_second", - }, - "txHash": Object{ - "type": "keyword", - }, - "value": Object{ - "index": "false", - "type": "keyword", - }, - }, - }, -} diff --git a/templates/withKibana/receiptsPolicy.go b/templates/withKibana/receiptsPolicy.go deleted file mode 100644 index 0af6316b..00000000 --- a/templates/withKibana/receiptsPolicy.go +++ /dev/null @@ -1,44 +0,0 @@ -package withKibana - -// ReceiptsPolicy will hold the configuration for the receipts index policy -var ReceiptsPolicy = Object{ - "policy": Object{ - "description": "Open distro policy for the receipts elastic index.", - "default_state": "hot", - "states": Array{ - Object{ - "name": "hot", - "actions": Array{ - Object{ - "rollover": Object{ - "min_size": "85gb", - }, - }, - }, - "transitions": Array{ - Object{ - "state_name": "warm", - "conditions": Object{ - "min_size": "85gb", - }, - }, - }, - }, - Object{ - "name": "warm", - "actions": Array{ - Object{ - "replica_count": Object{ - "number_of_replicas": 1, - }, - }, - }, - "transitions": Array{}, - }, - }, - "ism_template": Object{ - "index_patterns": Array{"receipts-*"}, - "priority": 100, - }, - }, -} diff --git a/templates/withKibana/rounds.go b/templates/withKibana/rounds.go deleted file mode 100644 index 186132dd..00000000 --- a/templates/withKibana/rounds.go +++ /dev/null @@ -1,44 +0,0 @@ -package withKibana - -// Rounds will hold the configuration for the rounds index -var Rounds = Object{ - "index_patterns": Array{ - "rounds-*", - }, - "settings": Object{ - "number_of_shards": 3, - "number_of_replicas": 0, - "opendistro.index_state_management.rollover_alias": "rounds", - "index": Object{ - "sort.field": Array{ - "timestamp", - }, - "sort.order": Array{ - "desc", - }, - }, - }, - "mappings": Object{ - "properties": Object{ - "blockWasProposed": Object{ - "type": "boolean", - }, - "epoch": Object{ - "type": "long", - }, - "round": Object{ - "type": "double", - }, - "shardId": Object{ - "type": "long", - }, - "signersIndexes": Object{ - "type": "long", - }, - "timestamp": Object{ - "type": "date", - "format": "epoch_second", - }, - }, - }, -} diff --git a/templates/withKibana/roundsPolicy.go b/templates/withKibana/roundsPolicy.go deleted file mode 100644 index 0c136aa9..00000000 --- a/templates/withKibana/roundsPolicy.go +++ /dev/null @@ -1,44 +0,0 @@ -package withKibana - -// RoundsPolicy will hold the configuration for the rounds index policy -var RoundsPolicy = Object{ - "policy": Object{ - "description": "Open distro policy for the rounds elastic index.", - "default_state": "hot", - "states": Array{ - Object{ - "name": "hot", - "actions": Array{ - Object{ - "rollover": Object{ - "min_size": "60gb", - }, - }, - }, - "transitions": Array{ - Object{ - "state_name": "warm", - "conditions": Object{ - "min_size": "60gb", - }, - }, - }, - }, - Object{ - "name": "warm", - "actions": Array{ - Object{ - "replica_count": Object{ - "number_of_replicas": 1, - }, - }, - }, - "transitions": Array{}, - }, - }, - "ism_template": Object{ - "index_patterns": Array{"rounds-*"}, - "priority": 100, - }, - }, -} diff --git a/templates/withKibana/scResults.go b/templates/withKibana/scResults.go deleted file mode 100644 index 3aeead69..00000000 --- a/templates/withKibana/scResults.go +++ /dev/null @@ -1,114 +0,0 @@ -package withKibana - -// SCResults will hold the configuration for the scresults index -var SCResults = Object{ - "index_patterns": Array{ - "scresults-*", - }, - "settings": Object{ - "number_of_shards": 3, - "number_of_replicas": 0, - "index": Object{ - "sort.field": Array{ - "timestamp", - }, - "sort.order": Array{ - "desc", - }, - }, - "opendistro.index_state_management.rollover_alias": "scresults", - }, - "mappings": Object{ - "properties": Object{ - "callType": Object{ - "type": "keyword", - }, - "code": Object{ - "index": "false", - "type": "text", - }, - "data": Object{ - "type": "text", - }, - "esdtValues": Object{ - "type": "keyword", - }, - "esdtValuesNum": Object{ - "type": "double", - }, - "function": Object{ - "type": "keyword", - }, - "gasLimit": Object{ - "index": "false", - "type": "double", - }, - "gasPrice": Object{ - "index": "false", - "type": "double", - }, - "hasOperations": Object{ - "type": "boolean", - }, - "miniBlockHash": Object{ - "type": "keyword", - }, - "nonce": Object{ - "type": "double", - }, - "operation": Object{ - "type": "keyword", - }, - "originalSender": Object{ - "type": "keyword", - }, - "originalTxHash": Object{ - "type": "keyword", - }, - "prevTxHash": Object{ - "type": "keyword", - }, - "receiver": Object{ - "type": "keyword", - }, - "receiverShard": Object{ - "type": "long", - }, - "receivers": Object{ - "type": "keyword", - }, - "receiversShardIDs": Object{ - "type": "long", - }, - "relayedValue": Object{ - "index": "false", - "type": "keyword", - }, - "relayerAddr": Object{ - "type": "keyword", - }, - "returnMessage": Object{ - "type": "text", - }, - "sender": Object{ - "type": "keyword", - }, - "senderShard": Object{ - "type": "long", - }, - "timestamp": Object{ - "type": "date", - "format": "epoch_second", - }, - "tokens": Object{ - "type": "text", - }, - "value": Object{ - "type": "keyword", - }, - "valueNum": Object{ - "type": "double", - }, - }, - }, -} diff --git a/templates/withKibana/scResultsPolicy.go b/templates/withKibana/scResultsPolicy.go deleted file mode 100644 index bb25928a..00000000 --- a/templates/withKibana/scResultsPolicy.go +++ /dev/null @@ -1,44 +0,0 @@ -package withKibana - -// ScResultsPolicy will hold the configuration for the scResults index policy -var ScResultsPolicy = Object{ - "policy": Object{ - "description": "Open distro policy for the scresults elastic index.", - "default_state": "hot", - "states": Array{ - Object{ - "name": "hot", - "actions": Array{ - Object{ - "rollover": Object{ - "min_size": "85gb", - }, - }, - }, - "transitions": Array{ - Object{ - "state_name": "warm", - "conditions": Object{ - "min_size": "85gb", - }, - }, - }, - }, - Object{ - "name": "warm", - "actions": Array{ - Object{ - "replica_count": Object{ - "number_of_replicas": 1, - }, - }, - }, - "transitions": Array{}, - }, - }, - "ism_template": Object{ - "index_patterns": Array{"scresults-*"}, - "priority": 100, - }, - }, -} diff --git a/templates/withKibana/tags.go b/templates/withKibana/tags.go deleted file mode 100644 index 67d589d8..00000000 --- a/templates/withKibana/tags.go +++ /dev/null @@ -1,22 +0,0 @@ -package withKibana - -// Tags will hold the configuration for the tags index -var Tags = Object{ - "index_patterns": Array{ - "tags-*", - }, - "settings": Object{ - "number_of_shards": 3, - "number_of_replicas": 0, - }, - "mappings": Object{ - "properties": Object{ - "count": Object{ - "type": "long", - }, - "tag": Object{ - "type": "keyword", - }, - }, - }, -} diff --git a/templates/withKibana/tokens.go b/templates/withKibana/tokens.go deleted file mode 100644 index a969be39..00000000 --- a/templates/withKibana/tokens.go +++ /dev/null @@ -1,172 +0,0 @@ -package withKibana - -// Tokens will hold the configuration for the tokens index -var Tokens = Object{ - "index_patterns": Array{ - "tokens-*", - }, - "settings": Object{ - "number_of_shards": 3, - "number_of_replicas": 0, - }, - "mappings": Object{ - "properties": Object{ - "currentOwner": Object{ - "type": "keyword", - }, - "data": Object{ - "type": "nested", - "properties": Object{ - "attributes": Object{ - "index": "false", - "type": "keyword", - }, - "creator": Object{ - "type": "keyword", - }, - "hash": Object{ - "index": "false", - "type": "keyword", - }, - "metadata": Object{ - "index": "false", - "type": "keyword", - }, - "name": Object{ - "type": "keyword", - }, - "nonEmptyURIs": Object{ - "type": "boolean", - }, - "royalties": Object{ - "type": "long", - }, - "tags": Object{ - "type": "keyword", - }, - "uris": Object{ - "type": "keyword", - }, - "whiteListedStorage": Object{ - "type": "boolean", - }, - }, - }, - "identifier": Object{ - "type": "text", - }, - "issuer": Object{ - "type": "keyword", - }, - "name": Object{ - "type": "keyword", - }, - - "nonce": Object{ - "type": "double", - }, - "numDecimals": Object{ - "type": "long", - }, - "ownersHistory": Object{ - "type": "nested", - "properties": Object{ - "address": Object{ - "type": "keyword", - }, - "timestamp": Object{ - "index": "false", - "type": "date", - "format": "epoch_second", - }, - }, - }, - "properties": Object{ - "properties": Object{ - "canAddSpecialRoles": Object{ - "index": "false", - "type": "boolean", - }, - "canBurn": Object{ - "index": "false", - "type": "boolean", - }, - "canChangeOwner": Object{ - "index": "false", - "type": "boolean", - }, - "canCreateMultiShard": Object{ - "index": "false", - "type": "boolean", - }, - "canFreeze": Object{ - "index": "false", - "type": "boolean", - }, - "canMint": Object{ - "index": "false", - "type": "boolean", - }, - "canPause": Object{ - "index": "false", - "type": "boolean", - }, - "canTransferNFTCreateRole": Object{ - "index": "false", - "type": "boolean", - }, - "canUpgrade": Object{ - "index": "false", - "type": "boolean", - }, - "canWipe": Object{ - "index": "false", - "type": "boolean", - }, - }, - }, - "roles": Object{ - "type": "nested", - "properties": Object{ - "ESDTRoleLocalBurn": Object{ - "type": "keyword", - }, - "ESDTRoleLocalMint": Object{ - "type": "keyword", - }, - "ESDTRoleNFTAddQuantity": Object{ - "type": "keyword", - }, - "ESDTRoleNFTAddURI": Object{ - "type": "keyword", - }, - "ESDTRoleNFTBurn": Object{ - "type": "keyword", - }, - "ESDTRoleNFTCreate": Object{ - "type": "keyword", - }, - "ESDTRoleNFTUpdateAttributes": Object{ - "type": "keyword", - }, - "ESDTTransferRole": Object{ - "type": "keyword", - }, - }, - }, - "ticker": Object{ - "type": "keyword", - }, - "timestamp": Object{ - "type": "date", - "format": "epoch_second", - }, - "token": Object{ - "type": "text", - }, - "type": Object{ - "type": "keyword", - }, - }, - }, -} diff --git a/templates/withKibana/transactions.go b/templates/withKibana/transactions.go deleted file mode 100644 index c96b9b30..00000000 --- a/templates/withKibana/transactions.go +++ /dev/null @@ -1,141 +0,0 @@ -package withKibana - -// Transactions will hold the configuration for the transactions index -var Transactions = Object{ - "index_patterns": Array{ - "transactions-*", - }, - "settings": Object{ - "number_of_shards": 5, - "number_of_replicas": 0, - "opendistro.index_state_management.rollover_alias": "transactions", - "index": Object{ - "sort.field": Array{ - "timestamp", "nonce", - }, - "sort.order": Array{ - "desc", "desc", - }, - }, - }, - "mappings": Object{ - "properties": Object{ - "data": Object{ - "type": "text", - }, - "esdtValues": Object{ - "type": "keyword", - }, - "esdtValuesNum": Object{ - "type": "double", - }, - "fee": Object{ - "index": "false", - "type": "keyword", - }, - "feeNum": Object{ - "type": "double", - }, - "function": Object{ - "type": "keyword", - }, - "gasLimit": Object{ - "index": "false", - "type": "double", - }, - "gasPrice": Object{ - "index": "false", - "type": "double", - }, - "gasUsed": Object{ - "index": "false", - "type": "double", - }, - "hasOperations": Object{ - "type": "boolean", - }, - "hasScResults": Object{ - "type": "boolean", - }, - "hasLogs": Object{ - "type": "boolean", - }, - "initialPaidFee": Object{ - "index": "false", - "type": "keyword", - }, - "isRelayed": Object{ - "type": "boolean", - }, - "isScCall": Object{ - "type": "boolean", - }, - "miniBlockHash": Object{ - "type": "keyword", - }, - "nonce": Object{ - "type": "double", - }, - "operation": Object{ - "type": "keyword", - }, - "receiver": Object{ - "type": "keyword", - }, - "receiverShard": Object{ - "type": "long", - }, - "receivers": Object{ - "type": "keyword", - }, - "receiversShardIDs": Object{ - "type": "long", - }, - "round": Object{ - "type": "double", - }, - "searchOrder": Object{ - "type": "long", - }, - "sender": Object{ - "type": "keyword", - }, - "senderShard": Object{ - "type": "long", - }, - "senderUserName": Object{ - "type": "keyword", - }, - "signature": Object{ - "index": "false", - "type": "keyword", - }, - "status": Object{ - "type": "keyword", - }, - "timestamp": Object{ - "type": "date", - "format": "epoch_second", - }, - "tokens": Object{ - "type": "text", - }, - "value": Object{ - "type": "keyword", - }, - "valueNum": Object{ - "type": "double", - }, - "version": Object{ - "type": "long", - }, - "guardian": Object{ - "type": "keyword", - }, - "guardianSignature": Object{ - "index": "false", - "type": "keyword", - }, - }, - }, -} diff --git a/templates/withKibana/transactionsPolicy.go b/templates/withKibana/transactionsPolicy.go deleted file mode 100644 index 3344f012..00000000 --- a/templates/withKibana/transactionsPolicy.go +++ /dev/null @@ -1,44 +0,0 @@ -package withKibana - -// TransactionsPolicy will hold the configuration for the transactions index policy -var TransactionsPolicy = Object{ - "policy": Object{ - "description": "Open distro policy for the transactions elastic index.", - "default_state": "hot", - "states": Array{ - Object{ - "name": "hot", - "actions": Array{ - Object{ - "rollover": Object{ - "min_size": "85gb", - }, - }, - }, - "transitions": Array{ - Object{ - "state_name": "warm", - "conditions": Object{ - "min_size": "85gb", - }, - }, - }, - }, - Object{ - "name": "warm", - "actions": Array{ - Object{ - "replica_count": Object{ - "number_of_replicas": 1, - }, - }, - }, - "transitions": Array{}, - }, - }, - "ism_template": Object{ - "index_patterns": Array{"transactions-*"}, - "priority": 100, - }, - }, -} diff --git a/templates/withKibana/validators.go b/templates/withKibana/validators.go deleted file mode 100644 index 817f5c66..00000000 --- a/templates/withKibana/validators.go +++ /dev/null @@ -1,19 +0,0 @@ -package withKibana - -// Validators will hold the configuration for the validators index -var Validators = Object{ - "index_patterns": Array{ - "validators-*", - }, - "settings": Object{ - "number_of_shards": 1, - "number_of_replicas": 0, - }, - "mappings": Object{ - "properties": Object{ - "publicKeys": Object{ - "type": "keyword", - }, - }, - }, -} diff --git a/templates/withKibana/validatorsPolicy.go b/templates/withKibana/validatorsPolicy.go deleted file mode 100644 index 6ff00c3b..00000000 --- a/templates/withKibana/validatorsPolicy.go +++ /dev/null @@ -1,44 +0,0 @@ -package withKibana - -// ValidatorsPolicy will hold the configuration for the validators index policy -var ValidatorsPolicy = Object{ - "policy": Object{ - "description": "Open distro policy for the validators elastic index.", - "default_state": "hot", - "states": Array{ - Object{ - "name": "hot", - "actions": Array{ - Object{ - "rollover": Object{ - "min_size": "20gb", - }, - }, - }, - "transitions": Array{ - Object{ - "state_name": "warm", - "conditions": Object{ - "min_size": "20gb", - }, - }, - }, - }, - Object{ - "name": "warm", - "actions": Array{ - Object{ - "replica_count": Object{ - "number_of_replicas": 1, - }, - }, - }, - "transitions": Array{}, - }, - }, - "ism_template": Object{ - "index_patterns": Array{"validators-*"}, - "priority": 100, - }, - }, -}