From 7e589a30f4fd8fb20e082427003425db4e97cb5a Mon Sep 17 00:00:00 2001 From: Moncef AOUDIA Date: Mon, 19 Jun 2023 14:51:37 +0200 Subject: [PATCH] refactor: remove fixedXXX types --- doc/abi.html | 2 +- doc/abi.md | 2 +- doc/api.html | 18 +-- doc/api.md | 18 +-- doc/commons.html | 134 ++++++++--------- doc/commons.md | 135 +++++++++--------- proto/abis/massa/abi/v1/abi.proto | 2 +- proto/apis/massa/api/v1/api.proto | 18 +-- proto/commons/massa/model/v1/address.proto | 2 +- proto/commons/massa/model/v1/amount.proto | 4 +- proto/commons/massa/model/v1/block.proto | 4 +- .../commons/massa/model/v1/endorsement.proto | 4 +- proto/commons/massa/model/v1/execution.proto | 18 +-- proto/commons/massa/model/v1/node.proto | 28 ++-- proto/commons/massa/model/v1/operation.proto | 22 +-- proto/commons/massa/model/v1/slot.proto | 6 +- proto/commons/massa/model/v1/stats.proto | 32 ++--- proto/commons/massa/model/v1/time.proto | 2 +- proto/commons/massa/model/v1/versioning.proto | 10 +- 19 files changed, 231 insertions(+), 230 deletions(-) diff --git a/doc/abi.html b/doc/abi.html index 12310cb..d0e04d5 100644 --- a/doc/abi.html +++ b/doc/abi.html @@ -284,7 +284,7 @@

Amount

amount - fixed64 + uint64

Amount is a 64-bit unsigned integer

diff --git a/doc/abi.md b/doc/abi.md index a239818..1e4e9eb 100644 --- a/doc/abi.md +++ b/doc/abi.md @@ -52,7 +52,7 @@ Amount | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| amount | [fixed64](#fixed64) | | Amount is a 64-bit unsigned integer | +| amount | [uint64](#uint64) | | Amount is a 64-bit unsigned integer | diff --git a/doc/api.html b/doc/api.html index 52f4fb0..a0210b1 100644 --- a/doc/api.html +++ b/doc/api.html @@ -1496,7 +1496,7 @@

BlockParent

period - fixed64 + uint64

Period

@@ -2484,7 +2484,7 @@

GetTransactionsThroughpu throughput - fixed32 + uint32

Transactions throughput

@@ -2570,7 +2570,7 @@

LargestStakerEntry

rolls - fixed64 + uint64

Rolls

@@ -2618,14 +2618,14 @@

LargestStakersFilter

min_rolls - fixed64 + uint64 optional

Minimum rolls (Optional)

max_rolls - fixed64 + uint64 optional

Maximum rolls (Optional)

@@ -2649,14 +2649,14 @@

LargestStakersQuery

offset - fixed64 + uint64

Starting offset for the list of stakers. Defaults to 1

limit - fixed64 + uint64

Limits the number of stakers to return. Defaults to 50

@@ -3437,7 +3437,7 @@

TransactionsThroughputReques interval - fixed64 + uint64 optional

Timer interval in seconds (Optional). Defaults to 10s

@@ -3468,7 +3468,7 @@

TransactionsThroughputRespo throughput - fixed32 + uint32

Transactions throughput

diff --git a/doc/api.md b/doc/api.md index 6e3b0d6..d9baadf 100644 --- a/doc/api.md +++ b/doc/api.md @@ -568,7 +568,7 @@ Block parent tuple | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | block_id | [string](#string) | | Block id | -| period | [fixed64](#fixed64) | | Period | +| period | [uint64](#uint64) | | Period | @@ -1091,7 +1091,7 @@ GetTransactionsThroughputResponse holds response from GetTransactionsThroughput | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | id | [string](#string) | | Request id | -| throughput | [fixed32](#fixed32) | | Transactions throughput | +| throughput | [uint32](#uint32) | | Transactions throughput | @@ -1138,7 +1138,7 @@ LargestStakerEntry | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | address | [string](#string) | | Address | -| rolls | [fixed64](#fixed64) | | Rolls | +| rolls | [uint64](#uint64) | | Rolls | @@ -1168,8 +1168,8 @@ LargestStakers Filter | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| min_rolls | [fixed64](#fixed64) | optional | Minimum rolls (Optional) | -| max_rolls | [fixed64](#fixed64) | optional | Maximum rolls (Optional) | +| min_rolls | [uint64](#uint64) | optional | Minimum rolls (Optional) | +| max_rolls | [uint64](#uint64) | optional | Maximum rolls (Optional) | @@ -1184,8 +1184,8 @@ LargestStakers Query | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| offset | [fixed64](#fixed64) | | Starting offset for the list of stakers. Defaults to 1 | -| limit | [fixed64](#fixed64) | | Limits the number of stakers to return. Defaults to 50 | +| offset | [uint64](#uint64) | | Starting offset for the list of stakers. Defaults to 1 | +| limit | [uint64](#uint64) | | Limits the number of stakers to return. Defaults to 50 | | filter | [LargestStakersFilter](#massa-api-v1-LargestStakersFilter) | | Filter | @@ -1609,7 +1609,7 @@ TransactionsThroughputRequest holds request for TransactionsThroughput | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | id | [string](#string) | | Request id | -| interval | [fixed64](#fixed64) | optional | Timer interval in seconds (Optional). Defaults to 10s | +| interval | [uint64](#uint64) | optional | Timer interval in seconds (Optional). Defaults to 10s | @@ -1625,7 +1625,7 @@ TransactionsThroughputResponse holds response from TransactionsThroughput | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | id | [string](#string) | | Request id | -| throughput | [fixed32](#fixed32) | | Transactions throughput | +| throughput | [uint32](#uint32) | | Transactions throughput | diff --git a/doc/commons.html b/doc/commons.html index 7d872dc..b80e473 100644 --- a/doc/commons.html +++ b/doc/commons.html @@ -644,7 +644,7 @@

MipComponentEntry

version - fixed32 + uint32

Version

@@ -675,28 +675,28 @@

MipInfo

version - fixed32 + uint32

Network (or global) version (to be included in block header)

start - fixed64 + uint64

A timestamp at which the version gains its meaning (e.g. announced in block header)

timeout - fixed64 + uint64

A timestamp at the which the deployment is considered failed

activation_delay - fixed64 + uint64

Once deployment has been locked, wait for this duration before deployment is considered active

@@ -854,35 +854,35 @@

ConsensusStats

start_timespan - fixed64 + uint64

start of the time span for stats

end_timespan - fixed64 + uint64

end of the time span for stats

final_block_count - fixed64 + uint64

number of final blocks

stale_block_count - fixed64 + uint64

number of stale blocks in memory

clique_count - fixed64 + uint64

number of actives cliques

@@ -906,28 +906,28 @@

ExecutionStats

time_window_start - fixed64 + uint64

time window start

time_window_end - fixed64 + uint64

time window end

final_block_count - fixed64 + uint64

number of final blocks in the time window

final_executed_operations_count - fixed64 + uint64

number of final executed operations in the time window

@@ -958,35 +958,35 @@

NetworkStats

in_connection_count - fixed64 + uint64

in connections count

out_connection_count - fixed64 + uint64

out connections count

known_peer_count - fixed64 + uint64

total known peers count

banned_peer_count - fixed64 + uint64

banned node count

active_node_count - fixed64 + uint64

active node count

@@ -1010,14 +1010,14 @@

PoolStats

endorsements_count - fixed64 + uint64

Endorsements

operations_count - fixed64 + uint64

Operations

@@ -1055,70 +1055,70 @@

CompactConfig

genesis_timestamp - fixed64 + uint64

Time in milliseconds when the blockclique started.

end_timestamp - fixed64 + uint64

TESTNET: time when the blockclique is ended.

thread_count - fixed32 + uint32

Number of threads

t0 - fixed64 + uint64

Time between the periods in the same thread.

delta_f0 - fixed64 + uint64

Threshold for fitness.

operation_validity_periods - fixed64 + uint64

Maximum operation validity period count

periods_per_cycle - fixed64 + uint64

cycle duration in periods

block_reward - fixed64 + uint64

Reward amount for a block creation

roll_price - fixed64 + uint64

Price of a roll on the network

max_block_size - fixed32 + uint32

Max total size of a block

@@ -1201,28 +1201,28 @@

NodeStatus

current_time - fixed64 + uint64

Now

current_cycle - fixed64 + uint64

Current cycle

current_cycle_time - fixed64 + uint64

Current cycle starting timestamp

next_cycle_time - fixed64 + uint64

Next cycle starting timestamp

@@ -1366,14 +1366,14 @@

CallSC

max_gas - fixed64 + uint64

The maximum amount of gas that the execution of the contract is allowed to cost

coins - fixed64 + uint64

Extra coins that are spent from the caller's balance and transferred to the target

@@ -1404,14 +1404,14 @@

ExecuteSC

max_coins - fixed64 + uint64

The maximum of coins that could be spent by the operation sender

max_gas - fixed64 + uint64

The maximum amount of gas that the execution of the contract is allowed to cost

@@ -1442,14 +1442,14 @@

Operation

fee - fixed64 + uint64

The fee they have decided for this operation

expire_period - fixed64 + uint64

After `expire_period` slot the operation won't be included in a block

@@ -1546,7 +1546,7 @@

OperationWrapper

thread - fixed32 + uint32

The thread in which the operation can be included

@@ -1584,7 +1584,7 @@

RollBuy

roll_count - fixed64 + uint64

Roll count

@@ -1608,7 +1608,7 @@

RollSell

roll_count - fixed64 + uint64

Roll count

@@ -1667,7 +1667,7 @@

SignedOperation

serialized_size - fixed64 + uint64

The size of the serialized operation

@@ -1698,7 +1698,7 @@

Transaction

amount - fixed64 + uint64

Amount

@@ -1864,14 +1864,14 @@

NativeAmount

mantissa - fixed64 + uint64

Mantissa

scale - fixed32 + uint32

Scale

@@ -1916,7 +1916,7 @@

AsyncMessage

emission_index - fixed64 + uint64

Index of the emitted message within the `emission_slot`. This is used for disambiguate the emission of multiple messages at the same slot.

@@ -1945,21 +1945,21 @@

AsyncMessage

max_gas - fixed64 + uint64

Maximum gas to use when processing the message

fee - fixed64 + uint64

Fee paid by the sender when the message is processed.

coins - fixed64 + uint64

Coins sent from the sender to the target address of the message. Those coins are spent by the sender address when the message is sent, @@ -2280,7 +2280,7 @@

DenunciationEndorsement

index - fixed32 + uint32

Denounciation index

@@ -2535,7 +2535,7 @@

LedgerEntry

balance - fixed64 + uint64

The balance of that entry

@@ -2663,7 +2663,7 @@

ScExecutionEventContext

index_in_slot - fixed64 + uint64

Index of the event in the slot

@@ -2777,7 +2777,7 @@

SetOrKeepBalance

balance - fixed64 + uint64 optional

The balance of that entry (optional)

@@ -2901,7 +2901,7 @@

SetOrKeepFixed64

value - fixed64 + uint64 optional

The value of that entry (optional)

@@ -3305,7 +3305,7 @@

IndexedSlot

index - fixed64 + uint64

Endorsement index in the slot

@@ -3329,14 +3329,14 @@

Slot

period - fixed64 + uint64

Period

thread - fixed32 + uint32

Thread

@@ -3381,7 +3381,7 @@

NativeAddress

version - fixed64 + uint64

Address version

@@ -3666,7 +3666,7 @@

SignedBlock

serialized_size - fixed64 + uint64

The size of the serialized block

@@ -3725,7 +3725,7 @@

SignedBlockHeader

serialized_size - fixed64 + uint64

The size of the serialized block header

@@ -3810,8 +3810,8 @@

BytesMapFieldEntry

- value - bytes + index + uint32

bytes key

@@ -3870,7 +3870,7 @@

SecureShare

serialized_size - fixed64 + uint64

The size of the serialized endorsement

@@ -3908,7 +3908,7 @@

NativeTime

milliseconds - fixed64 + uint64

Milliseconds

diff --git a/doc/commons.md b/doc/commons.md index 9ef5f77..7e4ce65 100644 --- a/doc/commons.md +++ b/doc/commons.md @@ -129,7 +129,7 @@ MipComponentEntry | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | kind | [MipComponent](#massa-model-v1-MipComponent) | | Kind | -| version | [fixed32](#fixed32) | | Version | +| version | [uint32](#uint32) | | Version | @@ -145,10 +145,10 @@ MIP info (name & versions & time range for a MIP) | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | name | [string](#string) | | MIP name or descriptive name | -| version | [fixed32](#fixed32) | | Network (or global) version (to be included in block header) | -| start | [fixed64](#fixed64) | | A timestamp at which the version gains its meaning (e.g. announced in block header) | -| timeout | [fixed64](#fixed64) | | A timestamp at the which the deployment is considered failed | -| activation_delay | [fixed64](#fixed64) | | Once deployment has been locked, wait for this duration before deployment is considered active | +| version | [uint32](#uint32) | | Network (or global) version (to be included in block header) | +| start | [uint64](#uint64) | | A timestamp at which the version gains its meaning (e.g. announced in block header) | +| timeout | [uint64](#uint64) | | A timestamp at the which the deployment is considered failed | +| activation_delay | [uint64](#uint64) | | Once deployment has been locked, wait for this duration before deployment is considered active | | components | [MipComponentEntry](#massa-model-v1-MipComponentEntry) | repeated | Components concerned by this versioning (e.g. a new Block version), and the associated component_version | @@ -226,11 +226,11 @@ Consensus stats | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| start_timespan | [fixed64](#fixed64) | | start of the time span for stats | -| end_timespan | [fixed64](#fixed64) | | end of the time span for stats | -| final_block_count | [fixed64](#fixed64) | | number of final blocks | -| stale_block_count | [fixed64](#fixed64) | | number of stale blocks in memory | -| clique_count | [fixed64](#fixed64) | | number of actives cliques | +| start_timespan | [uint64](#uint64) | | start of the time span for stats | +| end_timespan | [uint64](#uint64) | | end of the time span for stats | +| final_block_count | [uint64](#uint64) | | number of final blocks | +| stale_block_count | [uint64](#uint64) | | number of stale blocks in memory | +| clique_count | [uint64](#uint64) | | number of actives cliques | @@ -245,10 +245,10 @@ Execution stats | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| time_window_start | [fixed64](#fixed64) | | time window start | -| time_window_end | [fixed64](#fixed64) | | time window end | -| final_block_count | [fixed64](#fixed64) | | number of final blocks in the time window | -| final_executed_operations_count | [fixed64](#fixed64) | | number of final executed operations in the time window | +| time_window_start | [uint64](#uint64) | | time window start | +| time_window_end | [uint64](#uint64) | | time window end | +| final_block_count | [uint64](#uint64) | | number of final blocks in the time window | +| final_executed_operations_count | [uint64](#uint64) | | number of final executed operations in the time window | | active_cursor | [Slot](#massa-model-v1-Slot) | | active execution cursor slot | @@ -264,11 +264,11 @@ Network stats | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| in_connection_count | [fixed64](#fixed64) | | in connections count | -| out_connection_count | [fixed64](#fixed64) | | out connections count | -| known_peer_count | [fixed64](#fixed64) | | total known peers count | -| banned_peer_count | [fixed64](#fixed64) | | banned node count | -| active_node_count | [fixed64](#fixed64) | | active node count | +| in_connection_count | [uint64](#uint64) | | in connections count | +| out_connection_count | [uint64](#uint64) | | out connections count | +| known_peer_count | [uint64](#uint64) | | total known peers count | +| banned_peer_count | [uint64](#uint64) | | banned node count | +| active_node_count | [uint64](#uint64) | | active node count | @@ -283,8 +283,8 @@ Pool stats | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| endorsements_count | [fixed64](#fixed64) | | Endorsements | -| operations_count | [fixed64](#fixed64) | | Operations | +| endorsements_count | [uint64](#uint64) | | Endorsements | +| operations_count | [uint64](#uint64) | | Operations | @@ -315,16 +315,16 @@ Compact configuration | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| genesis_timestamp | [fixed64](#fixed64) | | Time in milliseconds when the blockclique started. | -| end_timestamp | [fixed64](#fixed64) | | TESTNET: time when the blockclique is ended. | -| thread_count | [fixed32](#fixed32) | | Number of threads | -| t0 | [fixed64](#fixed64) | | Time between the periods in the same thread. | -| delta_f0 | [fixed64](#fixed64) | | Threshold for fitness. | -| operation_validity_periods | [fixed64](#fixed64) | | Maximum operation validity period count | -| periods_per_cycle | [fixed64](#fixed64) | | cycle duration in periods | -| block_reward | [fixed64](#fixed64) | | Reward amount for a block creation | -| roll_price | [fixed64](#fixed64) | | Price of a roll on the network | -| max_block_size | [fixed32](#fixed32) | | Max total size of a block | +| genesis_timestamp | [uint64](#uint64) | | Time in milliseconds when the blockclique started. | +| end_timestamp | [uint64](#uint64) | | TESTNET: time when the blockclique is ended. | +| thread_count | [uint32](#uint32) | | Number of threads | +| t0 | [uint64](#uint64) | | Time between the periods in the same thread. | +| delta_f0 | [uint64](#uint64) | | Threshold for fitness. | +| operation_validity_periods | [uint64](#uint64) | | Maximum operation validity period count | +| periods_per_cycle | [uint64](#uint64) | | cycle duration in periods | +| block_reward | [uint64](#uint64) | | Reward amount for a block creation | +| roll_price | [uint64](#uint64) | | Price of a roll on the network | +| max_block_size | [uint32](#uint32) | | Max total size of a block | @@ -359,10 +359,10 @@ Node status | node_id | [string](#string) | | Our node id | | node_ip | [string](#string) | | Optional node ip | | version | [string](#string) | | Node version | -| current_time | [fixed64](#fixed64) | | Now | -| current_cycle | [fixed64](#fixed64) | | Current cycle | -| current_cycle_time | [fixed64](#fixed64) | | Current cycle starting timestamp | -| next_cycle_time | [fixed64](#fixed64) | | Next cycle starting timestamp | +| current_time | [uint64](#uint64) | | Now | +| current_cycle | [uint64](#uint64) | | Current cycle | +| current_cycle_time | [uint64](#uint64) | | Current cycle starting timestamp | +| next_cycle_time | [uint64](#uint64) | | Next cycle starting timestamp | | connected_nodes | [ConnectedNode](#massa-model-v1-ConnectedNode) | repeated | Connected nodes | | last_slot | [Slot](#massa-model-v1-Slot) | | Latest slot, none if now is before genesis timestamp | | next_slot | [Slot](#massa-model-v1-Slot) | | Next slot | @@ -417,8 +417,8 @@ Calls an exported function from a stored smart contract | target_addr | [string](#string) | | Target smart contract address | | target_func | [string](#string) | | Target function name. No function is called if empty | | param | [bytes](#bytes) | | Parameter to pass to the target function | -| max_gas | [fixed64](#fixed64) | | The maximum amount of gas that the execution of the contract is allowed to cost | -| coins | [fixed64](#fixed64) | | Extra coins that are spent from the caller's balance and transferred to the target | +| max_gas | [uint64](#uint64) | | The maximum amount of gas that the execution of the contract is allowed to cost | +| coins | [uint64](#uint64) | | Extra coins that are spent from the caller's balance and transferred to the target | @@ -434,8 +434,8 @@ Execute a smart contract | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | data | [bytes](#bytes) | | Smart contract bytecode. | -| max_coins | [fixed64](#fixed64) | | The maximum of coins that could be spent by the operation sender | -| max_gas | [fixed64](#fixed64) | | The maximum amount of gas that the execution of the contract is allowed to cost | +| max_coins | [uint64](#uint64) | | The maximum of coins that could be spent by the operation sender | +| max_gas | [uint64](#uint64) | | The maximum amount of gas that the execution of the contract is allowed to cost | | datastore | [BytesMapFieldEntry](#massa-model-v1-BytesMapFieldEntry) | repeated | A key-value store associating a hash to arbitrary bytes | @@ -451,8 +451,8 @@ The operation as sent in the network | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| fee | [fixed64](#fixed64) | | The fee they have decided for this operation | -| expire_period | [fixed64](#fixed64) | | After `expire_period` slot the operation won't be included in a block | +| fee | [uint64](#uint64) | | The fee they have decided for this operation | +| expire_period | [uint64](#uint64) | | After `expire_period` slot the operation won't be included in a block | | op | [OperationType](#massa-model-v1-OperationType) | | The type specific operation part | @@ -489,7 +489,7 @@ A wrapper around an operation with its metadata | ----- | ---- | ----- | ----------- | | id | [string](#string) | | The unique ID of the operation. | | block_ids | [string](#string) | repeated | The IDs of the blocks in which the operation appears | -| thread | [fixed32](#fixed32) | | The thread in which the operation can be included | +| thread | [uint32](#uint32) | | The thread in which the operation can be included | | operation | [SignedOperation](#massa-model-v1-SignedOperation) | | The operation object itself | | status | [OperationStatus](#massa-model-v1-OperationStatus) | repeated | The execution statuses of the operation | @@ -506,7 +506,7 @@ The sender buys `roll_count` rolls. Roll price is defined in configuration | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| roll_count | [fixed64](#fixed64) | | Roll count | +| roll_count | [uint64](#uint64) | | Roll count | @@ -521,7 +521,7 @@ The sender sells `roll_count` rolls. Roll price is defined in configuration | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| roll_count | [fixed64](#fixed64) | | Roll count | +| roll_count | [uint64](#uint64) | | Roll count | @@ -541,7 +541,7 @@ Signed operation | content_creator_pub_key | [string](#string) | | The public-key component used in the generation of the signature | | content_creator_address | [string](#string) | | Derived from the same public key used to generate the signature | | id | [string](#string) | | A secure hash of the data. See also [massa_hash::Hash] | -| serialized_size | [fixed64](#fixed64) | | The size of the serialized operation | +| serialized_size | [uint64](#uint64) | | The size of the serialized operation | @@ -557,7 +557,7 @@ Transfer coins from sender to recipient | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | recipient_address | [string](#string) | | Recipient address | -| amount | [fixed64](#fixed64) | | Amount | +| amount | [uint64](#uint64) | | Amount | @@ -652,8 +652,8 @@ the future. value = mantissa / (10^scale) | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| mantissa | [fixed64](#fixed64) | | Mantissa | -| scale | [fixed32](#fixed32) | | Scale | +| mantissa | [uint64](#uint64) | | Mantissa | +| scale | [uint32](#uint32) | | Scale | @@ -685,13 +685,13 @@ Asynchronous smart contract message | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | emission_slot | [Slot](#massa-model-v1-Slot) | | Slot at which the message was emitted | -| emission_index | [fixed64](#fixed64) | | Index of the emitted message within the `emission_slot`. This is used for disambiguate the emission of multiple messages at the same slot. | +| emission_index | [uint64](#uint64) | | Index of the emitted message within the `emission_slot`. This is used for disambiguate the emission of multiple messages at the same slot. | | sender | [string](#string) | | The address that sent the message | | destination | [string](#string) | | The address towards which the message is being sent | | handler | [string](#string) | | the handler function name within the destination address' bytecode | -| max_gas | [fixed64](#fixed64) | | Maximum gas to use when processing the message | -| fee | [fixed64](#fixed64) | | Fee paid by the sender when the message is processed. | -| coins | [fixed64](#fixed64) | | Coins sent from the sender to the target address of the message. Those coins are spent by the sender address when the message is sent, and credited to the destination address when receiving the message. In case of failure or discard, those coins are reimbursed to the sender. | +| max_gas | [uint64](#uint64) | | Maximum gas to use when processing the message | +| fee | [uint64](#uint64) | | Fee paid by the sender when the message is processed. | +| coins | [uint64](#uint64) | | Coins sent from the sender to the target address of the message. Those coins are spent by the sender address when the message is sent, and credited to the destination address when receiving the message. In case of failure or discard, those coins are reimbursed to the sender. | | validity_start | [Slot](#massa-model-v1-Slot) | | Slot at which the message starts being valid (bound included in the validity range) | | validity_end | [Slot](#massa-model-v1-Slot) | | Slot at which the message stops being valid (bound not included in the validity range) | | data | [bytes](#bytes) | | Raw payload data of the message | @@ -805,7 +805,7 @@ Variant for Endorsement denunciation index | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | slot | [Slot](#massa-model-v1-Slot) | | Denounciation slot | -| index | [fixed32](#fixed32) | | Denounciation index | +| index | [uint32](#uint32) | | Denounciation index | @@ -934,7 +934,7 @@ An entry associated to an address in the `FinalLedger` | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| balance | [fixed64](#fixed64) | | The balance of that entry | +| balance | [uint64](#uint64) | | The balance of that entry | | bytecode | [bytes](#bytes) | | Executable bytecode | | entries | [BytesMapFieldEntry](#massa-model-v1-BytesMapFieldEntry) | repeated | A key-value store associating a hash to arbitrary bytes | @@ -987,7 +987,7 @@ ScExecutionEvent context | id | [string](#string) | | base58 encoded slot(period + thread) + index_in_slot | | origin_slot | [Slot](#massa-model-v1-Slot) | | When was it generated | | block_id | [string](#string) | optional | Block id if there was a block at that slot (optional) | -| index_in_slot | [fixed64](#fixed64) | | Index of the event in the slot | +| index_in_slot | [uint64](#uint64) | | Index of the event in the slot | | call_stack | [string](#string) | repeated | Call stack addresses. most recent at the end | | origin_operation_id | [string](#string) | optional | Origin operation id (optional) | | status | [ScExecutionEventStatus](#massa-model-v1-ScExecutionEventStatus) | repeated | Status | @@ -1038,7 +1038,7 @@ Set or Keep Balance | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | type | [SetOrKeepType](#massa-model-v1-SetOrKeepType) | | The type of the change | -| balance | [fixed64](#fixed64) | optional | The balance of that entry (optional) | +| balance | [uint64](#uint64) | optional | The balance of that entry (optional) | @@ -1102,7 +1102,7 @@ Set or Keep Fixed64 | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | type | [SetOrKeepType](#massa-model-v1-SetOrKeepType) | | The type of the change | -| value | [fixed64](#fixed64) | optional | The value of that entry (optional) | +| value | [uint64](#uint64) | optional | The value of that entry (optional) | @@ -1294,7 +1294,7 @@ When an address is drawn to create an endorsement it is selected for a specific | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | slot | [Slot](#massa-model-v1-Slot) | | Slot | -| index | [fixed64](#fixed64) | | Endorsement index in the slot | +| index | [uint64](#uint64) | | Endorsement index in the slot | @@ -1309,8 +1309,8 @@ A point in time where a block is expected | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| period | [fixed64](#fixed64) | | Period | -| thread | [fixed32](#fixed32) | | Thread | +| period | [uint64](#uint64) | | Period | +| thread | [uint32](#uint32) | | Thread | @@ -1342,7 +1342,7 @@ Massa NativeAddress | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | category | [AddressCategory](#massa-model-v1-AddressCategory) | | Address category | -| version | [fixed64](#fixed64) | | Address version | +| version | [uint64](#uint64) | | Address version | | content | [bytes](#bytes) | | Address content | @@ -1475,7 +1475,7 @@ Signed block | content_creator_pub_key | [string](#string) | | The public-key component used in the generation of the signature | | content_creator_address | [string](#string) | | Derived from the same public key used to generate the signature | | id | [string](#string) | | A secure hash of the data. See also [massa_hash::Hash] | -| serialized_size | [fixed64](#fixed64) | | The size of the serialized block | +| serialized_size | [uint64](#uint64) | | The size of the serialized block | @@ -1495,7 +1495,7 @@ Signed block header | content_creator_pub_key | [string](#string) | | The public-key component used in the generation of the signature | | content_creator_address | [string](#string) | | Derived from the same public key used to generate the signature | | id | [string](#string) | | A secure hash of the data. See also [massa_hash::Hash] | -| serialized_size | [fixed64](#fixed64) | | The size of the serialized block header | +| serialized_size | [uint64](#uint64) | | The size of the serialized block header | @@ -1541,8 +1541,9 @@ BytesMapFieldEntry | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| key | [bytes](#bytes) | | bytes key | -| value | [bytes](#bytes) | | bytes key | +| slot | [Slot](#massa-model-v1-Slot) | | Slot in which the endorsement can be included | +| index | [uint32](#uint32) | | Endorsement index inside the including block | +| endorsed_block | [string](#string) | | Hash of endorsed block This is the parent in thread `self.slot.thread` of the block in which the endorsement is included | @@ -1562,7 +1563,7 @@ Packages a type such that it can be securely sent and received in a trust-free n | content_creator_pub_key | [string](#string) | | The public-key component used in the generation of the signature | | content_creator_address | [string](#string) | | Derived from the same public key used to generate the signature | | id | [string](#string) | | A secure hash of the data. See also [massa_hash::Hash] | -| serialized_size | [fixed64](#fixed64) | | The size of the serialized endorsement | +| serialized_size | [uint64](#uint64) | | The size of the serialized endorsement | @@ -1593,7 +1594,7 @@ NativeTime represents a native duration or unix timestamp | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| milliseconds | [fixed64](#fixed64) | | Milliseconds | +| milliseconds | [uint64](#uint64) | | Milliseconds | diff --git a/proto/abis/massa/abi/v1/abi.proto b/proto/abis/massa/abi/v1/abi.proto index a160c42..eea6d50 100644 --- a/proto/abis/massa/abi/v1/abi.proto +++ b/proto/abis/massa/abi/v1/abi.proto @@ -22,7 +22,7 @@ message Address { // Amount message Amount { // Amount is a 64-bit unsigned integer - fixed64 amount = 1; + uint64 amount = 1; } // Empty diff --git a/proto/apis/massa/api/v1/api.proto b/proto/apis/massa/api/v1/api.proto index 73a4b4d..00d9ee5 100644 --- a/proto/apis/massa/api/v1/api.proto +++ b/proto/apis/massa/api/v1/api.proto @@ -239,9 +239,9 @@ message GetLargestStakersRequest { // LargestStakers Query message LargestStakersQuery { // Starting offset for the list of stakers. Defaults to 1 - fixed64 offset = 1; + uint64 offset = 1; // Limits the number of stakers to return. Defaults to 50 - fixed64 limit = 2; + uint64 limit = 2; // Filter LargestStakersFilter filter = 3; } @@ -249,9 +249,9 @@ message LargestStakersQuery { // LargestStakers Filter message LargestStakersFilter { // Minimum rolls (Optional) - optional fixed64 min_rolls = 1; + optional uint64 min_rolls = 1; // Maximum rolls (Optional) - optional fixed64 max_rolls = 2; + optional uint64 max_rolls = 2; } // GetLargestStakersResponse holds response from GetLargestStakers @@ -275,7 +275,7 @@ message LargestStakerEntry { // Address string address = 1; // Rolls - fixed64 rolls = 2; + uint64 rolls = 2; } // GetMipStatusRequest holds request for GetMipStatus @@ -311,7 +311,7 @@ message BlockParent { // Block id string block_id = 1; // Period - fixed64 period = 2; + uint64 period = 2; } // GetOperationsRequest holds request for GetOperations @@ -435,7 +435,7 @@ message GetTransactionsThroughputResponse { // Request id string id = 1; // Transactions throughput - fixed32 throughput = 2; + uint32 throughput = 2; } // GetVersionRequest holds request from GetVersion @@ -660,7 +660,7 @@ message TransactionsThroughputRequest { // Request id string id = 1; // Timer interval in seconds (Optional). Defaults to 10s - optional fixed64 interval = 2; + optional uint64 interval = 2; } // TransactionsThroughputResponse holds response from TransactionsThroughput @@ -668,5 +668,5 @@ message TransactionsThroughputResponse { // Request id string id = 1; // Transactions throughput - fixed32 throughput = 2; + uint32 throughput = 2; } diff --git a/proto/commons/massa/model/v1/address.proto b/proto/commons/massa/model/v1/address.proto index 382da13..ecce5ba 100644 --- a/proto/commons/massa/model/v1/address.proto +++ b/proto/commons/massa/model/v1/address.proto @@ -28,7 +28,7 @@ message NativeAddress { // Address category AddressCategory category = 1; // Address version - fixed64 version = 2; + uint64 version = 2; // Address content bytes content = 3; } diff --git a/proto/commons/massa/model/v1/amount.proto b/proto/commons/massa/model/v1/amount.proto index 2c99c53..21dada2 100644 --- a/proto/commons/massa/model/v1/amount.proto +++ b/proto/commons/massa/model/v1/amount.proto @@ -17,7 +17,7 @@ option swift_prefix = "MMODEL"; // the future. value = mantissa / (10^scale) message NativeAmount { // Mantissa - fixed64 mantissa = 1; + uint64 mantissa = 1; // Scale - fixed32 scale = 2; + uint32 scale = 2; } diff --git a/proto/commons/massa/model/v1/block.proto b/proto/commons/massa/model/v1/block.proto index b2394d0..a6c4cba 100644 --- a/proto/commons/massa/model/v1/block.proto +++ b/proto/commons/massa/model/v1/block.proto @@ -66,7 +66,7 @@ message SignedBlock { // A secure hash of the data. See also [massa_hash::Hash] string id = 5; // The size of the serialized block - fixed64 serialized_size = 6; + uint64 serialized_size = 6; } // Signed block header @@ -82,7 +82,7 @@ message SignedBlockHeader { // A secure hash of the data. See also [massa_hash::Hash] string id = 5; // The size of the serialized block header - fixed64 serialized_size = 6; + uint64 serialized_size = 6; } // Possible statuses for a block diff --git a/proto/commons/massa/model/v1/endorsement.proto b/proto/commons/massa/model/v1/endorsement.proto index e15c592..32c2bca 100644 --- a/proto/commons/massa/model/v1/endorsement.proto +++ b/proto/commons/massa/model/v1/endorsement.proto @@ -20,7 +20,7 @@ message Endorsement { // Slot in which the endorsement can be included Slot slot = 1; // Endorsement index inside the including block - fixed32 index = 2; + uint32 index = 2; // Hash of endorsed block // This is the parent in thread `self.slot.thread` of the block in which the endorsement is included string endorsed_block = 3; @@ -39,5 +39,5 @@ message SignedEndorsement { // A secure hash of the data. See also [massa_hash::Hash] string id = 5; // The size of the serialized endorsement - fixed64 serialized_size = 6; + uint64 serialized_size = 6; } diff --git a/proto/commons/massa/model/v1/execution.proto b/proto/commons/massa/model/v1/execution.proto index de5b167..86a61cd 100644 --- a/proto/commons/massa/model/v1/execution.proto +++ b/proto/commons/massa/model/v1/execution.proto @@ -59,7 +59,7 @@ message ScExecutionEventContext { // Block id if there was a block at that slot (optional) optional string block_id = 3; // Index of the event in the slot - fixed64 index_in_slot = 4; + uint64 index_in_slot = 4; // Call stack addresses. most recent at the end repeated string call_stack = 5; // Origin operation id (optional) @@ -153,7 +153,7 @@ message AsyncMessage { massa.model.v1.Slot emission_slot = 1; // Index of the emitted message within the `emission_slot`. // This is used for disambiguate the emission of multiple messages at the same slot. - fixed64 emission_index = 2; + uint64 emission_index = 2; // The address that sent the message string sender = 3; // The address towards which the message is being sent @@ -161,14 +161,14 @@ message AsyncMessage { // the handler function name within the destination address' bytecode string handler = 5; // Maximum gas to use when processing the message - fixed64 max_gas = 6; + uint64 max_gas = 6; // Fee paid by the sender when the message is processed. - fixed64 fee = 7; + uint64 fee = 7; // Coins sent from the sender to the target address of the message. // Those coins are spent by the sender address when the message is sent, // and credited to the destination address when receiving the message. // In case of failure or discard, those coins are reimbursed to the sender. - fixed64 coins = 8; + uint64 coins = 8; // Slot at which the message starts being valid (bound included in the validity range) massa.model.v1.Slot validity_start = 9; // Slot at which the message stops being valid (bound not included in the validity range) @@ -234,7 +234,7 @@ message SetOrKeepFixed64 { // The type of the change SetOrKeepType type = 1; // The value of that entry (optional) - optional fixed64 value = 2; + optional uint64 value = 2; } // Set or Keep String @@ -309,7 +309,7 @@ enum LedgerChangeType { // An entry associated to an address in the `FinalLedger` message LedgerEntry { // The balance of that entry - fixed64 balance = 1; + uint64 balance = 1; // Executable bytecode bytes bytecode = 2; // A key-value store associating a hash to arbitrary bytes @@ -331,7 +331,7 @@ message SetOrKeepBalance { // The type of the change SetOrKeepType type = 1; // The balance of that entry (optional) - optional fixed64 balance = 2; + optional uint64 balance = 2; } // Set or Keep Bytecode @@ -386,5 +386,5 @@ message DenunciationEndorsement { // Denounciation slot massa.model.v1.Slot slot = 1; // Denounciation index - fixed32 index = 2; + uint32 index = 2; } diff --git a/proto/commons/massa/model/v1/node.proto b/proto/commons/massa/model/v1/node.proto index 487e3ac..744e364 100644 --- a/proto/commons/massa/model/v1/node.proto +++ b/proto/commons/massa/model/v1/node.proto @@ -25,13 +25,13 @@ message NodeStatus { // Node version string version = 3; // Now - fixed64 current_time = 4; + uint64 current_time = 4; // Current cycle - fixed64 current_cycle = 5; + uint64 current_cycle = 5; // Current cycle starting timestamp - fixed64 current_cycle_time = 6; + uint64 current_cycle_time = 6; // Next cycle starting timestamp - fixed64 next_cycle_time = 7; + uint64 next_cycle_time = 7; // Connected nodes repeated ConnectedNode connected_nodes = 8; // Latest slot, none if now is before genesis timestamp @@ -70,23 +70,23 @@ enum ConnectionType { // Compact configuration message CompactConfig { // Time in milliseconds when the blockclique started. - fixed64 genesis_timestamp = 1; + uint64 genesis_timestamp = 1; // TESTNET: time when the blockclique is ended. - fixed64 end_timestamp = 2; + uint64 end_timestamp = 2; // Number of threads - fixed32 thread_count = 3; + uint32 thread_count = 3; // Time between the periods in the same thread. - fixed64 t0 = 4; + uint64 t0 = 4; // Threshold for fitness. - fixed64 delta_f0 = 5; + uint64 delta_f0 = 5; // Maximum operation validity period count - fixed64 operation_validity_periods = 6; + uint64 operation_validity_periods = 6; // cycle duration in periods - fixed64 periods_per_cycle = 7; + uint64 periods_per_cycle = 7; // Reward amount for a block creation - fixed64 block_reward = 8; + uint64 block_reward = 8; // Price of a roll on the network - fixed64 roll_price = 9; + uint64 roll_price = 9; // Max total size of a block - fixed32 max_block_size = 10; + uint32 max_block_size = 10; } diff --git a/proto/commons/massa/model/v1/operation.proto b/proto/commons/massa/model/v1/operation.proto index 9f4ab8a..42e811e 100644 --- a/proto/commons/massa/model/v1/operation.proto +++ b/proto/commons/massa/model/v1/operation.proto @@ -18,9 +18,9 @@ option swift_prefix = "MMODEL"; // The operation as sent in the network message Operation { // The fee they have decided for this operation - fixed64 fee = 1; + uint64 fee = 1; // After `expire_period` slot the operation won't be included in a block - fixed64 expire_period = 2; + uint64 expire_period = 2; // The type specific operation part OperationType op = 3; } @@ -46,19 +46,19 @@ message Transaction { // Recipient address string recipient_address = 1; // Amount - fixed64 amount = 2; + uint64 amount = 2; } // The sender buys `roll_count` rolls. Roll price is defined in configuration message RollBuy { // Roll count - fixed64 roll_count = 1; + uint64 roll_count = 1; } // The sender sells `roll_count` rolls. Roll price is defined in configuration message RollSell { // Roll count - fixed64 roll_count = 1; + uint64 roll_count = 1; } // Execute a smart contract @@ -66,9 +66,9 @@ message ExecuteSC { // Smart contract bytecode. bytes data = 1; // The maximum of coins that could be spent by the operation sender - fixed64 max_coins = 2; + uint64 max_coins = 2; // The maximum amount of gas that the execution of the contract is allowed to cost - fixed64 max_gas = 3; + uint64 max_gas = 3; // A key-value store associating a hash to arbitrary bytes repeated BytesMapFieldEntry datastore = 4; } @@ -82,9 +82,9 @@ message CallSC { // Parameter to pass to the target function bytes param = 3; // The maximum amount of gas that the execution of the contract is allowed to cost - fixed64 max_gas = 4; + uint64 max_gas = 4; // Extra coins that are spent from the caller's balance and transferred to the target - fixed64 coins = 5; + uint64 coins = 5; } // Signed operation @@ -100,7 +100,7 @@ message SignedOperation { // A secure hash of the data. See also [massa_hash::Hash] string id = 5; // The size of the serialized operation - fixed64 serialized_size = 6; + uint64 serialized_size = 6; } // Possible statuses for an operation @@ -120,7 +120,7 @@ message OperationWrapper { // The IDs of the blocks in which the operation appears repeated string block_ids = 3; // The thread in which the operation can be included - fixed32 thread = 5; + uint32 thread = 5; // The operation object itself SignedOperation operation = 6; // The execution statuses of the operation diff --git a/proto/commons/massa/model/v1/slot.proto b/proto/commons/massa/model/v1/slot.proto index 8ef2248..01541f2 100644 --- a/proto/commons/massa/model/v1/slot.proto +++ b/proto/commons/massa/model/v1/slot.proto @@ -18,13 +18,13 @@ message IndexedSlot { // Slot Slot slot = 1; // Endorsement index in the slot - fixed64 index = 2; + uint64 index = 2; } // A point in time where a block is expected message Slot { // Period - fixed64 period = 1; + uint64 period = 1; // Thread - fixed32 thread = 2; + uint32 thread = 2; } diff --git a/proto/commons/massa/model/v1/stats.proto b/proto/commons/massa/model/v1/stats.proto index 3e89d49..9396597 100644 --- a/proto/commons/massa/model/v1/stats.proto +++ b/proto/commons/massa/model/v1/stats.proto @@ -18,49 +18,49 @@ option swift_prefix = "MMODEL"; // Consensus stats message ConsensusStats { // start of the time span for stats - fixed64 start_timespan = 1; + uint64 start_timespan = 1; // end of the time span for stats - fixed64 end_timespan = 2; + uint64 end_timespan = 2; // number of final blocks - fixed64 final_block_count = 3; + uint64 final_block_count = 3; // number of stale blocks in memory - fixed64 stale_block_count = 4; + uint64 stale_block_count = 4; // number of actives cliques - fixed64 clique_count = 5; + uint64 clique_count = 5; } // Pool stats message PoolStats { // Endorsements - fixed64 endorsements_count = 1; + uint64 endorsements_count = 1; // Operations - fixed64 operations_count = 2; + uint64 operations_count = 2; } // Network stats message NetworkStats { // in connections count - fixed64 in_connection_count = 1; + uint64 in_connection_count = 1; // out connections count - fixed64 out_connection_count = 2; + uint64 out_connection_count = 2; // total known peers count - fixed64 known_peer_count = 3; + uint64 known_peer_count = 3; // banned node count - fixed64 banned_peer_count = 4; + uint64 banned_peer_count = 4; // active node count - fixed64 active_node_count = 5; + uint64 active_node_count = 5; } // Execution stats message ExecutionStats { // time window start - fixed64 time_window_start = 1; + uint64 time_window_start = 1; // time window end - fixed64 time_window_end = 2; + uint64 time_window_end = 2; // number of final blocks in the time window - fixed64 final_block_count = 3; + uint64 final_block_count = 3; // number of final executed operations in the time window - fixed64 final_executed_operations_count = 4; + uint64 final_executed_operations_count = 4; // active execution cursor slot massa.model.v1.Slot active_cursor = 5; } diff --git a/proto/commons/massa/model/v1/time.proto b/proto/commons/massa/model/v1/time.proto index 177c5f5..bd8ae96 100644 --- a/proto/commons/massa/model/v1/time.proto +++ b/proto/commons/massa/model/v1/time.proto @@ -16,5 +16,5 @@ option swift_prefix = "MMODEL"; // NativeTime represents a native duration or unix timestamp message NativeTime { // Milliseconds - fixed64 milliseconds = 1; + uint64 milliseconds = 1; } diff --git a/proto/commons/massa/model/v1/versioning.proto b/proto/commons/massa/model/v1/versioning.proto index 2ba72ee..0c440f0 100644 --- a/proto/commons/massa/model/v1/versioning.proto +++ b/proto/commons/massa/model/v1/versioning.proto @@ -26,13 +26,13 @@ message MipInfo { // MIP name or descriptive name string name = 1; // Network (or global) version (to be included in block header) - fixed32 version = 2; + uint32 version = 2; // A timestamp at which the version gains its meaning (e.g. announced in block header) - fixed64 start = 3; + uint64 start = 3; // A timestamp at the which the deployment is considered failed - fixed64 timeout = 4; + uint64 timeout = 4; // Once deployment has been locked, wait for this duration before deployment is considered active - fixed64 activation_delay = 5; + uint64 activation_delay = 5; // Components concerned by this versioning (e.g. a new Block version), and the associated component_version repeated MipComponentEntry components = 6; } @@ -42,7 +42,7 @@ message MipComponentEntry { // Kind MipComponent kind = 1; // Version - fixed32 version = 2; + uint32 version = 2; } // State machine for a Versioning component that tracks the deployment state