-
Notifications
You must be signed in to change notification settings - Fork 47
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
feat: DID support for service endpoints #276
Conversation
…id-service-endpoints
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.
LGTM!
/bench runtime spiritnet-runtime did |
Benchmark Runtime Pallet for branch "aa-new-did-service-endpoints" with command cargo run --quiet --release -p kilt-parachain --features=runtime-benchmarks -- benchmark --chain=spiritnet-dev --steps=50 --repeat=20 --pallet=did --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtimes/spiritnet/src/weights/did.rs --template=.maintain/runtime-weight-template.hbs Results
|
/bench runtime peregrine did |
…hmarks -- benchmark --chain=spiritnet-dev --steps=50 --repeat=20 --pallet=did --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtimes/spiritnet/src/weights/did.rs --template=.maintain/runtime-weight-template.hbs
Benchmark Runtime Substrate Pallet for branch "aa-new-did-service-endpoints" with command cargo run --quiet --release -p kilt-parachain --features=runtime-benchmarks -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=crowdloan --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtimes/peregrine/src/weights/crowdloan.rs --template=.maintain/runtime-weight-template.hbs Results
|
…hmarks -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=crowdloan --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtimes/peregrine/src/weights/crowdloan.rs --template=.maintain/runtime-weight-template.hbs
Benchmark Runtime Substrate Pallet for branch "aa-new-did-service-endpoints" with command cargo run --quiet --release -p kilt-parachain --features=runtime-benchmarks -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=did --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtimes/peregrine/src/weights/did.rs --template=.maintain/runtime-weight-template.hbs Results
|
…hmarks -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=did --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtimes/peregrine/src/weights/did.rs --template=.maintain/runtime-weight-template.hbs
…ime-benchmarks -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=crowdloan --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtimes/peregrine/src/weights/crowdloan.rs --template=.maintain/runtime-weight-template.hbs
fixes KILTProtocol/ticket#1621
This PR re-introduces service endpoints for DIDs. The following changes were made:
DidCreationDetails
now contains an extranew_service_details
field, which is aDidEndpointDetails
.DidEndpointDetails
struct contains the fieldsid
,service_types
andurls
, respectively a vector of bytes and two vectors of vectors of bytes. All of them are bounded by parameters in the did pallet'sConfig
trait.ServiceEndpoints
: a double map which maps from(did_identifier, service_id)
to an instance ofDidEndpointDetails
DidEndpointsCount
: a map which maps fromdid_identifier
to the number of services stored under that identifier. This is needed as a storage double map has no efficient way to count how many elements have been stored under a given prefix.How to test:
Run
cargo test --all --all-features --all-targets
as currently compiling/testing a single pallet is broken.Custom types
I will open a types PR as soon as this PR is reviewed.
Checklist:
Bump runtime versionOpen types PR