- Integrate protocol version 7 cost semantics.
- The
ContractInvokeSuccess
andContractInvokeError
have additional fields that record where parts of the energy was allocated during execution. - Add support for loading the contract under test with the
module_load_output
function. The module path is exposed bycargo-concordium
through theCARGO_CONCORDIUM_TEST_MODULE_OUTPUT_PATH
environment variable. - Updated the Concordium Rust SDK to support the changes introduced in protocol 7.
- Add support for querying the module reference and contract name of an instance. This functionality is only available on-chain from protocol version 7.
- Bump minimum supported Rust version (MSRV) to
1.73
.
- Fix a bug in debug output. The events emitted before some contract queries
(such as querying account balance) were not emitted in the debug output. To
fix this,
DebugTraceElement
gets a new variantDebug
to retain these events.
- Add support for debug output when running smart contracts. This adds a new
module_deploy_v1_debug
method to theChain
that allows debug symbols in the deployed module. - Add
DebugInfoExt
trait that has convenience methods for printing debug information. - Add
debug_trace
field toDebugTraceElement
variants. This records both any information emitted by theconcordium_dbg!
macro ofconcordium-std
as well as the trace of all the host function calls that occurred. - Add
is_debug_enabled
function to detect whether tests are being run in debug mode or not. This function uses theCARGO_CONCORDIUM_TEST_ALLOW_DEBUG
environment variable that is set bycargo-concordium
when running in debug mode.
- Bump minimum supported Rust version to
1.67
. - Re-export
AccountKeys
.
- Add functionality for setting the exchange rates and block time of the chain based on queries from an external node.
- Configured via a builder pattern, see
Chain::builder
.
- Configured via a builder pattern, see
- Add methods to
Chain
:external_query_block
to get the default block used for external queriesblock_time
to get the block timetick_block_time
to increase the block time by aDuration
- Add the following types by re-exporting them from internal crates:
BlockHash
Timestamp
whichSlotTime
is an alias of.Duration
Endpoint
- Add methods to the
Chain
for adding external accounts and contracts and for invoking contracts on an external node.- See the
Chain
methodcontract_invoke_external
for more details.
- See the
- Add helper method
parse_return_value
toContractInvokeError
andContractInvokeSuccess
. - Bump minimum supported Rust version to
1.66
.
- Support protocol 6 semantics, in particular validation assumes protocol 6 semantics now, allowing sign extension instructions and new operations for querying account's public keys, and checking signatures with account's keys.
- Add
AccountSignatures
structure. - Add an
AccountAccessStructure
to theAccount
structure. This is a breaking change. Extend the constructors ofAccount
to allow constructing accounts with this access structure.
- Include
ContractTraceElement
s for failed contract executions, including internal failures.- Introduce the enum
DebugTraceElement
, which has information about trace elements, including failed ones and the cause of error, and the energy usage. - On the
ContractInvokeSuccess
type:- Change the type of the
trace_elements
field to beVec<DebugTraceElement>
instead ofVec<ContractTraceElement>
. (breaking change) - Add a helper method,
effective_trace_elements()
, to retrieve the "effective" trace elements, i.e., elements that were not rolled back.- These are the elements that were previously returned in the
trace_elements
field. - There is also a version of the method which clones:
effective_trace_elements_cloned()
.
- These are the elements that were previously returned in the
- To migrate existing code, replace
some_update.trace_elements
withsome_update.effective_trace_elements_cloned()
. - Add a helper method,
rollbacks_occurred()
, to determine whether any internal failures or rollbacks occurred.
- Change the type of the
- On the
ContractInvokeError
type:- Include the field
trace_elements
of typeVec<DebugTraceElements>
with the trace elements that were hitherto discarded. (breaking change) - To migrate, include the new field or use
..
when pattern matching on the type.
- Include the field
- Introduce the enum
- The initial release of the library.