Transaction
Transactions in the Concordium blockchain can be any of the following three:
Account Creation¶
Whenever a user uses one of the various Concordium Wallets to create a new account, an account_creation transaction is added to a block.
Details of an account creation. These transactions are free, and we only ever get a response for them if the account is created, hence no failure cases.
GRPC documentation: concordium.v2.AccountCreationDetails
Attributes:
| Name | Type | Description |
|---|---|---|
credential_type |
CredentialType
|
Whether this is an initial or normal account. |
address |
CCD_AccountAddress
|
Address of the newly created account. |
reg_id |
CCD_CredentialRegistrationId
|
Credential registration ID of the first credential. |
Source code in .venv/lib/python3.13/site-packages/ccdexplorer/grpc_client/CCD_Types/__init__.py
1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 | |
Account Transaction¶
These are user initiated transactions and paid for by the sender. Account transactions can have the following types:
Effects of an account transaction. All variants except None correspond to a unique transaction that was successful.
GRPC documentation: concordium.v2.AccountTransactionEffects
Attributes:
| Name | Type | Description |
|---|---|---|
none |
Optional[CCD_AccountTransactionEffects_None]
|
No effects other than payment from this transaction. |
module_deployed |
Optional[CCD_ModuleRef]
|
A smart contract module with the attached reference was deployed. |
contract_initialized |
Optional[CCD_ContractInitializedEvent]
|
A smart contract was initialized. |
contract_update_issued |
Optional[CCD_ContractUpdateIssued]
|
A smart contract instance update was issued. |
account_transfer |
Optional[CCD_AccountTransfer]
|
A simple account to account transfer occurred. |
baker_added |
Optional[CCD_BakerAdded]
|
A validator was added. |
baker_removed |
Optional[CCD_BakerId]
|
A validator was removed. |
baker_stake_updated |
Optional[CCD_BakerStakeUpdated]
|
A validator's stake was updated. |
baker_restake_earnings_updated |
Optional[CCD_BakerEvent_BakerRestakeEarningsUpdated]
|
A validator's restake earnings setting was updated. |
baker_keys_updated |
Optional[CCD_BakerKeysEvent]
|
A validator's keys were updated. |
encrypted_amount_transferred |
Optional[CCD_AccountTransactionEffects_EncryptedAmountTransferred]
|
An encrypted amount was transferred. |
transferred_to_encrypted |
Optional[CCD_EncryptedSelfAmountAddedEvent]
|
An account transferred part of its public balance to its encrypted balance. |
transferred_to_public |
Optional[CCD_AccountTransactionEffects_TransferredToPublic]
|
An account transferred part of its encrypted balance to its public balance. |
transferred_with_schedule |
Optional[CCD_TransferredWithSchedule]
|
A transfer with a release schedule was made. |
credential_keys_updated |
Optional[CCD_CredentialRegistrationId]
|
Keys of a specific credential were updated. |
credentials_updated |
Optional[CCD_AccountTransactionEffects_CredentialsUpdated]
|
Account credentials were updated. |
data_registered |
Optional[CCD_RegisteredData]
|
Some data was registered on the chain. |
baker_configured |
Optional[CCD_BakerConfigured]
|
A validator was configured. |
delegation_configured |
Optional[CCD_DelegationConfigured]
|
A delegator was configured. |
Source code in .venv/lib/python3.13/site-packages/ccdexplorer/grpc_client/CCD_Types/__init__.py
1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 | |
Note that for account transactions, we try to add a recognized_sender_id to each transaction. This value is retrieved from projects.json. If a match is made, the project_id is stored as recognized_sender_id.
Update¶
Update transactions are performed by the chain itself. The following payloads are possible:
The payload of a chain update.
GRPC documentation: concordium.v2.UpdatePayload
Attributes:
| Name | Type | Description |
|---|---|---|
protocol_update |
Optional[CCD_ProtocolUpdate]
|
The protocol version was updated. |
election_difficulty_update |
Optional[CCD_ElectionDifficulty]
|
The election difficulty was updated. |
euro_per_energy_update |
Optional[CCD_ExchangeRate]
|
The euro per energy exchange rate was updated. |
micro_ccd_per_euro_update |
Optional[CCD_ExchangeRate]
|
The microCCD per euro exchange rate was updated. |
foundation_account_update |
Optional[CCD_AccountAddress]
|
The foundation account address was updated. |
mint_distribution_update |
Optional[CCD_MintDistributionCpv0]
|
The mint distribution was updated (protocol version 1-3). |
transaction_fee_distribution_update |
Optional[CCD_TransactionFeeDistribution]
|
The transaction fee distribution was updated. |
gas_rewards_update |
Optional[CCD_GasRewards]
|
The gas rewards were updated (protocol version 1-5). |
baker_stake_threshold_update |
Optional[CCD_BakerStakeThreshold]
|
The minimum amount of CCD needed to become a validator was updated. |
root_update |
Optional[CCD_RootUpdate]
|
The root keys were updated. |
level_1_update |
Optional[CCD_Level1Update]
|
The level 1 keys were updated. |
add_anonymity_revoker_update |
Optional[CCD_ArInfo]
|
An anonymity revoker was added. |
add_identity_provider_update |
Optional[CCD_IpInfo]
|
An identity provider was added. |
cooldown_parameters_cpv_1_update |
Optional[CCD_CooldownParametersCpv1]
|
The cooldown parameters were updated. |
pool_parameters_cpv_1_update |
Optional[CCD_PoolParametersCpv1]
|
The pool parameters were updated. |
time_parameters_cpv_1_update |
Optional[CCD_TimeParametersCpv1]
|
The time parameters were updated. |
mint_distribution_cpv_1_update |
Optional[CCD_MintDistributionCpv1]
|
The mint distribution was updated (protocol version 4+). |
gas_rewards_cpv_2_update |
Optional[CCD_GasRewardsCpv2]
|
The gas rewards were updated (protocol version 6+). |
timeout_parameters_update |
Optional[CCD_TimeoutParameters]
|
The consensus timeouts were updated. |
min_block_time_update |
Optional[CCD_Duration]
|
The minimum time between blocks was updated. |
block_energy_limit_update |
Optional[CCD_Energy]
|
The block energy limit was updated. |
finalization_committee_parameters_update |
Optional[CCD_FinalizationCommitteeParameters]
|
The finalization committee parameters were updated. |
validator_score_parameters_update |
Optional[CCD_ValidatorScoreParameters]
|
The validator score parameters were updated. |
Source code in .venv/lib/python3.13/site-packages/ccdexplorer/grpc_client/CCD_Types/__init__.py
2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 | |
How is a transaction stored in the system?¶
In the heartbeat service, all new transactions are parsed and stored in the db.