Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase dojo #1

Merged
228 commits merged into from
Jan 23, 2024
Merged

Rebase dojo #1

228 commits merged into from
Jan 23, 2024

Conversation

remiroyc
Copy link

No description provided.

kariy and others added 30 commits November 15, 2023 19:03
* fix(sozo): change priority order when fetching rpc url

* add tests
* Execute tx thru iterator

* update
* Add page info field with dummy data to conneciton object

* query page info

* Enable metadata feature for torii

* Add page info field to connection object

* Fix page info query

* [WIP] Nullable page info

* Return page info even for limit/offset based pagination
* Update plugin to pull dojo from repo

* Set preceise
* core: delete entity models

* test: delete entity

* chore: pass layout to delete

* chore: fix manifest test

* Fix records contract address

---------

Co-authored-by: Tarrence van As <[email protected]>
* core: upgradeable component wip

* #[dojo::contract] merge Event, update upgradeable

* update base_test.cairo & dojo-lang plugin_test_data

* add Upgraded event in upgradeable component

* move erc20, fix build issue, delete old tests

* update erc20 to use #[dojo::contract]

* revert changes on erc20

* revert changes on erc20

* fully qualify component

* handle when Event is not defined in contract

* follow clippy recomandation

* torii: update records_contract address

* trigger CI

* trigger CI

* rebase main

* update manifest_test_data

* use right records_contract address
Don't listen on all IP addresses when testing
* Refactor torii grpc

* error freeeee!

* Refactor torii grpc

* rebase changes

* clean up

* Move model to individual query clause

* Refactor subscription argument to keys

* Add Torii grpc retrieve entities endpoint

* Add cache to store schema ty and query

* map rows to proto model

* add grpc limit offset

* refactor query logic

* clippy & fmt

* remove unused

* fix tests

* move limit offset to query clause

---------

Co-authored-by: Tarrence van As <[email protected]>
* Basic migration

* add primative data types and enum

* fmt

* Clean fn model_fixtures(), clean/refactor susbcription_tests
* make world upgradeable

* update records_contract address
JunichiSugiura and others added 29 commits January 9, 2024 21:37
* replace compiled class hash with class hash

* replace old address
* tests: refactor and add new tests

* tests: add tests for options/account

* fix: typo

* refactor(sozo): AccountOptions doesn't require `account_address` while specifying `private_key` to be consistent with `keystore`

* fix: formatting

* fix: remove unnecessary TODO

* fix: formatting
)

* feat(sozo/account): legacy bool flag to use old calldata encoding

* feat(sozo/account): legacy bool flag to use old calldata encoding

* fix: make suggested improvements
… stderr (#1427)

* feat(katana): write katana logs to tempdir and print log file path to stderr

* fix: typo and formatting
…1424)

* fix: ensure local manifest and remote manifest are compared with the same models name

* add test

---------

Co-authored-by: Kariy <[email protected]>
feat: add ensure_abi method into model generated contract
* Refactor torii cli to use SocketAddr cli args

* Remove unused dojo-lang dep from dojo-world
* Update dojo example

* Update dojo v0.5.0

* docs: minor fixes on new address

---------

Co-authored-by: glihm <[email protected]>
* feat: add more info on model deserialization fail

* fix: fix cairo tests

* fix: use trait path function call instead of prelude

* fix: fix cairo tests

* fix tests

* fix test
* skeleton for deriving print for enum

* print enum variant names

* add example enum to plugin_test_data

* cargo fmt

* remove unecessary derives

* add core and comma

* fix tests

* fix tests

* remove class hash changes

* revert Cargo.lock

* fix tests

* use OptionTypeClause

* fix: ensure print is expanded under test cfg

---------

Co-authored-by: glihm <[email protected]>
* feat: add first version of plugin-like integration for bindgen

* feat: add unity backend template

* refacto: move the BackendBuilder trait into backends module

* docs: adjust function docs

* fix: rename all to plugin for clarity

* docs: update README

* docs: fix typos

* fix: ensure only dojo contracts are excluded from bindgen

* feat: add DojoMetadata with info about models

* fix: use hashmap instead of vec for models in metadata

* fix: run cairo test fix

* fix: remove unused model

* docs: fix docs

* tests: add tests

* fix: bump cainome and work on tests

* tests: fix tests

* tests: ensure correct path for test file

* feat: add ensure_abi method into model generated contract

* feat: add generate_models_bindings setup for builtin plugins

* fix: improve code parsing and plugin API

* feat: identify systems and use new cainome tokenized abi

* tests: fix building with dojo-test-utils + fix tests

* fix: clean example to have correct class hash

* fix: fix tests

* chore: bump cainome to 0.2.2 to fix composite details in functions

* fix: comment out testing until stack error on windows is investigated
Refer to #1456 for full context.

The new timeout value has been chosen arbitrarily, I just thought it seems reasonable enough.
Resolves #1448

Creates new crate under `katana`, `katana-tasks`, for managing spawning blocking tasks. RPC calls that mostly perform blocking tasks are now sent to their designated threadpools and won't block the async threads.

- `TokioTaskSpawner`: mainly for spawning blocking IO-bound tasks (ie reading from storage)
- `BlockingThreadPool`: mainly for spawning expensive CPU-bound tasks

Depends on #1455 because now the RPC requests (that used to block the thread before) have to wait for the blocking tasks to finish and thus may be idling for more than 2 seconds which will result in a connection timeout.

Doing `sozo migrate` on 2s timeout will failed when calling `/esimateFee` for estimating the World contract declare tx with error `connection closed before message completed`.

Raw error message from `sozo` against the new changes:
```console
Caused by:
    Failed to deploy world: Failed to migrate world: Migrator(Provider(Other(TransportError(Reqwest(reqwest::Error { kind: Request, url: Url { scheme: "http", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("localhost")), port: Some(5050), path: "/", query: None, fragment: None }, source: hyper::Error(IncompleteMessage) })))))
```
@remiroyc remiroyc closed this pull request by merging all changes into ArkProjectNFTs:main in 3620d72 Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.