-
Notifications
You must be signed in to change notification settings - Fork 48
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
Implemented writing on-chain accounts details on block applying #294
Merged
Merged
Changes from all commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
b6c529f
feat: add `account_details` table to the DB
polydez ed04d5a
refactor: rename `block_number` column in nullifiers table to `block_…
polydez 4cc4ba8
refactor: use `BETWEEN` in interval comparison checks
polydez 8f0935a
feat: implement account details protobuf messages, domain objects and…
polydez 9f5c832
feat: (WIP) implement account details support
polydez 58dc518
feat: (WIP) implement account details support
polydez ef7a1f7
feat: (WIP) implement account details support
polydez bb31753
feat: (WIP) implement account details support
polydez ac81502
fix: db creation
polydez ab9c457
docs: remove TODO
polydez 31cfd19
refactor: apply formatting
polydez 6560444
feat: implement endpoint for getting public account details
polydez bd7ac74
Merge branch 'next' into polydez-onchain-accounts
polydez be2be66
tests: add test for storage
polydez fbcfd6b
feat: add rpc endpoint for getting account details
polydez 28d44fb
refactor: keep only domain object changes
polydez d344c57
Merge branch 'next' into polydez-onchain-accounts
polydez 618e24e
fix: compilation errors
polydez bd47398
fix: use note tag conversion from `u64`
polydez 42b0c22
refactor: remove account details protobuf messages
polydez bb6e18e
fix: remove unused error invariants
polydez 535797e
refactor: introduce `UpdatedAccount` struct
polydez 3266818
fix: rollback details conversion
polydez fcdc331
fix: compilation error
polydez 6c9b79f
feat: account details in store
polydez 93e792c
refactor: add constraint name for foreign key
polydez 8cc29f5
refactor: small code improvement
polydez 69c516f
feat: account id validation
polydez ed9a200
refactor: rename `get_account_details` to `select_*`
polydez 55a3933
feat: return serialized account details
polydez 1b4d0da
feat: add requirement of account id to be public in RPC
polydez 1e00839
fix: remove error message used in different PR
polydez b790e33
fix: union account details with account and process them together
polydez 85bf4d0
docs: remove `GetAccountDetails` from README.md
polydez f677ce0
fix: remove unused error invariants
polydez 8275a89
fix: use `Account` instead of `AccountDetails` in store
polydez 78f29be
wip
polydez 12a8bb9
Merge branch 'next' into polydez-onchain-accounts-store
polydez 09987a8
Merge branch 'next' into polydez-onchain-accounts-store
polydez 9fc3f60
feat: implement `GetAccountDetails` endpoint
polydez 6463f71
docs: document `GetAccountDetails` endpoint
polydez 1652048
refactor: simplify code, make account details optional
polydez 49f5d12
fix: clippy warning
polydez da0deed
fix: address review comments
polydez fb7d577
fix: update code to the latest miden-base
polydez 1e3e713
Merge branch 'next' into polydez-onchain-accounts-store
polydez 955be92
refactor: little code improvement
polydez dc2a8bc
fix: remove error message used in different PR
polydez df3d2df
fix: compilation errors
polydez 22c89bb
Merge branch 'next' into polydez-onchain-accounts-apply
polydez 328042b
fix: compilation errors, update test
polydez 65caccc
refactor: rename protobuf messages
polydez 6b5c313
docs: update endpoint in README.md
polydez 895b982
tests: get rid of miden-mock dependency
polydez 6aa4819
tests: get rid of winter-rand-utils dependency
polydez d69af1d
refactor: rename `AccountDetailsUpdate` to `AccountUpdateDetails`
polydez bd4355c
feat: check for account hash for new on-chain accounts
polydez 4af5946
Merge branch 'next' into polydez-onchain-accounts-apply
polydez 652905a
formatting: run rustfmt
polydez 609aaef
docs: address review comments
polydez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume that
store.apply_block
encodes theBlock
into a protobuf message. Meaning it doesn't need ownership ofBlock
. If that is the case, I think we should change it to receive a reference, and then here we don't need the copies.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hackaugusto we can't do it simple way because the block needs be disassembled inside
apply_block
:miden-node/block-producer/src/store/mod.rs
Lines 137 to 140 in 8f0935a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The linked code is creating new objects. At first sight it seems none of them require ownership.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks for noticing!