diff --git a/cmd/mempool/models/activate_account.go b/cmd/mempool/models/activate_account.go index 3290dbf..498196a 100644 --- a/cmd/mempool/models/activate_account.go +++ b/cmd/mempool/models/activate_account.go @@ -3,8 +3,8 @@ package models // ActivateAccount - type ActivateAccount struct { //nolint - tableName struct{} `pg:"activate_account"` + tableName struct{} `pg:"activate_account" comment:"activation operation - is used to activate accounts that were recommended allocations of tezos tokens for donations to the Tezos Foundation’s fundraiser."` MempoolOperation - Pkh string `json:"pkh"` - Secret string `json:"secret"` + Pkh string `json:"pkh" comment:"Public key hash (Ed25519). Address to activate."` + Secret string `json:"secret" comment:"The secret key associated with the key, if available. /^([a-zA-Z0-9][a-zA-Z0-9])*$/"` } diff --git a/cmd/mempool/models/ballot.go b/cmd/mempool/models/ballot.go index 6b6fd4c..59d4072 100644 --- a/cmd/mempool/models/ballot.go +++ b/cmd/mempool/models/ballot.go @@ -3,10 +3,10 @@ package models // Ballot - type Ballot struct { //nolint - tableName struct{} `pg:"ballots"` + tableName struct{} `pg:"ballots" comment:"ballot operation - is used to vote for a proposal in a given voting cycle."` MempoolOperation - Period int64 `json:"period"` - Ballot string `json:"ballot"` + Period int64 `json:"period" comment:"Voting period index, starting from zero, for which the ballot was submitted."` + Ballot string `json:"ballot" comment:"Vote, given in the ballot (yay, nay, or pass)."` } // SetMempoolOperation - diff --git a/cmd/mempool/models/database.go b/cmd/mempool/models/database.go index d258e7d..3618529 100644 --- a/cmd/mempool/models/database.go +++ b/cmd/mempool/models/database.go @@ -34,6 +34,11 @@ func OpenDatabaseConnection(ctx context.Context, cfg config.Database, kinds ...s return nil, err } } + + if err := database.MakeComments(ctx, db, data...); err != nil { + return nil, err + } + db.DB().AddQueryHook(dbLogger{}) return db, nil diff --git a/cmd/mempool/models/delegation.go b/cmd/mempool/models/delegation.go index ab9a8e9..6f1bcdf 100644 --- a/cmd/mempool/models/delegation.go +++ b/cmd/mempool/models/delegation.go @@ -3,14 +3,14 @@ package models // Delegation - type Delegation struct { //nolint - tableName struct{} `pg:"delegations"` + tableName struct{} `pg:"delegations" comment:"delegation operation - is used to delegate funds to a delegate (an implicit account registered as a baker)."` MempoolOperation - Fee int64 `json:"fee,string"` - Counter int64 `json:"counter,string" pg:",pk"` - GasLimit int64 `json:"gas_limit,string"` - StorageLimit int64 `json:"storage_limit,string"` - Delegate string `json:",omitempty"` - Source string `json:"source,omitempty" index:"delegation_source_idx"` + Fee int64 `json:"fee,string" comment:"Fee to a baker, produced block, in which the operation was included."` + Counter int64 `json:"counter,string" pg:",pk" comment:"An account nonce which is used to prevent operation replay."` + GasLimit int64 `json:"gas_limit,string" comment:"A cap on the amount of gas a given operation can consume."` + StorageLimit int64 `json:"storage_limit,string" comment:"A cap on the amount of storage a given operation can consume."` + Delegate string `json:",omitempty" comment:"Address of the delegate to which the operation was sent. null if there is no new delegate (an un-delegation operation)."` + Source string `json:"source,omitempty" index:"delegation_source_idx" comment:"Address of the delegated account."` } // SetMempoolOperation - diff --git a/cmd/mempool/models/double_baking.go b/cmd/mempool/models/double_baking.go index 9f5d4b9..ea22a2c 100644 --- a/cmd/mempool/models/double_baking.go +++ b/cmd/mempool/models/double_baking.go @@ -3,23 +3,23 @@ package models // DoubleBaking - type DoubleBaking struct { //nolint - tableName struct{} `pg:"double_bakings"` + tableName struct{} `pg:"double_bakings" comment:"double_baking operation - is used by bakers to provide evidence of double baking (baking two different blocks at the same height) by a baker."` MempoolOperation Bh1 DoubleBakingInfo `json:"bh1" pg:"-"` Bh2 DoubleBakingInfo `json:"bh2" pg:"-"` - Bh1Level uint64 `json:"-" pg:"bh1_level"` - Bh1Proto int64 `json:"-" pg:"bh1_proto"` - Bh1ValidationPass int64 `json:"-" pg:"bh1_validation_pass"` - Bh1Priority int64 `json:"-" pg:"bh1_priority"` - Bh1ProofOfWorkNonce string `json:"-" pg:"bh1_proof_of_work_nonce"` + Bh1Level uint64 `json:"-" pg:"bh1_level" comment:"Height of the first block from the genesis."` + Bh1Proto int64 `json:"-" pg:"bh1_proto" comment:"First block protocol code, representing a number of protocol changes since genesis (mod 256, but -1 for the genesis block)."` + Bh1ValidationPass int64 `json:"-" pg:"bh1_validation_pass" comment:"First block number of endorsements (slots), included into the block."` + Bh1Priority int64 `json:"-" pg:"bh1_priority" comment:"First block priority [DEPRECATED]."` + Bh1ProofOfWorkNonce string `json:"-" pg:"bh1_proof_of_work_nonce" comment:"First block proof of work nonce."` - Bh2Level uint64 `json:"-" pg:"bh2_level"` - Bh2Proto int64 `json:"-" pg:"bh2_proto"` - Bh2ValidationPass int64 `json:"-" pg:"bh2_validation_pass"` - Bh2Priority int64 `json:"-" pg:"bh2_priority"` - Bh2ProofOfWorkNonce string `json:"-" pg:"bh2_proof_of_work_nonce"` + Bh2Level uint64 `json:"-" pg:"bh2_level" comment:"Height of the second block from the genesis."` + Bh2Proto int64 `json:"-" pg:"bh2_proto" comment:"Second block protocol code, representing a number of protocol changes since genesis (mod 256, but -1 for the genesis block)."` + Bh2ValidationPass int64 `json:"-" pg:"bh2_validation_pass" comment:"Second block number of endorsements (slots), included into the block."` + Bh2Priority int64 `json:"-" pg:"bh2_priority" comment:"Second block priority [DEPRECATED]."` + Bh2ProofOfWorkNonce string `json:"-" pg:"bh2_proof_of_work_nonce" comment:"Second block proof of work nonce."` } // DoubleBakingInfo - diff --git a/cmd/mempool/models/double_endorsing.go b/cmd/mempool/models/double_endorsing.go index 84e533c..42628a8 100644 --- a/cmd/mempool/models/double_endorsing.go +++ b/cmd/mempool/models/double_endorsing.go @@ -3,13 +3,13 @@ package models // DoubleEndorsing - type DoubleEndorsing struct { //nolint - tableName struct{} `pg:"double_endorsings"` + tableName struct{} `pg:"double_endorsings" comment:"double_endorsing operation - is used by bakers to provide evidence of double endorsement (endorsing two different blocks at the same block height) by a baker."` MempoolOperation - Op1Kind string `json:"-" pg:"op1_kind"` - Op1Level uint64 `json:"-" pg:"op1_level"` - Op2Kind string `json:"-" pg:"op2_kind"` - Op2Level uint64 `json:"-" pg:"op2_level"` + Op1Kind string `json:"-" pg:"op1_kind" comment:"Kind of the first operation."` + Op1Level uint64 `json:"-" pg:"op1_level" comment:"Height of the block from the genesis block, in which the first operation was included."` + Op2Kind string `json:"-" pg:"op2_kind" comment:"Kind of the second operation."` + Op2Level uint64 `json:"-" pg:"op2_level" comment:"Height of the block from the genesis block, in which the second operation was included."` Op1 struct { Operations DoubleEndorsingOperations `json:"operations"` diff --git a/cmd/mempool/models/double_preendorsing.go b/cmd/mempool/models/double_preendorsing.go index c1504d6..67918c3 100644 --- a/cmd/mempool/models/double_preendorsing.go +++ b/cmd/mempool/models/double_preendorsing.go @@ -6,10 +6,10 @@ type DoublePreendorsing struct { tableName struct{} `pg:"double_preendorsings"` MempoolOperation - Op1Kind string `json:"-" pg:"op1_kind"` - Op1Level uint64 `json:"-" pg:"op1_level"` - Op2Kind string `json:"-" pg:"op2_kind"` - Op2Level uint64 `json:"-" pg:"op2_level"` + Op1Kind string `json:"-" pg:"op1_kind" comment:"Kind of the first operation."` + Op1Level uint64 `json:"-" pg:"op1_level" comment:"Height of the block from the genesis block, in which the first operation was included."` + Op2Kind string `json:"-" pg:"op2_kind" comment:"Kind of the second operation."` + Op2Level uint64 `json:"-" pg:"op2_level" comment:"Height of the block from the genesis block, in which the second operation was included."` Op1 struct { Operations DoublePreendorsingOperations `json:"operations"` diff --git a/cmd/mempool/models/drain_delegate.go b/cmd/mempool/models/drain_delegate.go index 08a6729..7923d76 100644 --- a/cmd/mempool/models/drain_delegate.go +++ b/cmd/mempool/models/drain_delegate.go @@ -6,9 +6,9 @@ type DelegateDrain struct { tableName struct{} `pg:"drain_delegate"` MempoolOperation - ConsensusKey int64 `json:"consensus_key"` - Delegate string `json:"delegate"` - Destination string `json:"destination"` + ConsensusKey int64 `json:"consensus_key" comment:"Consensus key that was used to sign Drain."` + Delegate string `json:"delegate" comment:"Address of the drained delegate."` + Destination string `json:"destination" comment:"Address of the recipient account."` } // SetMempoolOperation - diff --git a/cmd/mempool/models/endorsement.go b/cmd/mempool/models/endorsement.go index b4a490c..7c662c5 100644 --- a/cmd/mempool/models/endorsement.go +++ b/cmd/mempool/models/endorsement.go @@ -1,14 +1,14 @@ package models -import pg "github.com/go-pg/pg/v10" +import "github.com/go-pg/pg/v10" // Endorsement - type Endorsement struct { //nolint - tableName struct{} `pg:"endorsements"` + tableName struct{} `pg:"endorsements" comment:"endorsement is an operation, which specifies the head of the chain as seen by the endorser of a given slot. The endorser is randomly selected to be included in the block that extends the head of the chain as specified in this operation. A block with more endorsements improves the weight of the chain and increases the likelihood of that chain being the canonical one."` MempoolOperation - Level uint64 `json:"level"` - Baker string `json:"-" index:"transaction_baker_idx"` + Level uint64 `json:"level" comment:"The height of the block from the genesis block, in which the operation was included."` + Baker string `json:"-" index:"transaction_baker_idx" comment:"Address of the baker who sent the operation."` } // EndorsementsWithoutBaker - diff --git a/cmd/mempool/models/gas_stats.go b/cmd/mempool/models/gas_stats.go index 695260e..d553737 100644 --- a/cmd/mempool/models/gas_stats.go +++ b/cmd/mempool/models/gas_stats.go @@ -13,13 +13,13 @@ import ( type GasStats struct { //nolint tableName struct{} `pg:"gas_stats"` - Network string `pg:",pk" json:"network"` - Hash string `pg:",pk" json:"hash"` - TotalGasUsed uint64 `pg:"total_gas_used" json:"total_gas_used"` - TotalFee uint64 `pg:"total_fee" json:"total_fee"` - UpdatedAt int64 `json:"updated_at"` - LevelInMempool uint64 `json:"level_in_mempool"` - LevelInChain uint64 `json:"level_in_chain"` + Network string `pg:",pk" json:"network" comment:"Identifies belonging network."` + Hash string `pg:",pk" json:"hash" comment:"Hash of the operation."` + TotalGasUsed uint64 `pg:"total_gas_used" json:"total_gas_used" comment:"Total amount of consumed gas."` + TotalFee uint64 `pg:"total_fee" json:"total_fee" comment:"Total amount of fee."` + UpdatedAt int64 `json:"updated_at" comment:"Date of last update in seconds since UNIX epoch."` + LevelInMempool uint64 `json:"level_in_mempool" comment:"Level of the block at which the statistics has been calculated in mempool."` + LevelInChain uint64 `json:"level_in_chain" comment:"Level of the block at which the statistics has been calculated in chain."` } // BeforeInsert - diff --git a/cmd/mempool/models/mempool_operation.go b/cmd/mempool/models/mempool_operation.go index 3d11cca..a0aa023 100644 --- a/cmd/mempool/models/mempool_operation.go +++ b/cmd/mempool/models/mempool_operation.go @@ -36,19 +36,19 @@ type ChangableMempoolOperation interface { // MempoolOperation - type MempoolOperation struct { - CreatedAt int64 `json:"-"` - UpdatedAt int64 `json:"-"` - Network string `json:"network" pg:",pk"` - Hash string `json:"hash" pg:",pk"` - Branch string `json:"branch"` - Status string `json:"status"` - Kind string `json:"kind"` - Signature string `json:"signature"` - Protocol string `json:"protocol"` - Level uint64 `json:"level"` - Errors JSONB `json:"errors,omitempty" pg:"type:jsonb"` - ExpirationLevel *uint64 `json:"expiration_level"` - Raw JSONB `json:"raw,omitempty" pg:"type:jsonb"` + CreatedAt int64 `json:"-" comment:"Date of creation in seconds since UNIX epoch."` + UpdatedAt int64 `json:"-" comment:"Date of last update in seconds since UNIX epoch."` + Network string `json:"network" pg:",pk" comment:"Identifies belonging network."` + Hash string `json:"hash" pg:",pk" comment:"Hash of the operation."` + Branch string `json:"branch" comment:"Hash of the block, in which the operation was included."` + Status string `json:"status" comment:"Status of the operation."` + Kind string `json:"kind" comment:"Type of the operation."` + Signature string `json:"signature" comment:"Signature of the operation."` + Protocol string `json:"protocol" comment:"Hash of the protocol, in which the operation was included in mempool."` + Level uint64 `json:"level" comment:"The height of the block from the genesis block, in which the operation was included."` + Errors JSONB `json:"errors,omitempty" pg:"type:jsonb" comment:"Errors with the operation processing if any."` + ExpirationLevel *uint64 `json:"expiration_level" comment:"Datetime of block expiration in which the operation was included in seconds since UNIX epoch."` + Raw JSONB `json:"raw,omitempty" pg:"type:jsonb" comment:"Raw JSON object of the operation."` } // BeforeInsert - diff --git a/cmd/mempool/models/nonce_revelation.go b/cmd/mempool/models/nonce_revelation.go index f16a8f2..019ddf1 100644 --- a/cmd/mempool/models/nonce_revelation.go +++ b/cmd/mempool/models/nonce_revelation.go @@ -3,10 +3,10 @@ package models // NonceRevelation - type NonceRevelation struct { //nolint - tableName struct{} `pg:"nonce_revelations"` + tableName struct{} `pg:"nonce_revelations" comment:"nonce_revelation operation - are used by the blockchain to create randomness."` MempoolOperation - Level int `json:"level"` - Nonce string `json:"nonce"` + Level int `json:"level" comment:"The height of the block from the genesis block, in which the operation was included."` + Nonce string `json:"nonce" comment:"Seed nonce hex."` } // SetMempoolOperation - diff --git a/cmd/mempool/models/origination.go b/cmd/mempool/models/origination.go index 7bc7fe1..c32bf55 100644 --- a/cmd/mempool/models/origination.go +++ b/cmd/mempool/models/origination.go @@ -7,20 +7,20 @@ import ( // Origination - type Origination struct { //nolint - tableName struct{} `pg:"originations"` + tableName struct{} `pg:"originations" comment:"origination - deployment / contract creation operation."` MempoolOperation - Fee int64 `json:"fee,string"` - Counter int64 `json:"counter,string" pg:",pk" ` - GasLimit int64 `json:"gas_limit,string"` - StorageLimit int64 `json:"storage_limit,string"` - Balance string `json:"balance"` - Delegate string `json:",omitempty"` - Source string `json:"source,omitempty" index:"origination_source_idx"` + Fee int64 `json:"fee,string" comment:"Fee to the baker, produced block, in which the operation was included (micro tez)."` + Counter int64 `json:"counter,string" pg:",pk" comment:"An account nonce which is used to prevent operation replay."` + GasLimit int64 `json:"gas_limit,string" comment:"A cap on the amount of gas a given operation can consume."` + StorageLimit int64 `json:"storage_limit,string" comment:"A cap on the amount of storage a given operation can consume."` + Balance string `json:"balance" comment:"The contract origination balance (micro tez)."` + Delegate string `json:",omitempty" comment:"Address of the baker (delegate), which was marked as a delegate in the operation."` + Source string `json:"source,omitempty" index:"origination_source_idx" comment:"Address of the account who has sent the operation."` Script struct { Storage json.RawMessage `json:"storage"` } `json:"script" pg:"-"` - Storage JSONB `json:"-" pg:"type:jsonb"` + Storage JSONB `json:"-" pg:"type:jsonb" comment:"Initial contract storage value converted to human-readable JSON."` } // Fill - diff --git a/cmd/mempool/models/proposal.go b/cmd/mempool/models/proposal.go index 9da7b0a..8945c26 100644 --- a/cmd/mempool/models/proposal.go +++ b/cmd/mempool/models/proposal.go @@ -3,8 +3,8 @@ package models // Proposal - type Proposal struct { //nolint - tableName struct{} `pg:"proposals"` + tableName struct{} `pg:"proposals" comment:"proposal operation - is used by bakers (delegates) to submit and/or upvote proposals to amend the protocol."` MempoolOperation - Period int64 `json:"period"` - Proposals string `json:"proposal" pg:"proposals"` + Period int64 `json:"period" comment:"Voting period index (starting from zero) for which the proposal was submitted (upvoted)."` + Proposals string `json:"proposal" pg:"proposals" comment:"Information about the submitted (upvoted) proposal."` } diff --git a/cmd/mempool/models/register_global_constant.go b/cmd/mempool/models/register_global_constant.go index edaec96..b055381 100644 --- a/cmd/mempool/models/register_global_constant.go +++ b/cmd/mempool/models/register_global_constant.go @@ -3,14 +3,14 @@ package models // RegisterGlobalConstant - type RegisterGlobalConstant struct { //nolint - tableName struct{} `pg:"register_global_constant"` + tableName struct{} `pg:"register_global_constant" comment:"register_constant operation - is used to register a global constant - Micheline expression that can be reused by multiple smart contracts."` MempoolOperation - Source string `json:"source"` - Fee string `json:"fee"` - Counter string `json:"counter"` - GasLimit string `json:"gas_limit"` - StorageLimit string `json:"storage_limit"` - Value JSONB `json:"value" pg:"value,type:jsonb"` + Source string `json:"source" comment:"Address of the account who has sent the operation."` + Fee string `json:"fee" comment:"Fee to the baker, produced block, in which the operation was included (micro tez)."` + Counter string `json:"counter" comment:"An account nonce which is used to prevent operation replay."` + GasLimit string `json:"gas_limit" comment:"A cap on the amount of gas a given operation can consume."` + StorageLimit string `json:"storage_limit" comment:"A cap on the amount of storage a given operation can consume."` + Value JSONB `json:"value" pg:"value,type:jsonb" comment:"Constant value (Micheline JSON)."` } // SetMempoolOperation - diff --git a/cmd/mempool/models/reveal.go b/cmd/mempool/models/reveal.go index accbd39..a230d02 100644 --- a/cmd/mempool/models/reveal.go +++ b/cmd/mempool/models/reveal.go @@ -3,12 +3,12 @@ package models // Reveal - type Reveal struct { //nolint - tableName struct{} `pg:"reveals"` + tableName struct{} `pg:"reveals" comment:"reveal operation - is used to reveal the public key associated with an account."` MempoolOperation - Source string `json:"source" index:"reveal_source_idx"` - Fee int64 `json:"fee,string"` - Counter int64 `json:"counter,string" pg:",pk" ` - GasLimit int64 `json:"gas_limit,string"` - StorageLimit int64 `json:"storage_limit,string"` - PublicKey string `json:"public_key"` + Source string `json:"source" index:"reveal_source_idx" comment:"Address of the account who has sent the operation."` + Fee int64 `json:"fee,string" comment:"Fee to the baker, produced block, in which the operation was included (micro tez)."` + Counter int64 `json:"counter,string" pg:",pk" comment:"An account nonce which is used to prevent operation replay."` + GasLimit int64 `json:"gas_limit,string" comment:"A cap on the amount of gas a given operation can consume."` + StorageLimit int64 `json:"storage_limit,string" comment:"A cap on the amount of storage a given operation can consume."` + PublicKey string `json:"public_key" comment:"Public key of source address."` } diff --git a/cmd/mempool/models/set_deposits_limit.go b/cmd/mempool/models/set_deposits_limit.go index be79008..65691ad 100644 --- a/cmd/mempool/models/set_deposits_limit.go +++ b/cmd/mempool/models/set_deposits_limit.go @@ -6,12 +6,12 @@ type SetDepositsLimit struct { tableName struct{} `pg:"set_deposits_limit"` MempoolOperation - Fee int64 `json:"fee,string"` - Counter int64 `pg:",pk" json:"counter,string"` - GasLimit int64 `json:"gas_limit,string"` - StorageLimit int64 `json:"storage_limit,string"` - Source string `json:"source,omitempty" index:"set_deposits_limit_source_idx"` - Limit *string `json:"limit,omitempty"` + Fee int64 `json:"fee,string" comment:"Fee to the baker, produced block, in which the operation was included (micro tez)."` + Counter int64 `pg:",pk" json:"counter,string" comment:"An account nonce which is used to prevent operation replay."` + GasLimit int64 `json:"gas_limit,string" comment:"A cap on the amount of gas a given operation can consume."` + StorageLimit int64 `json:"storage_limit,string" comment:"A cap on the amount of storage a given operation can consume."` + Source string `json:"source,omitempty" index:"set_deposits_limit_source_idx" comment:"Address of the account who has sent the operation."` + Limit *string `json:"limit,omitempty" comment:"Frozen deposits limit (mutez), or null if no limit."` } // SetMempoolOperation - diff --git a/cmd/mempool/models/sr_add_message.go b/cmd/mempool/models/sr_add_message.go index bcf7bcc..a1f343b 100644 --- a/cmd/mempool/models/sr_add_message.go +++ b/cmd/mempool/models/sr_add_message.go @@ -6,12 +6,12 @@ type SmartRollupAddMessage struct { tableName struct{} `pg:"sr_add_messages"` MempoolOperation - Fee int64 `json:"fee,string"` - Counter int64 `pg:",pk" json:"counter,string"` - GasLimit int64 `json:"gas_limit,string"` - StorageLimit int64 `json:"storage_limit,string"` - Source string `json:"source,omitempty" index:"set_deposits_limit_source_idx"` - Message []string `json:"message"` + Fee int64 `json:"fee,string" comment:"Fee to the baker, produced block, in which the operation was included (micro tez)."` + Counter int64 `pg:",pk" json:"counter,string" comment:"An account nonce which is used to prevent operation replay."` + GasLimit int64 `json:"gas_limit,string" comment:"A cap on the amount of gas a given operation can consume."` + StorageLimit int64 `json:"storage_limit,string" comment:"A cap on the amount of storage a given operation can consume."` + Source string `json:"source,omitempty" index:"set_deposits_limit_source_idx" comment:"Address of the account who has sent the operation."` + Message []string `json:"message" comment:"Messages added to the smart rollup inbox (Array of hex strings)."` } // SetMempoolOperation - diff --git a/cmd/mempool/models/sr_cement.go b/cmd/mempool/models/sr_cement.go index 367ee6f..df3eb9b 100644 --- a/cmd/mempool/models/sr_cement.go +++ b/cmd/mempool/models/sr_cement.go @@ -6,13 +6,13 @@ type SmartRollupCement struct { tableName struct{} `pg:"sr_cement"` MempoolOperation - Fee int64 `json:"fee,string"` - Counter int64 `pg:",pk" json:"counter,string"` - GasLimit int64 `json:"gas_limit,string"` - StorageLimit int64 `json:"storage_limit,string"` - Source string `json:"source,omitempty" index:"sr_cement_source_idx"` - Rollup string `json:"rollup" index:"sr_cement_rollup_idx"` - Commitment string `json:"commitment"` + Fee int64 `json:"fee,string" comment:"Fee to the baker, produced block, in which the operation was included (micro tez)."` + Counter int64 `pg:",pk" json:"counter,string" comment:"An account nonce which is used to prevent operation replay."` + GasLimit int64 `json:"gas_limit,string" comment:"A cap on the amount of gas a given operation can consume."` + StorageLimit int64 `json:"storage_limit,string" comment:"A cap on the amount of storage a given operation can consume."` + Source string `json:"source,omitempty" index:"sr_cement_source_idx" comment:"Address of the account who has sent the operation."` + Rollup string `json:"rollup" index:"sr_cement_rollup_idx" comment:"Smart rollup to which the operation was sent."` + Commitment string `json:"commitment" comment:"Cemented commitment."` } // SetMempoolOperation - diff --git a/cmd/mempool/models/sr_execute.go b/cmd/mempool/models/sr_execute.go index 83a20bc..fe4d3e7 100644 --- a/cmd/mempool/models/sr_execute.go +++ b/cmd/mempool/models/sr_execute.go @@ -6,14 +6,14 @@ type SmartRollupExecute struct { tableName struct{} `pg:"sr_execute"` MempoolOperation - Fee int64 `json:"fee,string"` - Counter int64 `pg:",pk" json:"counter,string"` - GasLimit int64 `json:"gas_limit,string"` - StorageLimit int64 `json:"storage_limit,string"` - Source string `json:"source,omitempty" index:"sr_execute_source_idx"` - Rollup string `json:"rollup" index:"sr_execute_rollup_idx"` - CementedCommitment string `json:"cemented_commitment"` - OutputProof string `json:"output_proof"` + Fee int64 `json:"fee,string" comment:"Fee to the baker, produced block, in which the operation was included (micro tez)."` + Counter int64 `pg:",pk" json:"counter,string" comment:"An account nonce which is used to prevent operation replay."` + GasLimit int64 `json:"gas_limit,string" comment:"A cap on the amount of gas a given operation can consume."` + StorageLimit int64 `json:"storage_limit,string" comment:"A cap on the amount of storage a given operation can consume."` + Source string `json:"source,omitempty" index:"sr_execute_source_idx" comment:"Address of the account who has sent the operation."` + Rollup string `json:"rollup" index:"sr_execute_rollup_idx" comment:"Smart rollup to which the operation was sent."` + CementedCommitment string `json:"cemented_commitment" comment:"Executed commitment."` + OutputProof string `json:"output_proof" comment:"Output proof bytes (hex string)."` } // SetMempoolOperation - diff --git a/cmd/mempool/models/sr_originate.go b/cmd/mempool/models/sr_originate.go index f5085b8..02bc8a9 100644 --- a/cmd/mempool/models/sr_originate.go +++ b/cmd/mempool/models/sr_originate.go @@ -6,15 +6,15 @@ type SmartRollupOriginate struct { tableName struct{} `pg:"sr_originate"` MempoolOperation - Fee int64 `json:"fee,string"` - Counter int64 `pg:",pk" json:"counter,string"` - GasLimit int64 `json:"gas_limit,string"` - StorageLimit int64 `json:"storage_limit,string"` - Source string `json:"source,omitempty" index:"sr_originate_source_idx"` - PvmKind string `json:"pvm_kind"` - Kernel string `json:"kernel"` - OriginationProof string `json:"origination_proof"` - ParametersTy string `json:"parameters_ty"` + Fee int64 `json:"fee,string" comment:"Fee to the baker, produced block, in which the operation was included (micro tez)."` + Counter int64 `pg:",pk" json:"counter,string" comment:"An account nonce which is used to prevent operation replay."` + GasLimit int64 `json:"gas_limit,string" comment:"A cap on the amount of gas a given operation can consume."` + StorageLimit int64 `json:"storage_limit,string" comment:"A cap on the amount of storage a given operation can consume."` + Source string `json:"source,omitempty" index:"sr_originate_source_idx" comment:"Address of the account who has sent the operation."` + PvmKind string `json:"pvm_kind" comment:"PVM kind (arith or wasm)."` + Kernel string `json:"kernel" comment:"Kernel bytes (hex string)."` + OriginationProof string `json:"origination_proof" comment:"Origination proof bytes (hex string)."` + ParametersTy string `json:"parameters_ty" comment:"Smart rollup parameter type (Micheline JSON)."` } // SetMempoolOperation - diff --git a/cmd/mempool/models/sr_publish.go b/cmd/mempool/models/sr_publish.go index 419062e..28dd634 100644 --- a/cmd/mempool/models/sr_publish.go +++ b/cmd/mempool/models/sr_publish.go @@ -6,12 +6,12 @@ type SmartRollupPublish struct { tableName struct{} `pg:"sr_publish"` MempoolOperation - Fee int64 `json:"fee,string"` - Counter int64 `pg:",pk" json:"counter,string"` - GasLimit int64 `json:"gas_limit,string"` - StorageLimit int64 `json:"storage_limit,string"` - Source string `json:"source,omitempty" index:"sr_publish_source_idx"` - Rollup string `json:"rollup,omitempty" index:"sr_publish_bond_rollup_idx"` + Fee int64 `json:"fee,string" comment:"Fee to the baker, produced block, in which the operation was included (micro tez)."` + Counter int64 `pg:",pk" json:"counter,string" comment:"An account nonce which is used to prevent operation replay."` + GasLimit int64 `json:"gas_limit,string" comment:"A cap on the amount of gas a given operation can consume."` + StorageLimit int64 `json:"storage_limit,string" comment:"A cap on the amount of storage a given operation can consume."` + Source string `json:"source,omitempty" index:"sr_publish_source_idx" comment:"Address of the account who has sent the operation."` + Rollup string `json:"rollup,omitempty" index:"sr_publish_bond_rollup_idx" comment:"Smart rollup to which the operation was sent."` } // SetMempoolOperation - diff --git a/cmd/mempool/models/sr_recover_bond.go b/cmd/mempool/models/sr_recover_bond.go index 9f892cf..8d6f974 100644 --- a/cmd/mempool/models/sr_recover_bond.go +++ b/cmd/mempool/models/sr_recover_bond.go @@ -6,12 +6,12 @@ type SmartRollupRecoverBond struct { tableName struct{} `pg:"sr_recover_bond"` MempoolOperation - Fee int64 `json:"fee,string"` - Counter int64 `pg:",pk" json:"counter,string"` - GasLimit int64 `json:"gas_limit,string"` - StorageLimit int64 `json:"storage_limit,string"` - Source string `json:"source,omitempty" index:"sr_recover_bond_source_idx"` - Rollup string `json:"rollup,omitempty" index:"sr_recover_bond_rollup_idx"` + Fee int64 `json:"fee,string" comment:"Fee to the baker, produced block, in which the operation was included (micro tez)."` + Counter int64 `pg:",pk" json:"counter,string" comment:"An account nonce which is used to prevent operation replay."` + GasLimit int64 `json:"gas_limit,string" comment:"A cap on the amount of gas a given operation can consume."` + StorageLimit int64 `json:"storage_limit,string" comment:"A cap on the amount of storage a given operation can consume."` + Source string `json:"source,omitempty" index:"sr_recover_bond_source_idx" comment:"Address of the account who has sent the operation."` + Rollup string `json:"rollup,omitempty" index:"sr_recover_bond_rollup_idx" comment:"Smart rollup to which the operation was sent."` } // SetMempoolOperation - diff --git a/cmd/mempool/models/sr_refute.go b/cmd/mempool/models/sr_refute.go index dfed49f..8c5dc97 100644 --- a/cmd/mempool/models/sr_refute.go +++ b/cmd/mempool/models/sr_refute.go @@ -6,13 +6,13 @@ type SmartRollupRefute struct { tableName struct{} `pg:"sr_refute"` MempoolOperation - Fee int64 `json:"fee,string"` - Counter int64 `pg:",pk" json:"counter,string"` - GasLimit int64 `json:"gas_limit,string"` - StorageLimit int64 `json:"storage_limit,string"` - Source string `json:"source,omitempty" index:"sr_refute_source_idx"` - Opponent string `json:"opponent,omitempty" index:"sr_refute_opponent_idx"` - Rollup string `json:"rollup,omitempty" index:"sr_refute_rollup_idx"` + Fee int64 `json:"fee,string" comment:"Fee to the baker, produced block, in which the operation was included (micro tez)."` + Counter int64 `pg:",pk" json:"counter,string" comment:"An account nonce which is used to prevent operation replay."` + GasLimit int64 `json:"gas_limit,string" comment:"A cap on the amount of gas a given operation can consume."` + StorageLimit int64 `json:"storage_limit,string" comment:"A cap on the amount of storage a given operation can consume."` + Source string `json:"source,omitempty" index:"sr_refute_source_idx" comment:"Address of the account who has sent the operation."` + Opponent string `json:"opponent,omitempty" index:"sr_refute_opponent_idx" comment:"Address of the opponent, who was accused in publishing a wrong commitment."` + Rollup string `json:"rollup,omitempty" index:"sr_refute_rollup_idx" comment:"Smart rollup to which the operation was sent."` } // SetMempoolOperation - diff --git a/cmd/mempool/models/sr_timeout.go b/cmd/mempool/models/sr_timeout.go index 354d5ab..432b18f 100644 --- a/cmd/mempool/models/sr_timeout.go +++ b/cmd/mempool/models/sr_timeout.go @@ -6,12 +6,12 @@ type SmartRollupTimeout struct { tableName struct{} `pg:"sr_timeout"` MempoolOperation - Fee int64 `json:"fee,string"` - Counter int64 `pg:",pk" json:"counter,string"` - GasLimit int64 `json:"gas_limit,string"` - StorageLimit int64 `json:"storage_limit,string"` - Source string `json:"source,omitempty" index:"sr_timeout_source_idx"` - Rollup string `json:"rollup,omitempty" index:"sr_timeout_rollup_idx"` + Fee int64 `json:"fee,string" comment:"Fee to the baker, produced block, in which the operation was included (micro tez)."` + Counter int64 `pg:",pk" json:"counter,string" comment:"An account nonce which is used to prevent operation replay."` + GasLimit int64 `json:"gas_limit,string" comment:"A cap on the amount of gas a given operation can consume."` + StorageLimit int64 `json:"storage_limit,string" comment:"A cap on the amount of storage a given operation can consume."` + Source string `json:"source,omitempty" index:"sr_timeout_source_idx" comment:"Address of the account who has sent the operation."` + Rollup string `json:"rollup,omitempty" index:"sr_timeout_rollup_idx" comment:"Smart rollup to which the operation was sent."` } // SetMempoolOperation - diff --git a/cmd/mempool/models/transaction.go b/cmd/mempool/models/transaction.go index e284fc8..2064340 100644 --- a/cmd/mempool/models/transaction.go +++ b/cmd/mempool/models/transaction.go @@ -6,12 +6,12 @@ type Transaction struct { tableName struct{} `pg:"transactions"` MempoolOperation - Source string `json:"source" index:"transaction_source_idx"` - Fee int64 `json:"fee,string"` - Counter int64 `json:"counter,string" pg:",pk"` - GasLimit int64 `json:"gas_limit,string"` - StorageLimit int64 `json:"storage_limit,string"` - Amount string `json:"amount"` - Destination string `json:"destination" index:"transaction_destination_idx"` - Parameters JSONB `json:"parameters,omitempty" pg:",type:jsonb"` + Source string `json:"source" index:"transaction_source_idx" comment:"Address of the account who has sent the operation."` + Fee int64 `json:"fee,string" comment:"Fee to the baker, produced block, in which the operation was included (micro tez)."` + Counter int64 `json:"counter,string" pg:",pk" comment:"An account nonce which is used to prevent operation replay."` + GasLimit int64 `json:"gas_limit,string" comment:"A cap on the amount of gas a given operation can consume."` + StorageLimit int64 `json:"storage_limit,string" comment:"A cap on the amount of storage a given operation can consume."` + Amount string `json:"amount" comment:"The transaction amount (mutez)."` + Destination string `json:"destination" index:"transaction_destination_idx" comment:"Address of the target of the transaction."` + Parameters JSONB `json:"parameters,omitempty" pg:",type:jsonb" comment:"Transaction parameter, including called entrypoint and value passed to the entrypoint."` } diff --git a/cmd/mempool/models/transfer_ticket.go b/cmd/mempool/models/transfer_ticket.go index a9c108b..3be51a6 100644 --- a/cmd/mempool/models/transfer_ticket.go +++ b/cmd/mempool/models/transfer_ticket.go @@ -6,11 +6,11 @@ type TransferTicket struct { tableName struct{} `pg:"transfer_ticket"` MempoolOperation - Fee int64 `json:"fee,string"` - Counter int64 `pg:",pk" json:"counter,string"` - GasLimit int64 `json:"gas_limit,string"` - StorageLimit int64 `json:"storage_limit,string"` - Source string `json:"source,omitempty" index:"transfer_ticket_source_idx"` + Fee int64 `json:"fee,string" comment:"Fee to the baker, produced block, in which the operation was included (micro tez)."` + Counter int64 `pg:",pk" json:"counter,string" comment:"An account nonce which is used to prevent operation replay."` + GasLimit int64 `json:"gas_limit,string" comment:"A cap on the amount of gas a given operation can consume."` + StorageLimit int64 `json:"storage_limit,string" comment:"A cap on the amount of storage a given operation can consume."` + Source string `json:"source,omitempty" index:"transfer_ticket_source_idx" comment:"Address of the account who has sent the operation."` } // SetMempoolOperation - diff --git a/cmd/mempool/models/tx_rollup_commit.go b/cmd/mempool/models/tx_rollup_commit.go index b764fe1..46f43bf 100644 --- a/cmd/mempool/models/tx_rollup_commit.go +++ b/cmd/mempool/models/tx_rollup_commit.go @@ -6,12 +6,12 @@ type TxRollupCommit struct { tableName struct{} `pg:"tx_rollup_commit"` MempoolOperation - Fee int64 `json:"fee,string"` - Counter int64 `pg:",pk" json:"counter,string"` - GasLimit int64 `json:"gas_limit,string"` - StorageLimit int64 `json:"storage_limit,string"` - Source string `json:"source,omitempty" index:"tx_rollup_commit_source_idx"` - Rollup string `json:"rollup,omitempty" index:"tx_rollup_commit_rollup_idx"` + Fee int64 `json:"fee,string" comment:"Fee to the baker, produced block, in which the operation was included (micro tez)."` + Counter int64 `pg:",pk" json:"counter,string" comment:"An account nonce which is used to prevent operation replay."` + GasLimit int64 `json:"gas_limit,string" comment:"A cap on the amount of gas a given operation can consume."` + StorageLimit int64 `json:"storage_limit,string" comment:"A cap on the amount of storage a given operation can consume."` + Source string `json:"source,omitempty" index:"tx_rollup_commit_source_idx" comment:"Address of the account who has sent the operation."` + Rollup string `json:"rollup,omitempty" index:"tx_rollup_commit_rollup_idx" comment:"Address of the rollup to which the operation was sent."` } // SetMempoolOperation - diff --git a/cmd/mempool/models/tx_rollup_dispatch_tickets.go b/cmd/mempool/models/tx_rollup_dispatch_tickets.go index eadfe04..dc5c374 100644 --- a/cmd/mempool/models/tx_rollup_dispatch_tickets.go +++ b/cmd/mempool/models/tx_rollup_dispatch_tickets.go @@ -6,12 +6,12 @@ type TxRollupDispatchTickets struct { tableName struct{} `pg:"tx_rollup_dispatch_tickets"` MempoolOperation - Fee int64 `json:"fee,string"` - Counter int64 `pg:",pk" json:"counter,string"` - GasLimit int64 `json:"gas_limit,string"` - StorageLimit int64 `json:"storage_limit,string"` - Source string `json:"source,omitempty" index:"tx_rollup_dispatch_tickets_source_idx"` - TxRollup string `json:"tx_rollup,omitempty" index:"tx_rollup_dispatch_tickets_rollup_idx"` + Fee int64 `json:"fee,string" comment:"Fee to the baker, produced block, in which the operation was included (micro tez)."` + Counter int64 `pg:",pk" json:"counter,string" comment:"An account nonce which is used to prevent operation replay."` + GasLimit int64 `json:"gas_limit,string" comment:"A cap on the amount of gas a given operation can consume."` + StorageLimit int64 `json:"storage_limit,string" comment:"A cap on the amount of storage a given operation can consume."` + Source string `json:"source,omitempty" index:"tx_rollup_dispatch_tickets_source_idx" comment:"Address of the account who has sent the operation."` + TxRollup string `json:"tx_rollup,omitempty" index:"tx_rollup_dispatch_tickets_rollup_idx" comment:"Address of the rollup to which the operation was sent."` } // SetMempoolOperation - diff --git a/cmd/mempool/models/tx_rollup_finalize_commitment.go b/cmd/mempool/models/tx_rollup_finalize_commitment.go index 4284d89..4d8e7c9 100644 --- a/cmd/mempool/models/tx_rollup_finalize_commitment.go +++ b/cmd/mempool/models/tx_rollup_finalize_commitment.go @@ -6,12 +6,12 @@ type TxRollupFinalizeCommitment struct { tableName struct{} `pg:"tx_rollup_finalize_commitment"` MempoolOperation - Fee int64 `json:"fee,string"` - Counter int64 `pg:",pk" json:"counter,string"` - GasLimit int64 `json:"gas_limit,string"` - StorageLimit int64 `json:"storage_limit,string"` - Source string `json:"source,omitempty" index:"tx_rollup_finalize_commitment_source_idx"` - Rollup string `json:"rollup,omitempty" index:"tx_rollup_finalize_commitment_rollup_idx"` + Fee int64 `json:"fee,string" comment:"Fee to the baker, produced block, in which the operation was included (micro tez)."` + Counter int64 `pg:",pk" json:"counter,string" comment:"An account nonce which is used to prevent operation replay."` + GasLimit int64 `json:"gas_limit,string" comment:"A cap on the amount of gas a given operation can consume."` + StorageLimit int64 `json:"storage_limit,string" comment:"A cap on the amount of storage a given operation can consume."` + Source string `json:"source,omitempty" index:"tx_rollup_finalize_commitment_source_idx" comment:"Address of the account who has sent the operation."` + Rollup string `json:"rollup,omitempty" index:"tx_rollup_finalize_commitment_rollup_idx" comment:"Address of the rollup to which the operation was sent."` } // SetMempoolOperation - diff --git a/cmd/mempool/models/tx_rollup_origination.go b/cmd/mempool/models/tx_rollup_origination.go index ee96a70..ff35596 100644 --- a/cmd/mempool/models/tx_rollup_origination.go +++ b/cmd/mempool/models/tx_rollup_origination.go @@ -6,11 +6,11 @@ type TxRollupOrigination struct { tableName struct{} `pg:"tx_rollup_origination"` MempoolOperation - Fee int64 `json:"fee,string"` - Counter int64 `pg:",pk" json:"counter,string"` - GasLimit int64 `json:"gas_limit,string"` - StorageLimit int64 `json:"storage_limit,string"` - Source string `json:"source,omitempty" index:"ttx_rollup_origination_source_idx"` + Fee int64 `json:"fee,string" comment:"Fee to the baker, produced block, in which the operation was included (micro tez)."` + Counter int64 `pg:",pk" json:"counter,string" comment:"An account nonce which is used to prevent operation replay."` + GasLimit int64 `json:"gas_limit,string" comment:"A cap on the amount of gas a given operation can consume."` + StorageLimit int64 `json:"storage_limit,string" comment:"A cap on the amount of storage a given operation can consume."` + Source string `json:"source,omitempty" index:"ttx_rollup_origination_source_idx" comment:"Address of the account who has sent the operation."` } // SetMempoolOperation - diff --git a/cmd/mempool/models/tx_rollup_rejection.go b/cmd/mempool/models/tx_rollup_rejection.go index 79f5517..ebda4d7 100644 --- a/cmd/mempool/models/tx_rollup_rejection.go +++ b/cmd/mempool/models/tx_rollup_rejection.go @@ -6,11 +6,11 @@ type TxRollupRejection struct { tableName struct{} `pg:"tx_rollup_rejection"` MempoolOperation - Fee int64 `json:"fee,string"` - Counter int64 `pg:",pk" json:"counter,string"` - GasLimit int64 `json:"gas_limit,string"` - StorageLimit int64 `json:"storage_limit,string"` - Source string `json:"source,omitempty" index:"ttx_rollup_rejection_source_idx"` + Fee int64 `json:"fee,string" comment:"Fee to the baker, produced block, in which the operation was included (micro tez)."` + Counter int64 `pg:",pk" json:"counter,string" comment:"An account nonce which is used to prevent operation replay."` + GasLimit int64 `json:"gas_limit,string" comment:"A cap on the amount of gas a given operation can consume."` + StorageLimit int64 `json:"storage_limit,string" comment:"A cap on the amount of storage a given operation can consume."` + Source string `json:"source,omitempty" index:"ttx_rollup_rejection_source_idx" comment:"Address of the account who has sent the operation."` } // SetMempoolOperation - diff --git a/cmd/mempool/models/tx_rollup_remove_commitment.go b/cmd/mempool/models/tx_rollup_remove_commitment.go index e77664f..ea33715 100644 --- a/cmd/mempool/models/tx_rollup_remove_commitment.go +++ b/cmd/mempool/models/tx_rollup_remove_commitment.go @@ -6,12 +6,12 @@ type TxRollupRemoveCommitment struct { tableName struct{} `pg:"tx_rollup_remove_commitment"` MempoolOperation - Fee int64 `json:"fee,string"` - Counter int64 `pg:",pk" json:"counter,string"` - GasLimit int64 `json:"gas_limit,string"` - StorageLimit int64 `json:"storage_limit,string"` - Source string `json:"source,omitempty" index:"tx_rollup_remove_commitment_source_idx"` - Rollup string `json:"rollup,omitempty" index:"tx_rollup_remove_commitment_rollup_idx"` + Fee int64 `json:"fee,string" comment:"Fee to the baker, produced block, in which the operation was included (micro tez)."` + Counter int64 `pg:",pk" json:"counter,string" comment:"An account nonce which is used to prevent operation replay."` + GasLimit int64 `json:"gas_limit,string" comment:"A cap on the amount of gas a given operation can consume."` + StorageLimit int64 `json:"storage_limit,string" comment:"A cap on the amount of storage a given operation can consume."` + Source string `json:"source,omitempty" index:"tx_rollup_remove_commitment_source_idx" comment:"Address of the account who has sent the operation."` + Rollup string `json:"rollup,omitempty" index:"tx_rollup_remove_commitment_rollup_idx" comment:"Address of the rollup to which the operation was sent."` } // SetMempoolOperation - diff --git a/cmd/mempool/models/tx_rollup_return_bond.go b/cmd/mempool/models/tx_rollup_return_bond.go index fbc2a82..227c7f0 100644 --- a/cmd/mempool/models/tx_rollup_return_bond.go +++ b/cmd/mempool/models/tx_rollup_return_bond.go @@ -6,11 +6,11 @@ type TxRollupReturnBond struct { tableName struct{} `pg:"tx_rollup_return_bond"` MempoolOperation - Fee int64 `json:"fee,string"` - Counter int64 `pg:",pk" json:"counter,string"` - GasLimit int64 `json:"gas_limit,string"` - StorageLimit int64 `json:"storage_limit,string"` - Source string `json:"source,omitempty" index:"ttx_rollup_return_bond_source_idx"` + Fee int64 `json:"fee,string" comment:"Fee to the baker, produced block, in which the operation was included (micro tez)."` + Counter int64 `pg:",pk" json:"counter,string" comment:"An account nonce which is used to prevent operation replay."` + GasLimit int64 `json:"gas_limit,string" comment:"A cap on the amount of gas a given operation can consume."` + StorageLimit int64 `json:"storage_limit,string" comment:"A cap on the amount of storage a given operation can consume."` + Source string `json:"source,omitempty" index:"ttx_rollup_return_bond_source_idx" comment:"Address of the account who has sent the operation."` } // SetMempoolOperation - diff --git a/cmd/mempool/models/tx_rollup_submit_batch.go b/cmd/mempool/models/tx_rollup_submit_batch.go index a82027d..6e0db05 100644 --- a/cmd/mempool/models/tx_rollup_submit_batch.go +++ b/cmd/mempool/models/tx_rollup_submit_batch.go @@ -6,12 +6,12 @@ type TxRollupSubmitBatch struct { tableName struct{} `pg:"tx_rollup_submit_batch"` MempoolOperation - Fee int64 `json:"fee,string"` - Counter int64 `pg:",pk" json:"counter,string"` - GasLimit int64 `json:"gas_limit,string"` - StorageLimit int64 `json:"storage_limit,string"` - Source string `json:"source,omitempty" index:"tx_rollup_submit_batch_source_idx"` - Rollup string `json:"rollup,omitempty" index:"tx_rollup_submit_batch_rollup_idx"` + Fee int64 `json:"fee,string" comment:"Fee to the baker, produced block, in which the operation was included (micro tez)."` + Counter int64 `pg:",pk" json:"counter,string" comment:"An account nonce which is used to prevent operation replay."` + GasLimit int64 `json:"gas_limit,string" comment:"A cap on the amount of gas a given operation can consume."` + StorageLimit int64 `json:"storage_limit,string" comment:"A cap on the amount of storage a given operation can consume."` + Source string `json:"source,omitempty" index:"tx_rollup_submit_batch_source_idx" comment:"Address of the account who has sent the operation."` + Rollup string `json:"rollup,omitempty" index:"tx_rollup_submit_batch_rollup_idx" comment:"Address of the rollup to which the operation was sent."` } // SetMempoolOperation - diff --git a/cmd/mempool/models/update_consensus_key.go b/cmd/mempool/models/update_consensus_key.go index 1b24423..2ee0613 100644 --- a/cmd/mempool/models/update_consensus_key.go +++ b/cmd/mempool/models/update_consensus_key.go @@ -6,12 +6,12 @@ type UpdateConsensusKey struct { tableName struct{} `pg:"update_consensus_key"` MempoolOperation - Fee int64 `json:"fee,string"` - Counter int64 `pg:",pk" json:"counter,string"` - GasLimit int64 `json:"gas_limit,string"` - StorageLimit int64 `json:"storage_limit,string"` - Source string `json:"source" index:"update_consensus_key_source_idx"` - Pk string `json:"pk"` + Fee int64 `json:"fee,string" comment:"Fee to the baker, produced block, in which the operation was included (micro tez)."` + Counter int64 `pg:",pk" json:"counter,string" comment:"An account nonce which is used to prevent operation replay."` + GasLimit int64 `json:"gas_limit,string" comment:"A cap on the amount of gas a given operation can consume."` + StorageLimit int64 `json:"storage_limit,string" comment:"A cap on the amount of storage a given operation can consume."` + Source string `json:"source" index:"update_consensus_key_source_idx" comment:"Address of the account who has sent the operation."` + Pk string `json:"pk" comment:"Consensus key."` } // SetMempoolOperation - diff --git a/docker-compose.test.yml b/docker-compose.test.yml index 6a8fe6e..11ab2ca 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -34,7 +34,7 @@ services: retries: 5 hasura: - image: hasura/graphql-engine:v2.23.0 + image: hasura/graphql-engine:v2.28.0 ports: - 127.0.0.1:${HASURA_PORT:-22000}:8080 depends_on: diff --git a/docker-compose.yml b/docker-compose.yml index 317a65d..ef4717b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -33,7 +33,7 @@ services: retries: 5 hasura: - image: hasura/graphql-engine:v2.27.0 + image: hasura/graphql-engine:v2.28.0 ports: - 127.0.0.1:${HASURA_PORT:-22000}:8080 depends_on: diff --git a/go.mod b/go.mod index 92e8f50..8470d34 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( github.com/btcsuite/btcutil v1.0.2 - github.com/dipdup-net/go-lib v0.2.33 + github.com/dipdup-net/go-lib v0.2.37 github.com/go-pg/pg/v10 v10.10.6 github.com/json-iterator/go v1.1.12 github.com/karlseguin/ccache v2.0.3+incompatible diff --git a/go.sum b/go.sum index b0d2e8e..15956d9 100644 --- a/go.sum +++ b/go.sum @@ -39,8 +39,8 @@ github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dipdup-net/go-lib v0.2.33 h1:pazvU3KHVv3S/5vC0fJnWuVxCwVd4mfp3SzhTfYg4Io= -github.com/dipdup-net/go-lib v0.2.33/go.mod h1:oXILRskGR7bXvuFyc6B8prCKOjGJdDc76kMcf65EvcE= +github.com/dipdup-net/go-lib v0.2.37 h1:cRB1nfT09EUfCjBPWyyw8skWHlalxgW11vK3XzN07tQ= +github.com/dipdup-net/go-lib v0.2.37/go.mod h1:WdAlT2HZfoEAxrR01XtuPucVa5ibczuGk1WhqndYTkE= github.com/ebellocchia/go-base58 v0.1.0 h1:0w/ODEfZnOPW5KW0QY/Xpb1fxba/BxQJMUa5iYzpljk= github.com/ebellocchia/go-base58 v0.1.0/go.mod h1:RHE/6C6Ru6YAH9Tc+A9eHQ6ZKEooLC0jw+YLnpt3CAU= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -75,6 +75,7 @@ github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRx github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= 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=