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

support Cantillon aggregate data for currencies #12

Open
brenzi opened this issue Jun 3, 2020 · 4 comments
Open

support Cantillon aggregate data for currencies #12

brenzi opened this issue Jun 3, 2020 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@brenzi
Copy link
Member

brenzi commented Jun 3, 2020

like for Gesell, we'd like to show

  • number of participants registered
  • number of meetups assigned
  • money supply
  • ceremony reward (the nominal value of the UBI per ceremony)

this can be queried from the worker-api (which has already been implemented for our flutter app

The CLI client does it like this:
https://github.com/encointer/encointer-worker/blob/53e9ef984086824c8b867b06cc6c5c3675011779/stf/src/cli.rs#L211-L275

and returns:

> nctr trusted info -m $MRENCLAVE --shard $cid
Public information about currency HKKAHQhLbLy8b84u1UjnHX9Pqk4FXebzKgtqSt8EKsES
  total issuance: 0
  participant count: undisclosed (might be REGISTERING phase?)
  meetup count: 0
  ceremony reward: 1
  location tolerance: 1000m
  time tolerance: 600000ms

during registering phase, or

> nctr trusted info -m $MRENCLAVE --shard $cid
Public information about currency HKKAHQhLbLy8b84u1UjnHX9Pqk4FXebzKgtqSt8EKsES
  total issuance: 0
  participant count: 3
  meetup count: 1
  ceremony reward: 1
  location tolerance: 1000m
  time tolerance: 600000m

during other phases

@brenzi brenzi added the enhancement New feature or request label Jun 3, 2020
@brenzi
Copy link
Member Author

brenzi commented Jun 6, 2020

Caveat: Cantillon works differently than Gesell. The Scheduler and Currencies pallets work the same, but the Ceremonies and Balances pallets moved into SubstraTEE-worker enclave and can't be queried via chain RPC. We need to use worker-api instead.

Anyway, we could still show the map with locations, but no data on money supply or activity

More spec to come

@brenzi brenzi changed the title select testnet (endpoint) support Cantillon testnet (and select endpoints by URL) Jun 6, 2020
@brenzi
Copy link
Member Author

brenzi commented Jun 23, 2020

The on-chain basics work out of the box:

https://explorer.encointer.org/?rpc=wss://cantillon.encointer.org

But no info on worker state.

@brenzi
Copy link
Member Author

brenzi commented Jun 24, 2020

Since worker v0.6.9 we can query all the necessary information for the explorer from the worker-api. See rust code how this works:
https://github.com/encointer/encointer-worker/blob/53e9ef984086824c8b867b06cc6c5c3675011779/stf/src/cli.rs#L211-L275

@brenzi brenzi changed the title support Cantillon testnet (and select endpoints by URL) support Cantillon aggregate data for currencies Sep 15, 2020
@brenzi
Copy link
Member Author

brenzi commented Dec 11, 2020

@clangenb has implemented all worker-api's in encointer wallet app in js:
https://github.com/encointer/encointer-wallet-flutter/blob/master/lib/js_service_encointer/src/service/worker.js

These functions should be moved to our npm package for better reusability and maintenance:
https://github.com/encointer/encointer-js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants