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

merge dev on main #1045

Merged
merged 89 commits into from Sep 26, 2022
Merged

merge dev on main #1045

merged 89 commits into from Sep 26, 2022

Conversation

eike-hass
Copy link
Collaborator

@eike-hass eike-hass commented Sep 23, 2022

Description of change

Merge changes from dev on main to make main the default branch.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

cycraig and others added 30 commits June 16, 2022 13:20
* Replaced invocation of the include macro to instead deserialize a JSON representation
* Fix feature-gate for `revocation-bitmap`

* Fix `encryption` feature gated functions/types

* Activate iota.rs `async` feature unconditionally

* Fix feature flags in account

* Move feature-gate account methods to module

* Move revocation functions to module

* Remove superfluous cfg-feature

* Move memstore encryption into a module

* Fix double cfg, improve feature-gating
* actor: Add builder for `Communicator`

* identity: Re-export actor types

* actor: Specify `tokio` dep explicitly via git

* actor: Specify `tokio` via crates.io

* actor: Rename communicator module to actor

* actor: Rename communicator structs to actor

* actor: Rename `register_command` to `set_handler`

* actor: Spawn handler loop internally

* actor: Impl dispatch pattern for handler loop

* actor: Trait to determine `send_request` ret type

* actor: Get request_name based on type parameter

* actor: Remove `Identity` prefixes in type names

* actor: Finer-grained handler impl for a nicer API

* actor: Migrate to new stronghold comms version

* actor: Fix account feature conditional guards

* actor: Use type map to allow reusing receiver

* actor: Update stronghold comms to new version

* actor: Impl async handler functions

* actor: Separate storage handler & types

* actor: Rename StorageHandler & impl resolution

* actor: Reexport Keypair

* actor: Expand Cargo package info

* actor: Only spawn listener if there are addresses

* actor: Upgrade stronghold comms lib version

* actor: Add dummy comm handler

* actor: Expose executor builder API

* actor: Impl ffi-compatible handler registration

* actor: Use closures instead of function pointers

Signed-off-by: PhilippGackstatter <philipp.gackstatter@iota.org>

* actor: Let request_name take &self for bindings

* actor: Use `Cow` in trait for more flexibility

* actor: Use `log` instead of println

* actor: Implement `send_named_request` for bindings

* actor: Use `ClientMap` for working did resolution

* actor: Upgrade to latest stronghold p2p

* actor: Impl remote error and deserialization logic

* actor: Restructure tests, add SendError test

* actor: Use new `StorageError`

* actor: Handle all errors in handle invoker task

* actor: Define separate request & response types

* actor: Expand `StorageError` & impl `Category`

* Add licences to all files

* Apply cargo and toml formatting

* Address clippy lints

* Define a type name for the more complex types

* Update to latest stronghold p2p version

* Let `add_method` take an `async fn` directly

* Use consistent names for the generics

* Implement `Endpoint` and catch-all handler

* Make `Actor` cloneable, inject it into handlers

* Inject `PeerId` into every handler

* Impl `RequestContext<T>` & dummy didcomm protocol

* Add test for other presentation direction

* Rename handler registration methods

* Refactor handler invocation in prep for hooks

* Implement basic `call_hook` method

* Update account usages to latest dev

* Remove memory leak / circular reference

* Impl part of a hook test

* Fully impl hook invocation in send_request

* Apply new rustfmt granularity

* Restructure actor crate

* Restructure didcomm parts

* Add error handling in `RequestHandler::invoke`

* Fix response serialization

* Impl hooks for `await_message`

* Add await_message hook error test

* Migrate to latest dev

* Reduce code duplication for handler invocation

* Replace `stronghold-p2p` with only `libp2p`

* Impl working serialization; add invocation test

* Return `RemoteSendError` in `Actor::send_request`

* Partially implement didcomm threads

* Impl thread routing

* Reimplement implicit hooks

* Add `StopListening` command

* Refactor handler invocation fns

* Address clippy lints

* Shrink actor state to make cloning cheaper

* Improve type safety of `HandlerBuilder`

* Store `peer_id` in `ActorState`

* Remove one superfluous tokio task and channel pair

* Map errors and document `ActorBuilder`

* Polish errors

* Update copyright to 2022

* Replace `DidCommRequest` with `RequestMessage`

* Move message types to p2p module

* Match more efficiently on swarm events

* Remove `SwarmCommand::GetPeerId`

* Return inbound failure when sending response

* Rename shutdown method

* Remove send_request functions for now

* Reorganize crate

* Remove `DidCommActor`

* Factor out "default" `RequestHandler` impls

* Spell out individual exports

* Rename `AsyncFn` -> `Handler`

* Rename `DidCommHook` -> `Hook`

* Move `ActorRequest` to its own module

* Reogranize dependencies

* Better test name

* Implement `RequestMode`, partially

* Implement (a)sync `RequestMode` using strategies

* Make `InvocationStrategy` methods static

* Add `Actor::send_request`

* Do not send DCPM in sync mode

* Make `ActorRequest` generic over `SyncMode`

* Redo the serialization errors (partial)

* Finish serialization error refactoring

* Add timeout error

* Make downcasting & cloning objects fallible

* Introduce `HandlerObject` type for readability

* Restrict `Endpoint`s to ascii alphabetic and `_`

* Fix `Actor::start_listening`

* Drain open channels during shutdown

* Add `ActorConfig` and timeout

* Reorganize imports

* Be more specific for non-existent threads

* Fix logger in tests and listening

* Add actor feature in identity crate

* Impl working test remote account

* Test thread not found error for async messages

* Remove `RequestHandler::object_type_id` (unused)

* Inline `InvocationStrategy` methods

* Abort request handling on error in async strategy

* Impl `FromStr` for `Endpoint`

* Only allow handler modification during build phase

* Add remote account benchmark

* Document public types (partial)

* Remove unused errors; remove `Category`

* Document the rest

* Make p2p module exports explicit

* Make remote_account exports explicit

* Remove exports from remote_account

* Remove commented code in didcomm presentation

* Rm unnecessary bounds on `ActorRequest` generics

* Test various error scenarios

* Remove start_listening test b/c non-deterministic

* Add handler finishes after shutdown test

* Rename `ActorRequest::request_name` -> `endpoint`

* Reduce p2p module visibility

* Make `Actor::peer_id` just `&self`

* Impl `add_addresses` for improved test reliability

* Increase timeout to increase test reliability

* Specialize `add_handler` for synchronicity

* Fix documentation for `add_handler` functions

* Use minor version; use default-features = false

* Return `Error::Shutdown` instead of panicking

* Document more on the `Actor` type

* Move bounds onto `InvocationStrategy` trait

* Test subset of serialization errors

* Don't require absolute latest tokio version

* Bump `libp2p` to `0.43`

* Feature gate `ActorBuilder::build`

* Add Wasm integration features

* Remove superfluous `pub(crate)` in `mod p2p`

* Use fn pointers instead of generic closures

* Update comment in shutdown test

* Address import issues caused by merge

* Fix post-merge issues

* Let `ActorRequest::endpoint` return `&'static str`

* Remove explicit hook endpoint from `add_hook`

* Remove TODO on actor protocol version

* Factor out `DidComm` specifics into `DidCommActor`

* Split `ActorBuilder` into two

* Fix docs, remove superfluous functions

* Change how items are exported

* Refactor into `RawActor`

* Refactor actor state repr (partial)

* Split `RequestHandler` in two

* Return `Endpoint` from `ActorRequest::endpoint`

* Remove `RawActor`

* Split `ActorRequest` in two

* Fix `ActorRequest` docs

* Doc/resolve (#823)

* Upgrade to new `Stronghold` interface (#787)

* Rename stronghold module

* Postfix old stronghold with `_old`

* Migrate to new stronghold interface

* Impl did_create properly with client syncing

* Add context to `StrongholdError`s

* Add `Stronghold` wrapper test

* Add `test_key_delete`

* Add storage_test_suite setup & did_create test

* Re-export test suite feature

* Expose test suite in Wasm

* Extend `did_create` test, fix index persistence

* Test `key_generate`

* Move `key_delete` to test suite

* Remove test suite from this branch

* Add initial test suite and expose to Wasm

* rm `Error` postfix from `StrongholdError` variants

* Remove duplicate `mod tests` in Wasm

* Handle client sync error; document syncing

* Use updated stronghold

* Use dedicated `load_snapshot` function

* Purge client in `did_purge`

* Revert cfg_attr shenanigans

* Make `Stronghold::client` not async

* Remove asyncness from fns where not necessary

* Make `mutate_client` not async either

* Move test_util mod where it belongs

* Remove `source` errors from `Display` impl

* Remove `RecordHint` everywhere

* Use base crate `MemoryError`; remove engine dep

* Revert temporary send/sync change

* Document `Stronghold` wrapper

* Use same export style as other crates

* Create parent directories if they don't exist

* Remove outdated TODO

* Fix index writing in purge; update stronghold rev

* Remove old stronghold wrapper

* Reactivate multi identity example

* Add `dropsave` getter/setter

* Fully qualify `std::any::type_name`

* Remove tests which are already in test suite

* Reactivate `Send`-assertion test

* Return `Stronghold` instance from test `storages`

* Test incorrect password returns error

* Use `OsRng` instead of `thread_rng`

* Bump stronghold revision

* Remove unused `getrandom` depenency

* Remove unused `actix` dependency

* Remove tokio `rt-multi-thread` feature

* Prefer `sample_string` over `sample_iter`

* Enable `didPurge` test for NAPI stronghold

* Simplify `did_create` by using `mutate_client`

* Rename doc/state client paths to store keys

* Add procedure_error fn to reduce err map code

* Remove unnecessary clone

* Disable multiple identities example temporarily

* Disable musl build

* Remove musl target from stronghold-nodejs

* use local workflow file

* Revert "use local workflow file"

This reverts commit 2f12afd.

Co-authored-by: Eike Haß <eike-hass@web.de>

* Fix Stronghold bindings build for musl (#845)

* Use Alpine container to build Stronghold for musl

* Remove musl setup step

* Change musl container to rust:1.60-alpine

* Specify shell in CI

* Remove shell configuration

* Remove node check-latest

* Install NodeJs manually for musl

* Remove obsolete comment

* Point action back at dev branch

* Remove unused Dockerfile, switch to rust:1-alpine

* Revert `IdentitySetup` modifications

* Refactor `Endpoint`

* Let `Endpoint` deserialization validate

* Document outstanding methods and types

* Document and test `OneOrMany(Into)Iter(ator)`

* Remove unstable error types from public API

* Remove duplicate test assertion

* Test newer nightly in CI

* Refactor `Actor` to trait approach

* Document types

* Move poc modules behind test flag

* Remove hooks

* Rename modules

* Remove `primitives` feature flag

* Rename `actor` flag to `actor-unstable`

* Derive Debug for `System`

* Derive `Debug` for `DidCommSystem`

* More renaming actor to system

* Add missing `async` feature on `identity-iota`

* Remove `cfg-if` dep; use `tokio` unconditionally

* Bump `libp2p` to `0.45`

* Remove hooks from `Endpoint`s, simplify tests

* Log warning instead of panicking

* Improve log statements

* Document and rename `actor_not_found` method

* Remove unnecessary tests, document tests more

* Add a `yield_now` to allow bg tasks to finish

* Remove `listen_on` due to unreliability

* Reorg imports to std/crates/internal hierarchy

* Return error in base system on async requests

* Rename actor to system

* Remove unnecessary features and dependencies

* Improve `Endpoint` doc

* Remove `HookInvocationError`

* Rename `add_address` -> `add_peer_address`

* Document more, make more things private

* Forbid unsafe code, add warning lints

* Rename actor to agent

* Rename more types to agent, fix docs accordingly

* Add DIDComm benchmark

* Add required features to run tests

* Improve DIDComm test docs

* Rename `PeerId` -> `AgentId`

* Rename `ActorResult` -> `AgentResult`

* Rename mod `actor` to `agent`

* Rename `System` to `Agent`

* Rename `Actor` to `Handler`

* Revert unintended changes

* Use agent instead of actor in `identity_iota`

* Revert another unintended change

* Rename `ACT` generic type to `HND`

* Add keywords, remove wasm dependencies

* Bump dashmap to `5.3`

* Replace more occurences of peer with agent

* Use `DidCommRequest` terminology consistently

* Annotate types in `AgentBuilder`

* Change agent exports

* Use only required features

* Remove unused ITERATIONS param

* Fix docs and implicit agent feature

* Use `AgentId` instead of peer id terminology

* Improve `DidCommAgent` doc description

* Add README as crate description and in docs

* Ignore rust doctests

Co-authored-by: Eike Haß <eike-hass@web.de>
Co-authored-by: Oliver E. Anderson <oliver.anderson@iota.org>
Co-authored-by: cycraig <craig.bester@iota.org>
* Fix IOTA Discord link

* Use just the IOTA Discord URL

* Fix typo in task template

* Fix discord channel link in READMEs
* Enable `doc_cfg` on `docsrs` feature

* Show doc feature-gate on `unstable-agent`
* Link Rust API reference

* Rm unused lifetimes; rm let unit binding

* Bump rust and `rustfmt` version in CI

* Allow `drop_non_drop` clippy lint
* Fix spurious agent test

* Change description to be in line with README
…arbitrary DID Documents (#935)

* Add dynamic dispatch traits

* Implement Document for IotaDocument

* Generalise CredentialValidator to use ValidatorDocument

* Generalise PresentationValidator to use ValidatorDocument

* Move validator module to identity_credential

* Add CredentialValidator::extract_issuer, PresentationValidator::extract_holder

* Fix tests, examples compilation

* Fix identity_account_storage test compilation with no-default-features

* Add unit test for presentation, credential validation with mixed DID
Method issuers

* Add extract_issuer, extract_holder to Wasm bindings

* Update Wasm bindings

* Remove old comments, unused imports

* Switch parameters back to generics where possible

* Change error type

* Fix intra-doc links

* Fix error documentation
* Add Rust documentation check to GitHub Actions

* Break intra-doc link to test CI

* Revert "Break intra-doc link to test CI"

* Use docsrs build configuration

* Correct step name
* Stardust Alias Output DID Method proof-of-concept

* Add helper functions

* Add resolution proof-of-concept, use state metadata instead

* Simplify builder usage

* Use state index as sentinel value

* Add TODO

* Rename identity-stardust to identity_stardust

* Update to latest iota-client commit, remove unused dependencies

* Fix toml formatting

* Add identity_stardust to GitHub Actions CI

* Fix build-and-test-stardust run condition
* Change Service type to OneOrSet<String>

* Update Account to allow Service type sets

* Update Wasm bindings
* Implement state metadata document

* Update example

* Implement roundtrip transformation

* Use StateMetadataDoc for (de)serialization

* Update example with extended document

* Rm needless clone; improve test naming

* Impl draining iterator for `OrderedSet`

* Make document conversion more efficient

* Polish docs

* Simplify transformation

* Add version, encoding and `DID` marker

* Use stardust did in tests

* Move `DID` marker to front; improve errors
Bumps [terser](https://github.com/terser/terser) from 5.7.2 to 5.14.2.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…951)

* Update iota-crypto, iota-client

* Add StardustDocumentMetadata, implement Document methods

* Rename `(un)revoke_credentials` to `(un)revoke_indices`

* Update Stardust example for increasing the amount and destroying it

* Update Wasm bindings

* Fix Rust docs

* Revert rename to `(un)revoke_credentials`

* Fix formatting
* Simplify JSON conversion code with macro

* Remove unnecessary derives

* Add Node unit tests to GitHub CI
* Add arbitrary bytes storage

* Add arbitrary storage for bindings

* Fix naming for storage function

* Bump MSRV to 1.62

* Remove serde_json dependency; Rename value to blob; Take ownership of blob; Fix bindings

* Fix doc comments
* Integrate StardustDID into StardustDocument

* Feature-gate iota-client dependency

* Add StardustDID::from_block

* Rename deserialize_from_output to unpack_from_output

* Fix compilation

* Fix rustdoc

* Dynamically retrieve network HRP in example

* Update identity_stardust/src/did/stardust_did.rs
cycraig and others added 26 commits September 15, 2022 15:48
* Use cargo-license-template

* Fix cargo-license-template CI check

* Fix license headers in Rust files
Co-authored-by: Identity Bot <identity-bot@iota.org>
Co-authored-by: Identity Bot <identity-bot@iota.org>
* reorg workspace members, error on mismatched dependencies

* give legacy packages their own workspace

* fix formatting
Co-authored-by: Identity Bot <identity-bot@iota.org>
* Refactor basic examples

* Port 0_did_controls_did to Wasm

* Expose `to_alias_id` method in Wasm

* Remove unnecessary console logs

* Remove unused imports

* Partially impl 1_did_issues_nft

* Remove unused imports; don't slice alias id

* Finish porting 1_did_issues_nft

* Improve variable name

* Impl 2_nft_owns_did

* Improve 2_nft_owns_did Rust example comments

* Use convenience functions

* Generate a new address

* Impl 3_did_issues_tokens

* Add `big-integer` dependency

* Use iota-scoped package for new examples

* Port 4_key_exchange

* Create directory structure

* Remove `ex` prefix from example names

* Add comment

* Remove unused imports

* Fix wiki links to examples

* Add advanced examples to Readme

* Add new examples as tests

* Update package-lock.json

* Update api-reference.md

* Document `create_did` utility function

* Apply suggestions from code review

* Remove `webpack` & `webpack-cli`

* Use package-lock.json from dev

* Update package-lock.json
* Add bump versions to release action

* Bump versions of legacy crates manually
* Add typescript `dprint` plugin

* `dprint fmt`

* Use indentWidth = 4

* Set `"arrayExpression.preferHanging": true`
* Set controller and governor addresses

* Add unpack_from_output

* Unset governor and state controller addresses when packing

* Remove unpack; Set addresses when packing

* Add wasm unpack_from_output; Always overwrite controller

* Fix unpack_from_output

* Remove dependecy and; Fix tests
* Change IotaDID::parse to convert to lowercase automatically

* Change address type to Bech32-encoded strings

* Update Wasm bindings

* Fix formatting

* Update presentation test fixtures

* Update Wasm api-reference.md

* Fix JSON fixture causing signature verification to fail
* Check default and no-default-features in CI

* Fix arguments passing in CI
* use a private tangle in CI

* add tear down

* move private tangle to stardust workflow, fix tear down

* use private tangle

* use faucet

* use faucet API

* increase tiemout

* use improved run script, always clen up private tangle

* increase timeout

* Implement automatic faucet fund request

* add wait for healthcheck

* increase timeout

* fix health check endpoints

* use private tangle in create_did

* tweak parallel settings

* increase timeouts

* fix faucet url

* use sh instead of action

* use working directory

* fix syntax error

* fix visibility

* fix example path

* use private tangle for wasm

* disable pow

* fix PoW setting

* fix private tangle test

* fix private tangle example, disable local PoW

* fix formatting

* change input path for readme example

* Checkout only the required subdirectory

* Use the private_tangle asset provided by hornet

* Don't pipe through gzip apparently

* Export env var

* Fix private tangle download

* Set minPoWScore parameter for Wasm examples

* log protocol_parameters.json

* Replace Shimmer Testnet with private network

Co-authored-by: PhilippGackstatter <philipp.gackstatter@iota.org>
* Update spec

* Implement `index` query in revocation status

* Test revocation status query requirements

* Improve tests

* Add index query recommendations in spec

* Clarify test context

* Fix clippy lints

* Be agnostic about implementations

* Rename index property constant

* Deduplicate str -> u32 conversion
@eike-hass eike-hass added the No changelog Excludes PR from becoming part of any changelog label Sep 23, 2022
@eike-hass eike-hass merged commit c5f0073 into main Sep 26, 2022
@eike-hass eike-hass deleted the dev branch October 7, 2022 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
No changelog Excludes PR from becoming part of any changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants