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

On-chain accounts protobuf & domain objects #287

Merged
merged 26 commits into from
Apr 5, 2024
Merged

Conversation

polydez
Copy link
Contributor

@polydez polydez commented Mar 26, 2024

This PR is intended to be 1 of 3 PRs regarding support of on-chain (public) accounts in Miden node. This PR includes only implementation of protobuf and domain objects for on-chain accounts.

@polydez polydez linked an issue Mar 26, 2024 that may be closed by this pull request
@polydez polydez force-pushed the polydez-onchain-accounts branch from 70b3098 to 530ac6e Compare March 29, 2024 07:52
@polydez polydez changed the title On-chain accounts On-chain accounts protobuf & domain objects Mar 29, 2024
@polydez polydez requested review from hackaugusto and bobbinth March 29, 2024 09:49
@polydez polydez marked this pull request as ready for review March 29, 2024 09:50
@polydez polydez force-pushed the polydez-onchain-accounts branch from aa83463 to 28d44fb Compare March 29, 2024 09:55
proto/proto/account.proto Outdated Show resolved Hide resolved
@@ -25,7 +25,7 @@ impl From<(u64, NoteEnvelope)> for note::NoteCreated {
Self {
note_id: Some(note.note_id().into()),
sender: Some(note.metadata().sender().into()),
tag: note.metadata().tag().into(),
tag: u32::from(note.metadata().tag()).into(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should add the missing conversions to miden-base.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eventually (in a different PR), tag here would be u32 as well, right

@polydez polydez requested a review from bobbinth April 3, 2024 12:35
polydez added 4 commits April 5, 2024 10:14
# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	block-producer/src/block.rs
#	block-producer/src/block_builder/mod.rs
#	block-producer/src/test_utils/block.rs
#	block-producer/src/test_utils/proven_tx.rs
#	faucet/Cargo.toml
#	proto/src/errors.rs
#	store/src/state.rs
@polydez polydez force-pushed the polydez-onchain-accounts branch from 26f1756 to 6eafe6e Compare April 5, 2024 07:07
Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you! Let's fix the rustfmt error and merge.

@polydez polydez merged commit bb79cb2 into next Apr 5, 2024
5 checks passed
@polydez polydez deleted the polydez-onchain-accounts branch April 5, 2024 10:12
bobbinth pushed a commit that referenced this pull request Apr 12, 2024
* 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

* format: reformat using rustfmt
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.

3 participants