Skip to content

Releases: dojoengine/dojo

v0.7.0-alpha.4

24 May 00:27
aa5b534
Compare
Choose a tag to compare
v0.7.0-alpha.4 Pre-release
Pre-release

⚠️ Breaking changes ⚠️

Before diving into the storage layout in detail, some breaking changes and features:

  1. Models are now defined with an attribute instead of a derive. #[dojo::model]. This will allow in the future to have some additional inputs to this attribute. Example in spawn-and-move.
  2. Before, the models were identified by their name. Now, they are identified by the selector of their name. This breaks the storage slot computation for a model. We will present in a subsequent PR/documentation how backward compatibility can be achieved if it’s still necessary.
  3. Sozo now supports from prefixes to pass a call data: u256, sstr for short string, str for ByteArray. sozo execute --help for details and examples. If you need an other prefix, please don't hesitate to open a PR by implementing the decode trait as shown here or an issue.

Important notes on the storage layout

The book will also be updated once the version is stabilized.

  1. You can now use ByteArray, Array and Option into models as show in the example. The nested level for array is for now 1 dimension (Torii limitation), but will soon be unlocked for arrays with multiple dimensions.
  2. Enumerations can now have variants with different types (including the new supported types).
  3. Introspect is now automatically derived for any struct with the model attributes. However, if you want to have the same behavior as the dojo storage before (all the fields packed sequentially), you should derive IntrospectPacked instead.
  4. At the moment, you can't have a model inside an other model. You should use intermediate structs instead.
  5. Models keys are only primitive type for now. You can’t use a ByteArray, Array or an other structure as key. ByteArray should be unlocked in the future.
  6. In an Option<T>, the inner type T can’t be a tuple. An easy workaround is to use a struct instead.
  7. GraphQL is still in iteration to support any type combination, please report any model that is not indexed by Torii and served correctly with GraphQL schemas. Here are some example of new type query. Tuples are different than array, you must use the index prefixed with _.
# Array<Vec2>
array {
  x
  y
}

# Option<Vec2>
enum {
  # inner type
  Some {
    x
    y  
  }
  option
}

# (u8, Vec2)
tuple {
  _0
  _1 {
    x
    y
  }
}

# ByteArray
bytearray
  1. #1989 will be re-open targeting main to add new sozo commands and give more insights on the storage layout and schema for a model to ensure you can inspect how models are stored precisely.

Targeted features for for the 0.7.0 (which will ends up being the first iteration for 1.0):

  • Cairo 2.6 support (currently only a CI problem to be fixed to ensure correct publication of the releases.
  • New storage layout [1/2] with: Nested structs, Array<T>, ByteArray.
  • New storage layout [2/2] with: Enums rework to fully support custom enumeration without the same type limitation we currently have.
  • Sozo support for constructor / initializer pattern with arguments (#1964)
  • Update of Torii to support the new types + the new storage layout.
  • Starknet foundry for testing
  • Namespaces to register / access models.

What's Changed

  • Remove sozo as a dependency of katana-runner crate by @kariy in #1988
  • Update devcontainer image: v0.7.0-alpha.3 by @tarrencev in #1961
  • [Katana] Allow choosing the class in the genesis file without affecting the actual class hash by @Yogalholic in #1975
  • refactor(katana): replace cursor-based api with by block basis for simplicity by @kariy in #1986
  • Refactor saya to fetch the traces using the new API by @kariy in #1987
  • Add doc comments for L1HandlerTx by @kariy in #1980
  • fix(katana): l1/l2 messaging hash computations by @kariy in #1981
  • feat: new layout support by @Larkooo in #1970
  • Prepare release: v0.7.0-alpha.4 by @tarrencev in #1990

New Contributors

Full Changelog: v0.7.0-alpha.3...v0.7.0-alpha.4

v0.7.0-alpha.3

20 May 13:25
855da31
Compare
Choose a tag to compare
v0.7.0-alpha.3 Pre-release
Pre-release

Notable Changes

  • Remove limitation for the contract byte code max size.
  • Fix class hash computation while deploying on public network with upgrade of starknet-rs version.
  • Adjust starknet RPC version checks to ensure sozo can deploy on public network with backward compatible versions.

Targeted features for for the 0.7.0 (which will ends up being the first iteration for 1.0):

  • Cairo 2.6 support (currently only a CI problem to be fixed to ensure correct publication of the releases.
  • New storage layout [1/2] with: Nested structs, Array<T>, ByteArray.
  • New storage layout [2/2] with: Enums rework to fully support custom enumeration without the same type limitation we currently have.
  • Sozo support for constructor / initializer pattern with arguments (#1964)
  • Update of Torii to support the new types + the new storage layout. (#1970)
  • Starknet foundry for testing
  • Namespaces to register / access models.

What's Changed

  • bump alloy to 0.7.2 by @tcoratger in #1962
  • fix(sozo/katana): remove max_bytecode_size limitation by @lambda-0x in #1963
  • dev: general cleanup, bumping of library versions, etc... by @lambda-0x in #1939
  • Remove forge-std submodule in katana by @ZaK3939 in #1974
  • chore: ensure Cargo.lock is committed by @glihm in #1976
  • fix: add more logic on semver check of Starknet API by @glihm in #1966
  • chore(katana): ignore forked backend thread spawn test by @kariy in #1977
  • test(katana): provider test utils by @kariy in #1967
  • refactor(katana): encapsulate all the tx execution logic into a single function by @kariy in #1968
  • Add simple benchmark for the transact function by @kariy in #1969
  • fix(sozo): handle edge case when base_class_hash is FieldElement::ZERO by @lambda-0x in #1978
  • display contract addresses in sozo migrate plan by @stevencartavia in #1926
  • Prepare release: v0.7.0-alpha.3 by @tarrencev in #1979

New Contributors

Full Changelog: v0.7.0-alpha.2...v0.7.0-alpha.3

v0.7.0-alpha.2

14 May 15:29
f648e87
Compare
Choose a tag to compare
v0.7.0-alpha.2 Pre-release
Pre-release

What's Changed

  • Fix katana multiple origins arg by @broody in #1937
  • feat(sozo): print-env subcommand by @lambda-0x in #1930
  • Simplify readme, add contextual warnings to dojoup by @tarrencev in #1938
  • Update devcontainer image: e95f86f by @tarrencev in #1922
  • Handle scarb install in dojoup by @tarrencev in #1940
  • chore(katana): clean up txn hash test by @kariy in #1941
  • refactor(katana): remove ContractInfoProvider by @kariy in #1943
  • Refactor forked provider backend APIs by @kariy in #1944
  • test(katana): ensure contract non-existent is validated properly on StateProvider::nonce() of forked provider by @kariy in #1947
  • fix(katana): include full fee info in primitive receipts by @kariy in #1948
  • feat(torii-graphql): add In and Like comparison operators by @Larkooo in #1949
  • dev(sozo): use TransationOption instead of FeeOption by @lambda-0x in #1927
  • Prepare release: v0.7.0-alpha.2 by @tarrencev in #1959

Full Changelog: v0.7.0-alpha.1...v0.7.0-alpha.2

v0.7.0-alpha.1

06 May 23:03
Compare
Choose a tag to compare
v0.7.0-alpha.1 Pre-release
Pre-release

Notable changes

  1. Cairo 2.6.3 is now the default version for Dojo.
  2. Torii supports indexing pending blocks with --index-pending flag.
  3. Torii and Katana by default do not add a CORS layer. You should enable it by passing --allowed-origins "*" for instance to explicitly add this CORS layer accordingly.
  4. Sozo now attempts to automatically grant the writer permissions to all the models that are declared into the writes entry of an overlay manifest file. The overlay manifest file will be firstly described here and should have a dedicated section soon with all the functionalities that will depend on it.

Targeted features for for the 0.7.0 (which will ends up being the first iteration for 1.0):

  • Cairo 2.6 support (currently only a CI problem to be fixed to ensure correct publication of the releases.
  • New storage layout [1/2] with: Nested structs, Array<T>, ByteArray.
  • New storage layout [2/2] with: Enums rework to fully support custom enumeration without the same type limitation we currently have.
  • Update of Torii to support the new types + the new storage layout.
  • Namespaces to register / access models.
  • Sozo support for constructor / initializer pattern with arguments.
  • Torii upgradeability of models.

What's Changed

Read more

v0.7.0-alpha.0

01 May 05:10
2b2dc1b
Compare
Choose a tag to compare
v0.7.0-alpha.0 Pre-release
Pre-release

What's Changed

  • Display default values for EnvironmentOptions in katana cli by @notV4l in #1861
  • docs(katana): update DB er diagram by @kariy in #1874
  • Bump alloy to 0.7.0 by @tcoratger in #1881
  • fix: event message subscription subscription broker by @Larkooo in #1885
  • feat(torii): process pending block by @Larkooo in #1798
  • fix(katana): invalid nonce values set in error by @Eikix in #1890
  • fix: ensure account defaults to block pending by @glihm in #1891
  • CI: add workflow_dispatch for devcontainer.yml by @glihm in #1882
  • refactor(torii): don't use feature-only type in non-feature code by @kariy in #1894
  • Fix dojoup script when installing from git by @kariy in #1895
  • Torii external-url arg to support https by @broody in #1898
  • fix(katana): place import inside its feature scope by @kariy in #1902
  • fix(torii): fallback invalid events & flag indexing pending blocks by @Larkooo in #1897
  • [sozo] add trace logs by @btirth in #1867
  • fix: allow ref self until sozo can handle starknet contracts by @glihm in #1879
  • feat: cli arg disable cors torii proxy server by @Larkooo in #1904
  • Prepare release: v0.7.0-alpha.0 by @tarrencev in #1905

New Contributors

Full Changelog: v0.6.1-alpha.4...v0.7.0-alpha.0

Important fixes:

  1. Torii should index correctly the pending block. There's a flag to toggle this feature.
  2. Katana has now a new DB version, which is not compatible with the 0.6.1-x version ⚠️ BREAKING ⚠️
  3. ref self can now be used in some edge cases for dojo contracts, as a temporary solution until sozo can manage starknet contracts (TBD).

Targeted features for for the 0.7.0 (which will ends up being the first iteration for 1.0):

  • Cairo 2.6 support (currently only a CI problem to be fixed to ensure correct publication of the releases.
  • New storage layout [1/2] with: Nested structs, Array<T>, ByteArray.
  • New storage layout [2/2] with: Enums rework to fully support custom enumeration without the same type limitation we currently have.
  • Update of Torii to support the new types + the new storage layout.
  • Namespaces to register / access models.
  • Sozo support for constructor / initializer pattern with arguments.
  • Torii upgradeability of models.

The 0.7.0 will be a version of iterations to reach the 1.0. The target date is end of May 24 for the 1.0.

Notes

About the versioning, we used to not stick to semver before the 1.0. This change to 0.7.0 was mostly to clearly remark the breaking changes at all the stack level, with the new Cairo version, Katana database changes and dojo core modifications.
After the 1.0 will be out, the semver rules will be more strictly applied to the dojo versioning.

v0.6.1-alpha.4

24 Apr 23:55
5ac6659
Compare
Choose a tag to compare
v0.6.1-alpha.4 Pre-release
Pre-release

What's Changed

  • [sozo] Deploy Account by @JimmyFate in #1601
  • fix(ci): exit with non-zero status code if any function call fails by @lambda-0x in #1853
  • fix: ensure transaction executions are stored with fork and db providers by @glihm in #1852
  • feat(torii-client): expose grpc event messages by @Larkooo in #1826
  • Replace block_time: None by default by @tcoratger in #1858
  • fix(katana): wrong from_address value taken from the transaction trace by @kariy in #1862
  • test(katana-executor): test tx execution info conversion by @kariy in #1863
  • test(katana-executor): test events/messages are extracted correctly from tx execution info by @kariy in #1864
  • fix: messaging tutorial data by @glihm in #1869
  • feat: add raw max fee to TransactionsOptions by @princeibs in #1856
  • Bump katana database version by @kariy in #1833
  • feat: spawn event message subscription service by @Larkooo in #1876
  • feat: enable global flag for all commands/options by @lambda-0x in #1875
  • refactor(sozo): migration logic to be more robust and testable by @lambda-0x in #1848
  • Prepare release: v0.6.1-alpha.4 by @tarrencev in #1872

New Contributors

Full Changelog: v0.6.1-alpha.3...v0.6.1-alpha.4

v0.6.1-alpha.3

19 Apr 02:40
a2412b3
Compare
Choose a tag to compare
v0.6.1-alpha.3 Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: v0.6.0...v0.6.1-alpha.3

v0.6.1-alpha.2

19 Apr 01:26
dbad879
Compare
Choose a tag to compare
v0.6.1-alpha.2 Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: v0.6.0...v0.6.1-alpha.2

v0.6.1-alpha.1

12 Apr 16:42
9a814ad
Compare
Choose a tag to compare
v0.6.1-alpha.1 Pre-release
Pre-release

What's Changed

  • fix: ensure events command picks the correct manifests path for ABIs by @glihm in #1777
  • style(katana-db): standardize naming for historical tables by @kariy in #1773
  • refactor(katana-db): convert StorageChangeSet into a normal table by @kariy in #1774
  • test(katana-db): ensure key/value types implement their respective traits by @kariy in #1776
  • feat(katana-db): integer set using roaring bitmap by @kariy in #1775
  • feat: add verification of the RPC version by @glihm in #1782
  • fix(messaging): update latestBlock to pending by @ybensacq in #1743
  • fix: split_u256 by @greged93 in #1793
  • chore(katana): use deps from workspace by @kariy in #1795
  • fix: add the transaction options to sozo migrate apply by @glihm in #1802
  • Prepare release: v0.6.1-alpha.0 by @tarrencev in #1803
  • fix(grpc): queries by @Larkooo in #1779
  • Saya New Inputs by @neotheprogramist in #1757
  • ci: bump codecov to latest version and CI fail on upload fail by @glihm in #1805
  • Info trace outputs txn hash as hex by @broody in #1809
  • Move class artifacts out of katana-primitives by @kariy in #1813
  • Add account with simple __execute__ entrypoint for testing by @kariy in #1814
  • fix: incorrect assumption about migration output by @lambda-0x in #1790
  • feat: add metadata section to the world contract manifest by @glihm in #1781
  • feat(katana): add executor metrics by @kariy in #1791
  • katana: update grafana dashboard with execution metrics by @kariy in #1818
  • Prepare release: v0.6.1-alpha.1 by @tarrencev in #1824
  • Strip version v prefix with release-dispatch by @tarrencev in #1825

New Contributors

Full Changelog: v0.6.0...v0.6.1-alpha.1

v0.6.1-alpha.0

09 Apr 12:44
f4c47ba
Compare
Choose a tag to compare
v0.6.1-alpha.0 Pre-release
Pre-release

What's Changed

  • fix: ensure events command picks the correct manifests path for ABIs by @glihm in #1777
  • style(katana-db): standardize naming for historical tables by @kariy in #1773
  • refactor(katana-db): convert StorageChangeSet into a normal table by @kariy in #1774
  • test(katana-db): ensure key/value types implement their respective traits by @kariy in #1776
  • feat(katana-db): integer set using roaring bitmap by @kariy in #1775
  • feat: add verification of the RPC version by @glihm in #1782
  • fix(messaging): update latestBlock to pending by @ybensacq in #1743
  • fix: split_u256 by @greged93 in #1793
  • chore(katana): use deps from workspace by @kariy in #1795
  • fix: add the transaction options to sozo migrate apply by @glihm in #1802
  • Prepare release: v0.6.1-alpha.0 by @tarrencev in #1803

New Contributors

Full Changelog: v0.6.0...v0.6.1-alpha.0