-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented writing on-chain accounts details on block applying (#294)
* feat: add `account_details` table to the DB * refactor: rename `block_number` column in nullifiers table to `block_num` * refactor: use `BETWEEN` in interval comparison checks * feat: implement account details protobuf messages, domain objects and conversions * feat: (WIP) implement account details support * feat: (WIP) implement account details support * feat: (WIP) implement account details support * feat: (WIP) implement account details support * fix: db creation * docs: remove TODO * refactor: apply formatting * feat: implement endpoint for getting public account details * tests: add test for storage * feat: add rpc endpoint for getting account details * refactor: keep only domain object changes * fix: compilation errors * fix: use note tag conversion from `u64` * refactor: remove account details protobuf messages * fix: remove unused error invariants * refactor: introduce `UpdatedAccount` struct * fix: rollback details conversion * fix: compilation error * feat: account details in store * refactor: add constraint name for foreign key * refactor: small code improvement Co-authored-by: Augusto Hack <hack.augusto@gmail.com> * feat: account id validation * refactor: rename `get_account_details` to `select_*` * feat: return serialized account details * feat: add requirement of account id to be public in RPC * fix: remove error message used in different PR * fix: union account details with account and process them together * docs: remove `GetAccountDetails` from README.md * fix: remove unused error invariants * fix: use `Account` instead of `AccountDetails` in store * wip * feat: implement `GetAccountDetails` endpoint * docs: document `GetAccountDetails` endpoint * refactor: simplify code, make account details optional * fix: clippy warning * fix: address review comments * fix: update code to the latest miden-base * refactor: little code improvement * fix: remove error message used in different PR * fix: compilation errors chore: update `miden-base` dependency to fixed version refactor: extract `apply_delta` function fix: separate error invariant for missed details in store fix: make account details optional refactor: introduce `UpdatedAccount` struct fix: avoid cloning of block data feat: simple details validation in store feat: rewrite `sql::upsert_accounts` to simplified work with details and update test fix: compilation errors feat: use serialized account details feat: writing account details on block applying * fix: compilation errors, update test * refactor: rename protobuf messages * docs: update endpoint in README.md * tests: get rid of miden-mock dependency * tests: get rid of winter-rand-utils dependency * refactor: rename `AccountDetailsUpdate` to `AccountUpdateDetails` * feat: check for account hash for new on-chain accounts * formatting: run rustfmt * docs: address review comments --------- Co-authored-by: Augusto Hack <hack.augusto@gmail.com>
- Loading branch information
Showing
27 changed files
with
415 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.