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

D3 Protototype Branch #1

Open
wants to merge 107 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
e955c02
added Reaction type Dislike; updated compose file with necessary para…
vkuts May 16, 2024
5f8da74
Vic's changes
May 24, 2024
c3e98e0
Latest changes
May 28, 2024
b0a444c
More changes
May 28, 2024
21ad34b
Adding new file for future mods
May 29, 2024
c68ee27
Applying Rust changes to add tags
May 29, 2024
bb99af1
Fixes
May 29, 2024
f3d59fc
Typo
May 29, 2024
a747bdc
Fixed type
May 29, 2024
6287920
Fixed JS side
May 29, 2024
0aa5e36
Fixed JS side
May 29, 2024
473d6c0
More TS fixes
May 29, 2024
e5a0557
Building
May 30, 2024
b1fa8f2
Fixing build
May 30, 2024
979df6f
Tag creation
May 30, 2024
06d2605
Making some more exploratory changes
Jun 4, 2024
47d8ac1
Missed file
Jun 4, 2024
baf9ec6
Some TS changes
Jun 5, 2024
8be2457
Progress
Jun 5, 2024
10161aa
Progress
Jun 5, 2024
0fa8f80
Progress
Jun 5, 2024
2a0cffb
Log
Jun 5, 2024
c5ac836
+
Jun 5, 2024
064eed4
fixing a typo in lib.rs for the `getTagsByTarget` method binding
vkuts Jun 13, 2024
2bf531e
fix optional value param for tag querying
jukeboxhero123 Jun 17, 2024
1bb9713
making value param properly optional for the tagsByFid endpoint
vkuts Jun 17, 2024
be0d431
Merge pull request #5 from ConsenSysMesh/jerry-fix-tag-index
vkuts Jul 3, 2024
389e859
adding ObjectBody and TagBody changes to protobuf messages
vkuts Jul 3, 2024
028fcec
fix protobuf
jukeboxhero123 Jul 3, 2024
d5f2d55
Edit protobufs and fix validations in core package
jukeboxhero123 Jul 4, 2024
fc74538
progress on tag work
jukeboxhero123 Jul 5, 2024
188e6b3
some more tag key fixes
jukeboxhero123 Jul 5, 2024
7d65422
Added ObjectAddBody and ObjectRemoveBody msg types; added a couple of…
vkuts Jul 5, 2024
2cc0264
querying tags by target
jukeboxhero123 Jul 8, 2024
c79649c
Added RelationshipAdd and RelationshipRemove types; fixed some missin…
vkuts Jul 9, 2024
819c9c4
adding commands for the new test scripts in hub-nodejs project
vkuts Jul 9, 2024
511663b
make utils for target
jukeboxhero123 Jul 9, 2024
c7e4f57
increase size for object ref keys
jukeboxhero123 Jul 9, 2024
abe047d
Merge pull request #2 from ConsenSysMesh/vic-changes
vkuts Jul 9, 2024
aa645b4
Merge pull request #3 from ConsenSysMesh/vic-rust-changes
vkuts Jul 9, 2024
c6f6de0
Merge pull request #11 from ConsenSysMesh/vic-changes2
vkuts Jul 9, 2024
3ccba03
Merge pull request #4 from ConsenSysMesh/vic-moar-rust
vkuts Jul 9, 2024
cf9d263
Merge pull request #9 from ConsenSysMesh/query-tags-by-target
jukeboxhero123 Jul 9, 2024
6dca1bc
Merge pull request #7 from ConsenSysMesh/new-h2-types-objects
vkuts Jul 9, 2024
0a63459
Merge pull request #10 from ConsenSysMesh/new-h2-types-ships
vkuts Jul 9, 2024
4e56752
updated ObjectRef protobuf definition and validation logic
vkuts Jul 9, 2024
f94a251
fix utils for target + add new script
jukeboxhero123 Jul 10, 2024
a26cfe0
adding the object set postfix into the object_key derivation util
vkuts Jul 10, 2024
6e8b358
query for objects with include tags flag
jukeboxhero123 Jul 11, 2024
c492c9f
comment
jukeboxhero123 Jul 11, 2024
a7a47d4
Simplified the structure of ObjectRef object and updated all relevant…
vkuts Jul 11, 2024
9b74c10
relationship test script querying by source
vkuts Jul 11, 2024
3dc98b1
creator tags only
jukeboxhero123 Jul 11, 2024
fb3845b
fixes for the getRelationshipsBySource call stack (thanks Jerry!)
vkuts Jul 12, 2024
6b08ef8
Merge branch 'new-object-tag-queries' into simple-object-ref
vkuts Jul 12, 2024
84925bf
fixing base branch build issue with old style ObjectRef format
vkuts Jul 12, 2024
605553a
Merge pull request #6 from ConsenSysMesh/new-h2-types
vkuts Jul 12, 2024
efb8e80
Merge pull request #12 from ConsenSysMesh/object-ref-changes
vkuts Jul 12, 2024
8a9df06
Merge pull request #13 from ConsenSysMesh/new-object-tag-queries
vkuts Jul 12, 2024
45b1890
Merge pull request #14 from ConsenSysMesh/simple-object-ref
vkuts Jul 12, 2024
3d9bba9
fixing up object and tag test scripts
vkuts Jul 12, 2024
57301dd
changed getRelationshipsBySource into getRelationshipsByRelatedObject…
vkuts Jul 15, 2024
2c4fadc
cleanup
vkuts Jul 15, 2024
fb76761
add tag querying for object by fid endpoint
jukeboxhero123 Jul 16, 2024
36f7caa
Merge pull request #16 from ConsenSysMesh/add-tags-for-object-by-fid
vkuts Jul 16, 2024
a491ba9
Merge branch 'vlad-changes' into test-rels-by-source-or-target
vkuts Jul 16, 2024
53f5d68
renaming relatedObjectRefType to refDirection to reduce confusion
vkuts Jul 16, 2024
332c0be
Merge pull request #15 from ConsenSysMesh/test-rels-by-source-or-target
vkuts Jul 17, 2024
4e948e9
copy tipster project
jukeboxhero123 Jul 17, 2024
411553b
rename project
jukeboxhero123 Jul 17, 2024
8e1901e
moved rings/next submodule up under apps
vkuts Jul 17, 2024
f7d9d58
started implementing H2 api client; added a script to mint a ring wit…
vkuts Jul 17, 2024
d6b52e2
updated the shape of the store to hold rings domain data
vkuts Jul 19, 2024
7c9f87e
fixed issues with the main page loading routine
vkuts Jul 19, 2024
6be8935
rings of trust UI start
jukeboxhero123 Jul 19, 2024
16e626e
Remove tipster stuff
jukeboxhero123 Jul 19, 2024
f53bef3
remove a bit more tipster stuff
jukeboxhero123 Jul 19, 2024
115d4cf
make worn rings uneditable
jukeboxhero123 Jul 19, 2024
07df816
updated types
vkuts Jul 19, 2024
774fa88
ring-minter script update
vkuts Jul 19, 2024
7cf78e4
ui changes + submit function
jukeboxhero123 Jul 19, 2024
4210c78
implemented updateStone action and hooked it up in RingCard
vkuts Jul 19, 2024
360b4b5
un-hardcode tagsByTarget http endpoint
jukeboxhero123 Jul 20, 2024
ff6588a
fix tag names returning garbage for http endpoints
jukeboxhero123 Jul 22, 2024
0891e3b
put fid selector into context
jukeboxhero123 Jul 22, 2024
eb62108
hooking up updateWearer action
vkuts Jul 22, 2024
957d018
got wearer updates to 'work'
vkuts Jul 22, 2024
c8912a1
add node explorer
jukeboxhero123 Jul 23, 2024
26de257
fix bug on explorer
jukeboxhero123 Jul 23, 2024
6a71977
moved mint-ring script to our app; refactored the script to have reus…
vkuts Jul 23, 2024
8033b3d
Style to make node-explorer look more readable
jukeboxhero123 Jul 24, 2024
0e6779d
wops forgot to delete the existing script under hub-nodejs
vkuts Jul 24, 2024
8fc8581
Merge pull request #22 from ConsenSysMesh/move-mint-ring-script
vkuts Jul 24, 2024
222c75a
Merge pull request #18 from ConsenSysMesh/rings-modules-reorg
vkuts Jul 24, 2024
caf0b93
Merge pull request #19 from ConsenSysMesh/rings-api-client
vkuts Jul 24, 2024
1475e96
Merge pull request #20 from ConsenSysMesh/update-actions
vkuts Jul 24, 2024
9e7c68b
make node explorer window a bit bigger
jukeboxhero123 Jul 24, 2024
f4f6920
Merge remote-tracking branch 'refs/remotes/origin/node-explorer' into…
jukeboxhero123 Jul 24, 2024
417eb59
fix fid-switcher not affecting the node-explorer
jukeboxhero123 Jul 24, 2024
3dd6b1d
fid local storage
jukeboxhero123 Jul 24, 2024
73cc60d
don't try to fetch ring data before useFid effect evaluates
vkuts Jul 24, 2024
147f8b4
fetching both owned and worn rings on page load for the active FID
vkuts Jul 24, 2024
776829a
updated mint-ring script to use .env.development values
vkuts Jul 24, 2024
f2e5065
fixing wearer rel creation
vkuts Jul 24, 2024
c72ec92
Merge pull request #21 from ConsenSysMesh/node-explorer
vkuts Jul 25, 2024
82f3500
Merge pull request #23 from ConsenSysMesh/new-loading-routine
vkuts Jul 25, 2024
9d214e1
Merge pull request #24 from ConsenSysMesh/mint-ring-script-change
vkuts Jul 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
#yarn lint-staged
49 changes: 48 additions & 1 deletion apps/hubble/src/addon/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use db::RocksDB;
use ed25519_dalek::{Signature, Signer, SigningKey, VerifyingKey, EXPANDED_SECRET_KEY_LENGTH};
use neon::{prelude::*, types::buffer::TypedArray};
use std::{convert::TryInto, sync::Mutex};
use store::{LinkStore, ReactionStore, Store, UserDataStore};
use store::{LinkStore, ReactionStore, TagStore, ObjectStore, RelationshipStore, Store, UserDataStore};
use threadpool::ThreadPool;

mod db;
Expand Down Expand Up @@ -171,6 +171,53 @@ fn main(mut cx: ModuleContext) -> NeonResult<()> {
ReactionStore::js_get_reactions_by_target,
)?;

// TagStore methods
cx.export_function("createTagStore", TagStore::create_tag_store)?;
// cx.export_function("getTagAdd", TagStore::js_get_tag_add)?;
// cx.export_function("getTagRemove", TagStore::js_get_tag_remove)?;
cx.export_function(
"getTagAddsByFid",
TagStore::js_get_tag_adds_by_fid,
)?;
cx.export_function(
"getTagRemovesByFid",
TagStore::js_get_tag_removes_by_fid,
)?;
cx.export_function(
"getTagsByTarget",
TagStore::js_get_tags_by_target,
)?;

// ObjectStore methods
cx.export_function("createObjectStore", ObjectStore::create_object_store)?;
cx.export_function("getObjectAdd", ObjectStore::js_get_object_add)?;
cx.export_function("getObjectRemove", ObjectStore::js_get_object_remove)?;
cx.export_function(
"getObjectAddsByFid",
ObjectStore::js_get_object_adds_by_fid,
)?;
cx.export_function(
"getObjectRemovesByFid",
ObjectStore::js_get_object_removes_by_fid,
)?;

// RelationshipStore methods
cx.export_function("createRelationshipStore", RelationshipStore::create_relationship_store)?;
cx.export_function("getRelationshipAdd", RelationshipStore::js_get_relationship_add)?;
cx.export_function("getRelationshipRemove", RelationshipStore::js_get_relationship_remove)?;
cx.export_function(
"getRelationshipAddsByFid",
RelationshipStore::js_get_relationship_adds_by_fid,
)?;
cx.export_function(
"getRelationshipRemovesByFid",
RelationshipStore::js_get_relationship_removes_by_fid,
)?;
cx.export_function(
"getRelationshipsByRelatedObjectRef",
RelationshipStore::js_get_relationships_by_related_object_ref,
)?;

// CastStore methods
cx.export_function("createCastStore", CastStore::js_create_cast_store)?;
cx.export_function("getCastAdd", CastStore::js_get_cast_add)?;
Expand Down
41 changes: 41 additions & 0 deletions apps/hubble/src/addon/src/store/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ pub enum RootPrefix {

/* Used to index fname username proofs by fid */
FNameUserNameProofByFid = 27,

/* Used to index tags by target */
TagsByTarget = 28,

/* Used to index relationships by source and target object refs */
RelationshipsBySource = 29,
RelationshipsByTarget = 30,
}

/** Copied from the JS code */
Expand All @@ -89,6 +96,16 @@ pub enum UserPostfix {
UsernameProofMessage = 7,

// Add new message types here

/* Tag message */
TagMessage = 8,

/* Object message */
ObjectMessage = 9,

/* Relationship message */
RelationshipMessage = 10,

// NOTE: If you add a new message type, make sure that it is only used to store Message protobufs.
// If you need to store an index, use one of the UserPostfix values below (>86).
/** Index records (must be 86-255) */
Expand Down Expand Up @@ -122,6 +139,18 @@ pub enum UserPostfix {

/* Link Compact State set */
LinkCompactStateMessage = 100,

/** TagStore add and remove sets */
TagAdds = 101,
TagRemoves = 102,

/** ObjectStore add and remove sets */
ObjectAdds = 103,
ObjectRemoves = 104,

/** RelationshipStore add and remove sets */
RelationshipAdds = 105,
RelationshipRemoves = 106,
}

impl UserPostfix {
Expand Down Expand Up @@ -183,6 +212,18 @@ pub fn type_to_set_postfix(message_type: MessageType) -> UserPostfix {
return UserPostfix::UsernameProofMessage;
}

if message_type == MessageType::TagAdd || message_type == MessageType::TagRemove {
return UserPostfix::TagMessage;
}

if message_type == MessageType::ObjectAdd || message_type == MessageType::ObjectRemove {
return UserPostfix::ObjectMessage;
}

if message_type == MessageType::RelationshipAdd || message_type == MessageType::RelationshipRemove {
return UserPostfix::RelationshipMessage;
}

panic!("invalid type");
}

Expand Down
9 changes: 9 additions & 0 deletions apps/hubble/src/addon/src/store/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ pub use self::user_data_store::*;
pub use self::username_proof_store::*;
pub use self::utils::*;
pub use self::verification_store::*;
pub use self::tag_store::*;
pub use self::object_store::*;
pub use self::relationship_store::*;

mod cast_store;
mod link_store;
Expand All @@ -20,3 +23,9 @@ mod user_data_store;
mod username_proof_store;
mod utils;
mod verification_store;
mod tag_store;
mod object_store;
mod relationship_store;

#[cfg(test)]
mod store_tests;
Loading