Skip to content

Commit

Permalink
Merge branch 'dev' into feat(core)/solidify-api-and-diff
Browse files Browse the repository at this point in the history
  • Loading branch information
tensor-programming authored Sep 18, 2020
2 parents 375e245 + 718f12f commit c46d9bc
Show file tree
Hide file tree
Showing 49 changed files with 2,012 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
branches:
- main
- dev
paths-ignore:
- 'docs/**'

jobs:
clippy:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
branches:
- main
- dev
paths-ignore:
- 'docs/**'

jobs:
format:
Expand Down
61 changes: 61 additions & 0 deletions docs/meeting-notes/2020-09-02.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# 🗓️ Team Identity Meeting Notes - 2020-09-02

## 👥 Participants
- @Thoralf-M
- @nothingismagick
- @l1h3r
- @tensor-programming
- @JelleMillenaar
- @huhn511

## 💬 Discussion topics
- Standup
- Diffing Format/Logic
- DID Fragments
- Hash function
- DID Messages
- DIDComm presentation (next week)


## Standup

### What was last week's progress on your project?
- prepared DIDComm presentation
- Resolver (Metadata, DID Dereferncing)
- Adds structures for representing Verifiable Credentials and Presentations

### What will be the project's focus this week?
- Start to implement DIDComm
- DID explainer presentation
- Refactor resolver code and add better error handling
- Finish DID Dereferncing
- Sign credentials

## Diffing Format/Logic
- Should we use serde-diff or our own lib? @JelleMillenaar expressed concerns about the size of the diff JSON; a home built lib would give us more control over such things.

## DID Fragments

Question: How to check the format? Is there a standard for [fragments](https://www.w3.org/TR/did-core/#fragment)?

There are different format of fragments, to get a public key.
- keys-1 (https://w3c-ccg.github.io/did-resolution/#example-5)
- public-key-1 (https://www.w3.org/TR/did-core/#example-11)


Answer: The fragment `keys-1` sould be a name (or key) for the connected value.
- The fragment names should be unique.
- Each fragment need to have an name/key

Question: Do we check for name uniqueness and throw an error?

Answer: It's complicated. Let's discuss this in the next meeting or add an whitboard meeting. ([issue here](https://github.com/iotaledger/identity.rs/issues/29))

## Hash function
Which hash function do we use for the DID itself?
- Blake2b
- What are the advantages and disadvantages to use Blake2b?
- -> Ask Thibault

## DID Messages
- more information and comments about DID Messagees are documented in the GoodleDocs document.
48 changes: 48 additions & 0 deletions docs/meeting-notes/2020-09-09.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 🗓️ Team Identity Meeting Notes - 2020-09-09

## 👥 Participants
- @Thoralf-M
- @nothingismagick
- @tensor-programming
- @JelleMillenaar
- @l1h3r

## 💬 Discussion topics
- Standup
- Fragment Name Uniqueness
- Working Group participation
- LD Proof Scope: Merkle Tree
- Questions
- Account required data and module implementation

### Standup

#### What was last week's progress on your project?
- Worked on a library for handling LD Proofs and credential verfication (PR open). Looked at DIDcomm
- Worked on the Proc macro for the Diff library - almost finished.
- Dereferencing part for the resolver + resolver itself
- Started writing the MethodSpec for W3C. Researched DIDcomm enviroment. Looking at DID Auth + NOISE.
- Discovered existing DIDComm Spec and add facts to presentation.


#### What will be the project's focus this week?
- Continue with the resolver-
- finish debugging the proc macro and move on to the account module.
- Continue MethodSpec. Kickstart P2P Comms Layer.
- Add some `jsonwebtoken`-based signature suites and look at SIOP DID-
- Start to write DIDComm as Spec and in Code for experimental purposes-

### Fragment Name Uniqueness
Question: Do we check for name uniqueness and throw an error?
([issue here](https://github.com/iotaledger/identity.rs/issues/29))
- Figure out when a fragment reference is legal
- Add a function to check if all fragments are unique
- Execute function when adding a new object to a DID Document
- Leave additional checks up to the implementer (Call the function manually)

### Questions
Q: Can our current Proof implementation handle extra logic such as putting the data through a merkle tree?
A: Yes

Q: Can we run our signature logic within Stronghold?
A: Most likely without too much hassle.
6 changes: 4 additions & 2 deletions docs/meeting-notes/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Meeting Notes

## Next Meeting
Wednesday, 2020-08-17 - 17:00 to 18:00 (CEST)
- [Preview](https://github.com/iotaledger/identity.rs/pull/13)
Wednesday, 2020-09-16 - 17:00 to 18:00 (CEST)

## Past Meetings
- [2020-09-09](./2020-09-09.md)
- [2020-09-02](./2020-09-02.md)
- [2020-08-19](./2020-08-19.md)
- [2020-08-12](./2020-08-12.md)
- [2020-08-07](./2020-08-07.md)
- [2020-08-05](./2020-08-05.md)
Expand Down
22 changes: 18 additions & 4 deletions docs/meeting-notes/_template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 🗓️ Team Identity Meeting Notes - 2020-xx-xx
# 🗓️ Team Identity Meeting Notes - 2020-09-09

## 👥 Participants
- @Thoralf-M
Expand All @@ -7,14 +7,28 @@
- @tensor-programming
- @JelleMillenaar
- @huhn511

- @l1h3r

## 💬 Discussion topics
- Standup
- Questions
-



### Standup

#### What was last week's progress on your project?
-
-

## 🎯 Goals
-

#### What will be the project's focus this week?
-
-
-

### Questions

Q:
A:
4 changes: 4 additions & 0 deletions identity_core/src/common.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
mod macros;
mod object;
mod one_or_many;
mod timestamp;
mod uri;
mod value;

pub use object::Object;
pub use one_or_many::OneOrMany;
pub use timestamp::Timestamp;
pub use uri::Uri;
pub use value::Value;
69 changes: 67 additions & 2 deletions identity_core/src/common/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ macro_rules! object {
}

// create a line error with the file and the line number. Good for debugging.

#[macro_export]
macro_rules! line_error {
() => {
Expand All @@ -31,7 +30,6 @@ macro_rules! line_error {
};
}

/// Creates a simple map using `map! { "key" => "value"}
#[allow(unused_macros)]
#[macro_export]
macro_rules! map {
Expand All @@ -52,3 +50,70 @@ macro_rules! set {
set
}}}
}

#[allow(unused_macros)]
#[macro_export]
macro_rules! impl_builder_setter {
($fn:ident, $field:ident, Option<$ty:ty>) => {
impl_builder_setter!(@impl $fn, $field, $ty, Option);
};
($fn:ident, $field:ident, Vec<$ty:ty>) => {
impl_builder_setter!(@impl $fn, $field, $ty, Vec);
};
($fn:ident, $field:ident, $ty:ty) => {
impl_builder_setter!(@impl $fn, $field, $ty, None);
};
(@impl $fn:ident, $field:ident, $inner:ty, $outer:ident) => {
pub fn $fn(mut self, value: impl Into<$inner>) -> Self {
impl_builder_setter!(@expr self, $field, value, $outer);
self
}
};
(@expr $self:ident, $field:ident, $value:expr, Option) => {
$self.$field = Some($value.into());
};
(@expr $self:ident, $field:ident, $value:expr, Vec) => {
$self.$field.push($value.into());
};
(@expr $self:ident, $field:ident, $value:expr, None) => {
$self.$field = $value.into();
};
}

#[allow(unused_macros)]
#[macro_export]
macro_rules! impl_builder_try_setter {
($fn:ident, $field:ident, Option<$ty:ty>) => {
impl_builder_try_setter!(@impl $fn, $field, $ty, Option);
};

($fn:ident, $field:ident, Vec<$ty:ty>) => {
impl_builder_try_setter!(@impl $fn, $field, $ty, Vec);
};

($fn:ident, $field:ident, $ty:ty) => {
impl_builder_try_setter!(@impl $fn, $field, $ty, None);
};
(@impl $fn:ident, $field:ident, $inner:ty, $outer:ident) => {
pub fn $fn<T>(mut self, value: T) -> ::std::result::Result<Self, T::Error>
where
T: ::std::convert::TryInto<$inner>
{
value.try_into()
.map(|value| {
impl_builder_try_setter!(@expr self, $field, value, $outer);
self
})
.map_err(Into::into)
}
};
(@expr $self:ident, $field:ident, $value:expr, Option) => {
$self.$field = Some($value);
};
(@expr $self:ident, $field:ident, $value:expr, Vec) => {
$self.$field.push($value);
};
(@expr $self:ident, $field:ident, $value:expr, None) => {
$self.$field = $value;
};
}
Loading

0 comments on commit c46d9bc

Please sign in to comment.