Rust full node implementation of the Fuel v2 protocol.
OTHER License
Bot releases are visible (Hide)
BlobId
is known.min-gas-price
as a starting point if start-gas-price
is zero.cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/2050
min-gas-price
as a starting point if start-gas-price
is zero by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/2060
BlobId
is known by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/2067
Full Changelog: https://github.com/FuelLabs/fuel-core/compare/v0.32.0...v0.32.1
Published by MitchTurner 2 months ago
Added
ContractsAssets
and ContractsState
for the production mode of the fuel-core
. The SMT still is used in benchmarks and tests.fuel-vm
to 0.56.0
(release notes). Adds Blob transaction support.cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/2029
cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/2039
ContractsAssets
and ContractsState
by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/2048
Full Changelog: https://github.com/FuelLabs/fuel-core/compare/v0.31.0...v0.32.0
Published by xgreenx 3 months ago
continue-services-on-error
to control internal flow of services.AtomicView::latest_view
.AlgorithmUpdater
for GasPriceService
AlgorithmV1
and AlgorithmUpdaterV1
for the gas price. Include tools for analysisgraphql-max-depth
graphql-max-complexity
graphql-max-recursive-depth
lost
folder.Checked
transactions. This change fixes that by tracking the version that was used to validate the transactions.RELAYER-V2-LISTENING-CONTRACTS
env variable using a ,
delimiter.Transaction
to relayer 's event filterfuel-vm
to 0.55.0
release. More about the change here.1MB
. The limit can be changed by the graphql-request-body-bytes-limit
CLI argument.Database
for atomic view.HistoricalView
trait from the AtomicView
.fuel-core-client
is incompatible with the old fuel-core
because of two requested new fields.api-request-timeout
to be 30s
.20000
. It is ~50 blocks per request with transaction IDs and ~2-5 full blocks.publish-crates
action by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1986
cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1985
HistoricalView
trait from the AtomicView
by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1989
ReadView
for mutate queries by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1990
Database
for atomic view by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1991
AtomicView::latest_view
by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1994
cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1998
fuel-vm
to 0.55.0
by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/2012
fuel-gas-price-algorithm
crate by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/2024
Full Changelog: https://github.com/FuelLabs/fuel-core/compare/v0.30.0...v0.31.0
Published by xgreenx 4 months ago
DependentCost
benchmarks for the cfe
and cfei
opcodes.DependentCost
for the cfe
opcode to the GasCosts
endpoint.InMemoryTransaction
for lookups and empty insertion.GasCosts
endpoint to return DependentCost
for the cfei
opcode via cfeiDependentCost
.fuel-vm 0.54.0
. More information in the release.creation_instant
as second sort key in tx pool. by @AurelienFT in https://github.com/FuelLabs/fuel-core/pull/1964
InMemoryTransaction
for lookups and empty insertion by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1974
cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1976
fuel-vm 0.54.0
by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1975
Full Changelog: https://github.com/FuelLabs/fuel-core/compare/v0.29.0...v0.30.0
Published by xgreenx 4 months ago
FuelGasPriceProvider
that receives the gas price algorithm from a GasPriceService
BlockHeight
encoding in SortedTXCursor
cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1949
Full Changelog: https://github.com/FuelLabs/fuel-core/compare/v0.28.0...v0.29.0
Published by xgreenx 4 months ago
aloc
opcode to be DependentCost
. Updated vm_initialization
benchmark to exclude growing of memory(It is handled by VM reuse).fuel-core-sync
service.GasCosts
endpoint to return DependentCost
for the aloc
opcode via alocDependentCost
.dry_run_opt
has new gas_price: Option<u64>
argumentfuel-vm
to 0.51.0
. See release for more information.ChainConfig
.gossipsub_broadcast_tx_with_accept
test.cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1928
ChainConfig
by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1929
gas_price
argument to dry_run_opt
by @hal3e in https://github.com/FuelLabs/fuel-core/pull/1924
fuel-core-sync
service by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1916
gossipsub_broadcast_tx_with_accept
test by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1921
DependentCost
for aloc
opcode by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1934
Full Changelog: https://github.com/FuelLabs/fuel-core/compare/v0.27.0...v0.28.0
Published by xgreenx 5 months ago
Executor::VERSION
on each release.cli::snapshot::Command
members public such that clients can create and execute snapshot commands programmatically. This enables snapshot execution in external programs, such as the regenesis test suite.FuelBlockMerkleData
and FuelBlockMerkleMetadata
in the off-chain table. These tables are checked when querying message proofs.Block
in validation codeCROO
opcode. Also include consensus parameters in bench output.discovery_works
test.version
field to the Block
and BlockHeader
GraphQL entities. Added corresponding version
field to the Block
and BlockHeader
client types in fuel-core-client
.ExecutionKind
and ExecutionType
, remove thread_block_transaction
concept, remove PartialBlockComponent
type, refactor away inner
functions.fuel-core run
no longer has --chain
as an option. It has been replaced by --snapshot
.fuel-vm
upgraded to 0.50.0
. More information in the changelog.croo
opcode benchmark to depend on the contract size by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1876
discovery_works
test by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1879
cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1880
Block
in validation by @MitchTurner in https://github.com/FuelLabs/fuel-core/pull/1886
cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1893
cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1903
Executor::VERSION
on each release by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1898
fuel-vm
to 0.50.0
by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1910
Full Changelog: https://github.com/FuelLabs/fuel-core/compare/v0.26.0...v0.27.0
Published by xgreenx 6 months ago
event_inbox_root
in the header hash. Changed types of the transactions_count
to u16
and message_receipt_count
to u32
instead of u64
. Updated the application hash root calculation to not pad numbers.block
endpoint to return fetch the blocks from both databases after regenesis.Union
with Enum
for GraphQL definitions of ConsensusParametersVersion
and related types. This is needed because Union
does not support multiple Version
s inside discriminants or empty variants.0.25.3
.InMemoryTransaction
.FuelBlockIdsToHeights
off-chain table.Block
. Remove Validation
variant of ExecutionKind
.cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1850
Enum
for ConsensusParametersVersion
and related types by @bvrooman in https://github.com/FuelLabs/fuel-core/pull/1856
cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1869
block
endpoint to return fetch the blocks from both databases after regenesis by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1871
BlockHeader
hash by @MitchTurner in https://github.com/FuelLabs/fuel-core/pull/1868
0.25.3
by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1870
Full Changelog: https://github.com/FuelLabs/fuel-core/compare/v0.25.3...v0.26.0
Published by bvrooman 6 months ago
Full Changelog: https://github.com/FuelLabs/fuel-core/compare/v0.25.2...v0.25.3
Published by bvrooman 6 months ago
Full Changelog: https://github.com/FuelLabs/fuel-core/compare/v0.24.2...v0.24.3
Published by xgreenx 6 months ago
fuel-core 0.25.1
release.rustls::ConnectionCommon::complete_io
could fall into an infinite loop based on networkfuel-core 0.25.0
release.iter_all_by_prefix
was not working for all tables. The change adds a Rust
level filtering.TransactionStatus
./health
endpoint.SpentMessages
and ProcessedTransactions
.wasm32-unknown-unknown
target.ConsensusParameters
from the databaseChainConfig
. It guarantees the state transition's availability for the network's first blocks.The state transition bytecode lies in its own file(state_transition_bytecode.wasm
) along with the chain config file. The ChainConfig
loads it automatically when ChainConfig::load
is called and pushes it back when ChainConfig::write
is called.
The fuel-core
release bundle also contains the fuel-core-wasm-executor.wasm
file of the corresponding executor version.
The regenesis process now considers the last block produced by the previous network. When we create a (re)genesis block of a new network, it has the height = last_block_of_old_netowkr + 1
. It continues the old network and doesn't overlap blocks(before, we had old_block.height == new_genesis_block.hegiht
).
Along with the new block height, the regenesis process also increases the state transition bytecode and consensus parameters versions. It guarantees that a new network doesn't use values from the previous network and allows us not to migrate StateTransitionBytecodeVersions
and ConsensusParametersVersions
tables.
Added a new CLI argument, native-executor-version,
that allows overriding of the default version of the native executor. It can be useful for side rollups that have their own history of executor upgrades.
Replaced:
let file = std::fs::File::open(path)?;
let mut snapshot: Self = serde_json::from_reader(&file)?;
with a:
let mut json = String::new();
std::fs::File::open(&path)
.with_context(|| format!("Could not open snapshot file: {path:?}"))?
.read_to_string(&mut json)?;
let mut snapshot: Self = serde_json::from_str(json.as_str())?;
because it is 100 times faster for big JSON files.
Updated all tests to use Config::local_node_*
instead of working with the SnapshotReader
directly. It is the preparation of the tests for the futures bumps of the Executor::VERSION
. When we increase the version, all tests continue to use GenesisBlock.state_transition_bytecode = 0
while the version is different, which forces the usage of the WASM executor, while for tests, we still prefer to test native execution. The Config::local_node_*
handles it and forces the executor to use the native version.
Reworked the build.rs
file of the upgradable executor. The script now caches WASM bytecode to avoid recompilation. Also, fixed the issue with outdated WASM bytecode. The script reacts on any modifications of the fuel-core-wasm-executor
and forces recompilation (it is why we need the cache), so WASM bytecode always is actual now.
Create
transaction from debugger since it doesn't have any script to execute.fuel-vm 0.49.0
with new transactions types - Upgrade
and Upload
. Also added max_bytecode_subsections
field to the ConsensusParameters
to limit the number of bytecode subsections in the state transition bytecode.wasm32-unknown-unknown
target.iter_all_by_prefix
was not working for all tables by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1814
/health
endpoint by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1813
ConsensusParameters
from the database by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1809
fuel-vm 0.49.0
with new transactions types by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1822
TransactionStatus
by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1831
SpentMessages
and ProcessedTransactions
by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1833
fuel-core 0.25.0
by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1840
RUSTSEC-2024-0336
by @MitchTurner in https://github.com/FuelLabs/fuel-core/pull/1842
fuel-core 0.25.1
by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1844
Full Changelog: https://github.com/FuelLabs/fuel-core/compare/v0.24.2...v0.25.2
Published by xgreenx 7 months ago
fuel-core-wasm-executor
to work outside of the fuel-core
context. The change uses the path to the manifest file of the fuel-core-upgradable-executor
to build the fuel-core-wasm-executor
instead of relying on the workspace.cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1794
fuel-core-upgradable-executor
build script by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1795
Full Changelog: https://github.com/FuelLabs/fuel-core/compare/v0.24.1...v0.24.2
Published by xgreenx 7 months ago
fuel-core
now requires a wasm32-unknown-unknown
target to build.ApplicationHeader
to describe what was used to produce this block.ProducerGasPrice
trait that the Producer
depends on to get the gas price for the block.schema.sdl
from fuel-core-client
.#1771: Contract 'states' and 'balances' brought back into ContractConfig
. Parquet now writes a file per table.
1779: Modify Relayer service to order Events from L1 by block index
#1783: The PR upgrade fuel-vm
to 0.48.0
release. Because of some breaking changes, we also adapted our codebase to follow them:
Default
for configs was moved under the test-helpers
feature. The fuel-core
binary uses testnet configuration instead of Default::default
(for cases when ChainConfig
was not provided by the user).version
, that can be used to decide how to deserialize.UtxoId
type now is 34 bytes instead of 33. It affects hex representation and requires adding 00
.block_gas_limit
was moved to ConsensusParameters
from ChainConfig
. It means the block producer doesn't specify the block gas limit anymore, and we don't need to propagate this information.bytecodeLength
field is removed from the Create
transaction.ConsensusParameters
from executor config because ConsensusParameters::default
is not available anymore. Instead, executors fetch ConsensusParameters
from the database.#1769: Include new field on header for the merkle root of imported events. Rename other message root field.
#1768: Moved ContractsInfo
table to the off-chain database. Removed salt
field from the ContractConfig
.
#1761: Adjustments to the upcoming testnet configs:
#1694: The change moves the database transaction logic from the fuel-core
to the fuel-core-storage
level. The corresponding issue described the reason behind it.
The change splits the KeyValueStore
into KeyValueInspect
and KeyValueMutate
, as well the Blueprint
into BlueprintInspect
and BlueprintMutate
. It allows requiring less restricted constraints for any read-related operations.
One of the main ideas of the change is to allow for the actual storage only to implement KeyValueInspect
and Modifiable
without the KeyValueMutate
. It simplifies work with the databases and provides a safe way of interacting with them (Modification into the database can only go through the Modifiable::commit_changes
). This feature is used to track the height of each database during commits and even limit how commits are done, providing additional safety. This part of the change was done as a separate commit.
The StorageTransaction
is a StructuredStorage
that uses InMemoryTransaction
inside to accumulate modifications. Only InMemoryTransaction
has a real implementation of the KeyValueMutate
(Other types only implement it in tests).
The implementation of the Modifiable
for the Database
contains a business logic that provides additional safety but limits the usage of the database. The Database
now tracks its height and is responsible for its updates. In the commit_changes
function, it analyzes the changes that were done and tries to find a new height(For example, in the case of the OnChain
database, we are looking for a new Block
in the FuelBlocks
table).
As was planned in the issue, now the executor has full control over how commits to the storage are done.
All mutation methods now require &mut self
- exclusive ownership over the object to be able to write into it. It almost negates the chance of concurrent modification of the storage, but it is still possible since the Database
implements the Clone
trait. To be sure that we don't corrupt the state of the database, the commit_changes
function implements additional safety checks to be sure that we commit updates per each height only once time.
Side changes:
drop
function was moved from Database
to RocksDB
as a preparation for the state rewind since the read view should also keep the drop function until it is destroyed.StatisticTable
table lives in the off-chain worker.Database
from the dap::ConcreteStorage
since it is already available from the VM.Changes
instead of the storage transaction, which simplifies the interaction between modules and port definition.fuel-core-storage
crate and is now reusable. It provides an interator
method that duplicates the logic from MemoryStore
on iterating over the BTreeMap
and methods like iter_all
, iter_all_by_prefix
, etc. It was done in a separate revivable commit.MemoryTransactionView
is fully replaced by the StorageTransactionInner
.flush
method from the Database
since it is not needed after https://github.com/FuelLabs/fuel-core/pull/1664.#1693: The change separates the initial chain state from the chain config and stores them in separate files when generating a snapshot. The state snapshot can be generated in a new format where parquet is used for compression and indexing while postcard is used for encoding. This enables importing in a stream like fashion which reduces memory requirements. Json encoding is still supported to enable easy manual setup. However, parquet is prefered for large state files.
The CLI was expanded to allow customizing the used encoding. Snapshots are now generated along with a metadata file describing the encoding used. The metadata file contains encoding details as well as the location of additional files inside the snapshot directory containing the actual data. The chain config is always generated in the JSON format.
The snapshot command now has the '--output-directory' for specifying where to save the snapshot.
The run command now includes the 'db_prune' flag which when provided will prune the existing db and start genesis from the provided snapshot metadata file or the local testnet configuration.
The snapshot metadata file contains paths to the chain config file and files containing chain state items (coins, messages, contracts, contract states, and balances), which are loaded via streaming.
Each item group in the genesis process is handled by a separate worker, allowing for parallel loading. Workers stream file contents in batches.
A database transaction is committed every time an item group is succesfully loaded. Resumability is achieved by recording the last loaded group index within the same db tx. If loading is aborted, the remaining workers are shutdown. Upon restart, workers resume from the last processed group.
Using uniform-sized batches may result in batches containing items from multiple contracts. Optimal performance can presumably be achieved by selecting a batch size that typically encompasses an entire contract's state or balance, allowing for immediate initialization of relevant Merkle trees.
protobuf
from everywhere since libp2p
uses quick-protobuf
.schema.sdl
add some helper types and traits by @Dentosal in https://github.com/FuelLabs/fuel-core/pull/1731
cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1745
0.22.4
by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1748
StorageTransaction
to the fuel-core-storage
crate by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1694
protobuf
from everywhere since libp2p
uses quick-protobuf
by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1757
cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1758
ApplicationHeader
by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1767
ContractsInfo
table to the off-chain database by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1768
lazy_static
from teh codebase by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1781
fuel-vm 0.48.0
by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1783
fuel-core-bin
crate by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1792
Full Changelog: https://github.com/FuelLabs/fuel-core/compare/v0.23.0...v0.24.1
Published by xgreenx 7 months ago
TxPool
level.
--tx-blacklist-addresses <TX_BLACKLIST_ADDRESSES>
The list of banned addresses ignored by the `TxPool`
[env: TX_BLACKLIST_ADDRESSES=]
--tx-blacklist-coins <TX_BLACKLIST_COINS>
The list of banned coins ignored by the `TxPool`
[env: TX_BLACKLIST_COINS=]
--tx-blacklist-messages <TX_BLACKLIST_MESSAGES>
The list of banned messages ignored by the `TxPool`
[env: TX_BLACKLIST_MESSAGES=]
--tx-blacklist-contracts <TX_BLACKLIST_CONTRACTS>
The list of banned contracts ignored by the `TxPool`
[env: TX_BLACKLIST_CONTRACTS=]
TxPool
by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1743
Full Changelog: https://github.com/FuelLabs/fuel-core/compare/v0.22.3...v0.22.4
Published by Dentosal 8 months ago
Full Changelog: https://github.com/FuelLabs/fuel-core/compare/v0.22.2...v0.22.3
Published by xgreenx 8 months ago
schema.sdl
file from fuel-core-client
. The user can create his own queries by using this file.schema.sdl
file by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1729
0.22.2
by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1730
Full Changelog: https://github.com/FuelLabs/fuel-core/compare/v0.22.1...v0.22.2
Published by xgreenx 8 months ago
impl
of traits StorageWrite
and StorageRead
for StructuredStorage
. Tables that use a Blueprint
can be read and written using these interfaces provided by structured storage types.Merklized
blueprint that maintains the binary Merkle tree over the storage data. It supports only the insertion of the objects without removing them.ContractsInfo
table from fuel-vm
to on-chain tables, and created version-able ContractsInfoType
to act as the table's data type.ContractsInfo
table.fuel-vm
0.46.0.FuelBlockIdsToHeights
is moved to the off-chain worker.Receipts
table. Instead, receipts are part of the TransactionStatuses
table.AtomicView
in all services for consistent results.libp2p
modulesAtomicView
in the TxPool
to read the state of the database during insertion of the transactions.BlockHeight
as a primary key for the FuelsBlock
table.NetworkBehaviour
macro generate FuelBehaviorEvent
in p2pBlockImporter
instead of the executor.cargo doc
passes in the CI.#1725: All API endpoints now are prefixed with /v1
version. New usage looks like: /v1/playground
, /v1/graphql
, /v1/graphql-sub
, /v1/metrics
, /v1/health
.
#1722: Bugfix: Zero predicate_gas_used
field during validation of the produced block.
#1714: The change bumps the fuel-vm
to 0.47.1
. It breaks several breaking changes into the protocol:
Transaction
doesn't define the gas price anymore. The gas price is defined by the block producer and recorded in the Mint
transaction at the end of the block. A price of future blocks can be fetched through a new API nedopoint and the price of the last block can be fetch or via the block or another API endpoint.GasPrice
policy is replaced with the Tip
policy. The user may specify in the native tokens how much he wants to pay the block producer to include his transaction in the block. It is the prioritization mechanism to incentivize the block producer to include users transactions earlier.MaxFee
policy is mandatory to set. Without it, the transaction pool will reject the transaction. Since the block producer defines the gas price, the only way to control how much user agreed to pay can be done only through this policy.maturity
field is removed from the Input::Coin
. The same affect can be achieve with the Maturity
policy on the transaction and predicate. This changes breaks how input coin is created and removes the passing of this argument.Checked<Tx>
doesn't contain max_fee
and min_fee
anymore. Only max_gas
and min_gas
. The max_fee
is controlled by the user via the MaxFee
policy.impl
of traits StorageWrite
and StorageRead
for StructuredStorage
. Tables that use a Blueprint
can be read and written using these interfaces provided by structured storage types.#1712: Make ContractUtxoInfo
type a version-able enum for use in the ContractsLatestUtxo
table.
#1657: Changed CROO
gas price type from Word
to DependentGasPrice
. The dependent gas price values are dummy values while awaiting updated benchmarks.
#1671: The GraphQL API uses block height instead of the block id where it is possible. The transaction status contains block_height
instead of the block_id
.
#1675: Simplify GQL schema by disabling contract resolvers in most cases, and just return a ContractId scalar instead.
#1658: Receipts are part of the transaction status.
Removed reason
from the TransactionExecutionResult::Failed
. It can be calculated based on the program state and receipts.
Also, it is not possible to fetch receipts
from the Transaction
directly anymore. Instead, you need to fetch status
and its receipts.
#1646: Remove redundant receipts from queries.
#1639: Make Merkle metadata, i.e. SparseMerkleMetadata
and DenseMerkleMetadata
type version-able enums
#1632: Make Message
type a version-able enum
#1631: Modify api endpoint to dry run multiple transactions.
#1629: Use a separate database for each data domain. Each database has its own folder where data is stored.
#1628: Make CompressedCoin
type a version-able enum
#1616: Make BlockHeader
type a version-able enum
#1614: Use the default consensus key regardless of trigger mode. The change is breaking because it removes the --dev-keys
argument. If the debug
flag is set, the default consensus key will be used, regardless of the trigger mode.
#1596: Make Consensus
type a version-able enum
#1593: Make Block
type a version-able enum
#1576: The change moves the implementation of the storage traits for required tables from fuel-core
to fuel-core-storage
crate. The change also adds a more flexible configuration of the encoding/decoding per the table and allows the implementation of specific behaviors for the table in a much easier way. It unifies the encoding between database, SMTs, and iteration, preventing mismatching bytes representation on the Rust type system level. Plus, it increases the re-usage of the code by applying the same blueprint to other tables.
It is a breaking PR because it changes database encoding/decoding for some tables.
The change adds a new type StructuredStorage
. It is a wrapper around the key-value storage that implements the storage traits(StorageInspect
, StorageMutate
, StorageRead
, etc) for the tables with blueprint. This blueprint works in tandem with the TableWithBlueprint
trait. The table may implement TableWithBlueprint
specifying the blueprint, as an example:
impl TableWithBlueprint for ContractsRawCode {
type Blueprint = Plain<Raw, Raw>;
fn column() -> Column {
Column::ContractsRawCode
}
}
It is a definition of the blueprint for the ContractsRawCode
table. It has a plain blueprint meaning it simply encodes/decodes bytes and stores/loads them into/from the storage. As a key codec and value codec, it uses a Raw
encoding/decoding that simplifies writing bytes and loads them back into the memory without applying any serialization or deserialization algorithm.
If the table implements TableWithBlueprint
and the selected codec satisfies all blueprint requirements, the corresponding storage traits for that table are implemented on the StructuredStorage
type.
Each blueprint allows customizing the key and value codecs. It allows the use of different codecs for different tables, taking into account the complexity and weight of the data and providing a way of more optimal implementation.
That property may be very useful to perform migration in a more easier way. Plus, it also can be a no_std
migration potentially allowing its fraud proving.
An example of migration:
/// Define the table for V1 value encoding/decoding.
impl TableWithBlueprint for ContractsRawCodeV1 {
type Blueprint = Plain<Raw, Raw>;
fn column() -> Column {
Column::ContractsRawCode
}
}
/// Define the table for V2 value encoding/decoding.
/// It uses `Postcard` codec for the value instead of `Raw` codec.
///
/// # Dev-note: The columns is the same.
impl TableWithBlueprint for ContractsRawCodeV2 {
type Blueprint = Plain<Raw, Postcard>;
fn column() -> Column {
Column::ContractsRawCode
}
}
fn migration(storage: &mut Database) {
let mut iter = storage.iter_all::<ContractsRawCodeV1>(None);
while let Ok((key, value)) = iter.next() {
// Insert into the same table but with another codec.
storage.storage::<ContractsRawCodeV2>().insert(key, value);
}
}
The blueprint of the table defines its behavior. As an example, a Plain
blueprint simply encodes/decodes bytes and stores/loads them into/from the storage. The SMT
blueprint builds a sparse merkle tree on top of the key-value pairs.
Implementing a blueprint one time, we can apply it to any table satisfying the requirements of this blueprint. It increases the re-usage of the code and minimizes duplication.
It can be useful if we decide to create global roots for all required tables that are used in fraud proving.
impl TableWithBlueprint for SpentMessages {
type Blueprint = Plain<Raw, Postcard>;
fn column() -> Column {
Column::SpentMessages
}
}
|
|
\|/
impl TableWithBlueprint for SpentMessages {
type Blueprint =
Sparse<Raw, Postcard, SpentMessagesMerkleMetadata, SpentMessagesMerkleNodes>;
fn column() -> Column {
Column::SpentMessages
}
}
iter_all
The iter_all
functionality now accepts the table instead of K
and V
generics. It is done to use the correct codec during deserialization. Also, the table definition provides the column.
The fuel-core-storage
crate provides macros that generate unit tests. Almost all tables had the same test like get
, insert
, remove
, exist
. All duplicated tests were moved to macros. The unique one still stays at the same place where it was before.
StorageBatchMutate
Added a new StorageBatchMutate
trait that we can move to fuel-storage
crate later. It allows batch operations on the storage. It may be more performant in some cases.
#1573: Remove nested p2p request/response encoding. Only breaks p2p networking compatibility with older fuel-core versions, but is otherwise fully internal.
cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1557
KeyValueStore
trait by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1559
KeyValueStore
to the fuel-core-storage
crate by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1566
libp2p
from 0.50.0
to 0.53.1
by @MitchTurner in https://github.com/FuelLabs/fuel-core/pull/1379
cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1575
cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1578
BlockImporter
instead of the executor by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1577
NetworkBehaviour
macro generate FuelBehaviorEvent
in p2p by @MitchTurner in https://github.com/FuelLabs/fuel-core/pull/1585
cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1588
Block
versionable by @MitchTurner in https://github.com/FuelLabs/fuel-core/pull/1593
cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1599
fuel-core-storage
crate by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1576
BlockHeight
as a primary key for the FuelsBlock
table by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1587
AtomicView
in the TxPool
by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1590
cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1611
Consensus
version-able by @MitchTurner in https://github.com/FuelLabs/fuel-core/pull/1596
BlockHeader
a versionable enum by @MitchTurner in https://github.com/FuelLabs/fuel-core/pull/1616
AtomicView
in all services by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1612
cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1634
Message
by @bvrooman in https://github.com/FuelLabs/fuel-core/pull/1632
cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1644
cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1655
0.22.1
release by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1665
cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1682
FuelBlockSecondaryKeyBlockHeights
table to an off-chain worker by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1671
cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1707
ContractInfo
table and versionable ContractInfoType
to on-chain storage by @bvrooman in https://github.com/FuelLabs/fuel-core/pull/1657
ContractUtxoInfo
for the ContractsLatestUtxo
table by @bvrooman in https://github.com/FuelLabs/fuel-core/pull/1712
cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1719
fuel-vm
dep to 0.47.1 by @MitchTurner in https://github.com/FuelLabs/fuel-core/pull/1714
utxo_validation
fails by @bvrooman in https://github.com/FuelLabs/fuel-core/pull/1717
predicate_gas_used
field during validation of the produced block by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1722
0.23.0
by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1728
Full Changelog: https://github.com/FuelLabs/fuel-core/compare/v0.22.0...v0.23.0
Published by xgreenx 8 months ago
Full Changelog: https://github.com/FuelLabs/fuel-core/compare/v0.22.0...v0.22.1
Published by Voxelot 10 months ago
This release contains largely internal breaking changes to adjust our database layout of SMT's and a new API to view the status of connected peers. The only major breaking external change is that the peer_count field on the ChainInfo query resolver was removed and migrated to NodeInfo.
--version
command for fuel-core-keygen
binary.Success
or Failure
variant of TransactionStatus
returned by a query now contains the associated receipts generated by transaction execution.fuel-core-executor
no_std
compatible. It affects the fuel-core
crate because it uses the fuel-core-executor
crate. The change is breaking because of moved types.executor
into fuel-core-executor
crate.Full Changelog: https://github.com/FuelLabs/fuel-core/compare/v0.21.0...v0.22.0
Published by bvrooman 11 months ago
fuel-vm
by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1287
_
in CLI long
arguments with -
by @MitchTurner in https://github.com/FuelLabs/fuel-core/pull/1290
enable-relayer
flag to fuel-core
CLI by @bvrooman in https://github.com/FuelLabs/fuel-core/pull/1279
submit_and_await_commit_with_receipts
method by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1304
env
feature by @bvrooman in https://github.com/FuelLabs/fuel-core/pull/1308
webpki
by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1319
debug
CLI flag. by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1322
None
to requester and log error by @MitchTurner in https://github.com/FuelLabs/fuel-core/pull/1342
fuel-vm
to 0.37.0 by @bvrooman in https://github.com/FuelLabs/fuel-core/pull/1338
MessageProof
query by @MitchTurner in https://github.com/FuelLabs/fuel-core/pull/1363
.env
file and duplicated service by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1372
MessageStatus
by @MitchTurner in https://github.com/FuelLabs/fuel-core/pull/1371
base_chain_height
to da_height
and return current relayer height instead of latest Fuel block height by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1374
DiscoveryEvent
and use KademliaEvent
instead by @MitchTurner in https://github.com/FuelLabs/fuel-core/pull/1377
ethers
version to 2
to fix an issue with tungstenite
by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1390
cargo update
weekly by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1415
cargo update
weekly by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1416
cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1417
fuel-core
crates by @bvrooman in https://github.com/FuelLabs/fuel-core/pull/1411
scwq
, swwq
and srwq
opcodes by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1427
cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1438
#1435
to master
by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1440
flush
during end of the FuelService
by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1456
main
to master
by @kayagokalp in https://github.com/FuelLabs/fuel-core/pull/1460
cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1461
DB::repair
breaks the table for checkpoints by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1463
fuel-vm
to v0.40.0
by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1468
cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1471
network
parameter from CLI by @bvrooman in https://github.com/FuelLabs/fuel-core/pull/1484
cargo update
by @github-actions in https://github.com/FuelLabs/fuel-core/pull/1498
vm_initialization
by @xgreenx in https://github.com/FuelLabs/fuel-core/pull/1502
gtf
opcode by @MitchTurner in https://github.com/FuelLabs/fuel-core/pull/1503
Full Changelog: https://github.com/FuelLabs/fuel-core/compare/v0.20.4...v0.21.0