encointer / encointer-parachain

The common good parachain for Kusama
https://encointer.org
GNU General Public License v3.0
9 stars 13 forks source link

runtime upgrade for faucet and reputation-commitments #190

Closed brenzi closed 1 year ago

brenzi commented 1 year ago

if possible, polkadot-v1.0.0 deps

brenzi commented 1 year ago

enactAuthorized Upgrade on rococo has happened: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo.api.encointer.org#/explorer/query/0xe53f8c89fd93298986faf7baaeb93037571058f9f21bce4c4b39831b10c831d9

brenzi commented 1 year ago

faucet testing: the reserve amount is 0 and currently only root can change that. we should let council define this

creation: image.png

image.png

created a second one

encointerFaucet.faucets: Option<EncointerPrimitivesFaucet>
[
  [
    [
      Gk5D3BuAnDHX3Z9Vi8mBYTYpmopCV3kBhXSLFsLGdvKVFQh
    ]
    {
      name: TestAnotherFaucet
      purposeId: 1
      whitelist: null
      dripAmount: 100,000,000,000
      creator: EY8qEAXZriHgesmoELXvgNR7P8B2X3AfS1p2qVhGuZh9Tsu
    }
  ]
  [
    [
      JAMgeGvbUhsf9LoneEB3SCgEbjzUSisX25tz636x8Djv1W6
    ]
    {
      name: TestRocFaucet
      purposeId: 0
      whitelist: [
        {
          geohash: srcq4
          digest: 0xabb12168
        }
      ]
      dripAmount: 100,000,000,000
      creator: Er6zYnUBUdhEtb7dpfMMUq9PtSwUSzN9vhxT7B42qugeLhc
    }
  ]
]
brenzi commented 1 year ago

when I try to get a list of all communities with the cli, the rpc fails:

nctr-r list-communities
thread 'main' panicked at 'No communities returned. Are you running the node with `--enable-offchain-indexing true`?: Client(ParseError(Error("invalid type: string \"Adriana\", expected a sequence", line: 0, column: 0)))', client/src/main.rs:2268:72

the rpc endpoint is running client v1.3.3. maybe that's the reason? the rpc cache actually doesn't cache CommunityMetadata, only cid, which saw no breaking change

nevertheless, we can query reputation for a bootstrapper:

nctr-r reputation GV8FwHEdpHKPdosmW3hYiQMdCtMYCF3ZweRHE27t8hYrc1F
173, srcq45PYNyD, Reputation::VerifiedUnlinked

and drip the faicet:

> nctr-r reputation //Alice
173, srcq45PYNyD, Reputation::VerifiedUnlinked
> nctr-r balance --all //Alice
srcq45PYNyD: 41.2215151529193176197
1000000000000
> nctr-r drip-faucet //Alice JAMgeGvbUhsf9LoneEB3SCgEbjzUSisX25tz636x8Djv1W6 173 --cid srcq45PYNyD 
Faucet dripped to 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
> nctr-r drip-faucet //Alice JAMgeGvbUhsf9LoneEB3SCgEbjzUSisX25tz636x8Djv1W6 173 --cid srcq45PYNyD 
[+] Couldn't execute the extrinsic due to Dispatch(Module(ModuleError { pallet: "EncointerReputationCommitments", error: "AlreadyCommited", description: ["Participant already commited their reputation for this purpose"], error_data: ModuleErrorData { pallet_index: 65, error: [0, 0, 0, 0] } }))
>nctr-r drip-faucet //Alice Gk5D3BuAnDHX3Z9Vi8mBYTYpmopCV3kBhXSLFsLGdvKVFQh 173 --cid srcq45PYNyD 
Faucet dripped to 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
> nctr-r balance --all //Alice
srcq45PYNyD: 41.22143619345720264816
1199832363261
brenzi commented 1 year ago

testing bazaar: ./bazaar.py -r rococo --cid srcq45PYNyD --bizaccount //Alice register-business ~/tmp/biz.json yields

encointerBazaar.businessRegistry: EncointerPrimitivesBazaarBusinessData
[
  [
    [
      {
        geohash: srcq4
        digest: 0xabb12168
      }
      HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F
    ]
    {
      url: QmTTHFZ7roMRZD619Tn8mAttAmn2CnAh8NUXR4VocRvcfh
      lastOid: 1
    }
  ]
]