Appendix
Archive node schema changes
If you are using the Archive Node database directly for your system integrations, then you should understand all the changes that might impact your applications. The most important change is that the balances table in the Berkeley schema will no longer exist. In the new schema, it is replaced with the table accounts_accessed - from an application semantics point of view, the data in accounts_accessed is still the same.
In the Berkeley protocol, accounts can now have the same public key but a different token_id. This means accounts are identified by both their public key and token_id, not just the public key. Consequently, the foreign key for the account in all tables is account_identifier_id instead of public_key_id.
Schema differences
- Removed Types
- The options
create_token,create_account, andmint_tokenshave been removed from the user_command_type enumeration.
- The options
- Indexes Dropped
- We've removed several indexes from tables, this may affect how you search and organize data:
idx_public_keys_ididx_public_keys_valueidx_snarked_ledger_hashes_valueidx_blocks_ididx_blocks_state_hash
- We've removed several indexes from tables, this may affect how you search and organize data:
- Table Removed
- The
balancestable is no longer available.
- The
- New Tables Added
- We've introduced the following new tables:
tokenstoken_symbolsaccount_identifiersvoting_forprotocol_versionsaccounts_accessedaccounts_createdzkapp_commandsblocks_zkapp_commandszkapp_fieldzkapp_field_arrayzkapp_states_nullablezkapp_stateszkapp_action_stateszkapp_eventszkapp_verification_key_hasheszkapp_verification_keyszkapp_permissionszkapp_timing_infozkapp_uriszkapp_updateszkapp_balance_boundszkapp_nonce_boundszkapp_account_preconditionzkapp_accountszkapp_token_id_boundszkapp_length_boundszkapp_amount_boundszkapp_global_slot_boundszkapp_epoch_ledgerzkapp_epoch_datazkapp_network_preconditionzkapp_fee_payer_bodyzkapp_account_update_bodyzkapp_account_updatezkapp_account_update_failures
- We've introduced the following new tables:
- Updated Tables
- The following tables have been updated
timing_infouser_commandsinternal_commandsepoch_datablocksblocks_user_commandsblocks_internal_commands
- The following tables have been updated
Differences per table
timing_info- Removed columns:
tokeninitial_balance
- Removed columns:
user_commands- Removed columns:
fee_tokentoken
- Removed columns:
internal_commands- Removed columns:
token
- Renamed column
command_typetotype
- Removed columns:
epoch_data- Added columns:
total_currencystart_checkpointlock_checkpointepoch_length
- Added columns:
blocks- Added columns:
last_vrf_outputmin_window_densitysub_window_densitiestotal_currencyglobal_slot_since_hard_forkglobal_slot_since_genesisprotocol_version_idproposed_protocol_version_id
- Removed column:
global_slot
- Added columns:
blocks_user_commands- Removed columns:
fee_payer_account_creation_fee_paidreceiver_account_creation_fee_paidcreated_tokenfee_payer_balancesource_balancereceiver_balance
- Added index:
idx_blocks_user_commands_sequence_no
- Removed columns:
blocks_internal_commands- Removed columns:
receiver_account_creation_fee_paidreceiver_balance
- Added indexes:
idx_blocks_internal_commands_sequence_noidx_blocks_internal_commands_secondary_sequence_no
- Removed columns:
Rosetta API new operations
The Berkeley upgrade introduces two new operation types:
zkapp_fee_payer_deczkapp_balance_change