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

Complete meetup: claim rewards and test balances #33

Merged
merged 5 commits into from
Apr 14, 2023

Conversation

echevrier
Copy link
Collaborator

@echevrier echevrier commented Jan 12, 2023

  • Add balances getter and trusted calls.
  • Update the demo to complete a meetup for a private community (add missing claim_rewards) The participants get rewards in community currency and have some balances.
  • Add some documentation on the demo in the Readme
    -> Problem: the demurrage is not working. See Fix Demurrage for private balance pallet #50

@echevrier echevrier marked this pull request as draft January 12, 2023 08:29
@echevrier echevrier added A0-core Affects core part (According to integritee worker) B0-silent Item should not be mentioned in any change logs. (e.g. documentation updates) A1-cli Affects cli functionalites (According to integritee worker) A2-applibs Affects app-libs, i.e. runtime or stf (According to integritee worker) B1-releasenotes C1-low 📌 Does not elevate a release containing this beyond "low priority" E0-breaksnothing and removed B0-silent Item should not be mentioned in any change logs. (e.g. documentation updates) labels Jan 12, 2023
@echevrier echevrier force-pushed the ec/balances_trusted_calls branch from 9603e28 to badf94b Compare February 14, 2023 06:54
@echevrier echevrier force-pushed the ec/balances_trusted_calls branch from ea33d88 to a1aa566 Compare February 27, 2023 04:28
@echevrier
Copy link
Collaborator Author

Perform meetup is available : #39

@echevrier echevrier linked an issue Feb 27, 2023 that may be closed by this pull request
3 tasks
@echevrier echevrier changed the title Balances trusted calls. Not tested Complete meetup: claim rewards and test balances Feb 28, 2023
@echevrier echevrier marked this pull request as ready for review March 1, 2023 07:57
echevrier added 4 commits April 4, 2023 11:54
Improve CLI for trsuted calls: balance, transfer, transfer_all and set_fee_conversion_factor

clean

rebase

clean

Add claim_rewards and some infos to check the balances.

Add claim_rewards in demo and get balances

clippy

clean
@echevrier echevrier force-pushed the ec/balances_trusted_calls branch from a9e7291 to 07c145e Compare April 4, 2023 12:58
@echevrier echevrier requested review from clangenb and brenzi April 4, 2023 14:29
@echevrier echevrier linked an issue Apr 5, 2023 that may be closed by this pull request
Copy link
Member

@brenzi brenzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I check the CI logs, the claim seems to have failed:
Bob has zero balance after a performed and claimed gathering. Why is that? Is this different when running locally?

encointer-private-community-demo  | Check Bob balances
encointer-private-community-demo  | Initial balances
encointer-private-community-demo  |   in native currency: 0
encointer-private-community-demo  |   in community currency: 0
encointer-private-community-demo  | After rewards
encointer-private-community-demo  |   in native currency: 0
encointer-private-community-demo  |   in community currency: 0
encointer-private-community-demo  | 
encointer-private-community-demo  | After some time (demurrage)
encointer-private-community-demo  |   in native currency: 0
encointer-private-community-demo  |   in community currency: 0
encointer-private-community-demo  | 

@echevrier
Copy link
Collaborator Author

When I check the CI logs, the claim seems to have failed: Bob has zero balance after a performed and claimed gathering. Why is that? Is this different when running locally?

encointer-private-community-demo  | Check Bob balances
encointer-private-community-demo  | Initial balances
encointer-private-community-demo  |   in native currency: 0
encointer-private-community-demo  |   in community currency: 0
encointer-private-community-demo  | After rewards
encointer-private-community-demo  |   in native currency: 0
encointer-private-community-demo  |   in community currency: 0
encointer-private-community-demo  | 
encointer-private-community-demo  | After some time (demurrage)
encointer-private-community-demo  |   in native currency: 0
encointer-private-community-demo  |   in community currency: 0
encointer-private-community-demo  | 

One bootstrapper couldn't register:

* Registering participants : 
- Registering 3 bootstrappers : 
  //Alice,
  //Bob
  //Charlie
- Registering a newbie //Cora 

* Listing participants 
Participants of community sqm1v79dF6b for ceremony 2 :
- Bootstrappers :
    5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty
    5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y

- Reputables :
    No one

- Endorsees :
    No one

- Newbies :
    5DDZ8VeTs9ny15fKuuY99iByF4uGN5n953ZC64dUjyCBiCG5

Maybe because of the bad performance of the GitHub actions CI. Something like integritee-network/worker#1132

In the worker logs, we have:

[2023-04-04T16:28:25Z WARN  its_consensus_common::block_import] Could not peek parentchain block, returning latest parentchain block (Other("Failed to find parentchain header in import queue (hash: 0x968e…1fc7) that is associated with the current sidechain block that is to be imported (number: 12, hash: 0xd50c…88c3)"))
[2023-04-04T16:28:25Z ERROR its_block_verification] Author verification for block (number: 12) failed, block will be discarded
[2023-04-04T16:28:25Z ERROR enclave_runtime::error] Returning error Consensus(VerificationError(BadParentchainBlock(0x38a1627e5bc3507c0ad9c0b4abbf5aa9cb8af81eaaf927057a6b496504bd24d9, "Invalid parentchain head"))) as sgx unexpected.
[2023-04-04T16:28:25Z ERROR integritee_service::sidechain_setup] Sgx(SGX_ERROR_UNEXPECTED)
...

1 bootstrapper was not registered:

[2023-04-04T16:34:12Z ERROR itp_stf_executor::executor] Stf execute failed: Dispatch("Ceremonies attendees attestation error: Module(ModuleError { index: 61, error: [19, 0, 0, 0], message: Some(\"ParticipantIsNotRegistered\") })")
[2023-04-04T16:34:12Z WARN  its_consensus_slots::slots] Proposed block slot time: 1680626052958 ms, slot start: 1680626052600 ms , slot end: 1680626052900 ms
[2023-04-04T16:34:12Z WARN  aura] ⌛️ Discarding proposal for slot 5602086842, block number 333; block production took too long
[2023-04-04T16:34:13Z WARN  its_consensus_common::peer_block_sync] Got ancestry mismatch error upon block import. Attempting to fetch missing blocks from peer

The attestaions failed:

[2023-04-04T16:34:32Z ERROR itp_stf_executor::executor] Stf execute failed: Dispatch("Ceremonies attendees attestation error: Module(ModuleError { index: 61, error: [15, 0, 0, 0], message: Some(\"TooManyAttestations\") })")
Syncing Parentchain block number 66 at Sidechain block number  339 
[2023-04-04T16:34:32Z WARN  its_consensus_common::peer_block_sync] Got ancestry mismatch error upon block import. Attempting to fetch missing blocks from peer
[2023-04-04T16:34:33Z ERROR enclave_runtime::error] Returning error Consensus(BlockAncestryMismatch(339, 0x6b962c11585b218cfa039c223607f7bec87d862a99949a1cf24a9b4d6f386508, "Invalid block number, 652 does not succeed 339")) as sgx unexpected.
[2023-04-04T16:34:33Z ERROR integritee_service::sidechain_setup] Sgx(SGX_ERROR_UNEXPECTED)

The claim rewards failed:

[2023-04-04T16:36:16Z ERROR itp_stf_executor::executor] Stf execute failed: Dispatch("Ceremonies claim rewards error: Module(ModuleError { index: 61, error: [23, 0, 0, 0], message: Some(\"VotesNotDependable\") })")
[2023-04-04T16:36:16Z WARN  its_consensus_slots::slots] Proposed block slot time: 1680626176358 ms, slot start: 1680626175879 ms , slot end: 1680626175900 ms
[2023-04-04T16:36:16Z WARN  aura] ⌛️ Discarding proposal for slot 5602087252, block number 386; block production took too long
[2023-04-04T16:36:16Z WARN  its_consensus_common::peer_block_sync] Got ancestry mismatch error upon block import. Attempting to fetch missing blocks from peer
[2023-04-04T16:36:16Z ERROR enclave_runtime::error] Returning error Consensus(BlockAncestryMismatch(385, 0x4cfcfba0b01973eba096cfa9f189c7dfd91c21e1c65062aab677617f29057219, "Invalid block number, 802 does not succeed 385")) as sgx unexpected.
[2023-04-04T16:36:16Z ERROR integritee_service::sidechain_setup] Sgx(SGX_ERROR_UNEXPECTED)

@echevrier
Copy link
Collaborator Author

Re-running the demo. The demo ran successfully:

encointer-private-community-demo  | Check Bob balances
encointer-private-community-demo  | Initial balances
encointer-private-community-demo  |   in native currency: 0
encointer-private-community-demo  |   in community currency: 0
encointer-private-community-demo  | After rewards
encointer-private-community-demo  |   in native currency: 0
encointer-private-community-demo  |   in community currency: 999999211267759304
encointer-private-community-demo  | 
encointer-private-community-demo  | After some time (demurrage)
encointer-private-community-demo  |   in native currency: 0
encointer-private-community-demo  |   in community currency: 999998647887968255

@echevrier echevrier requested a review from brenzi April 11, 2023 09:22
Copy link
Member

@brenzi brenzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's see if CI is really brittle in the future. acceptable for now, thx

@brenzi brenzi merged commit 919d399 into main Apr 14, 2023
@echevrier echevrier deleted the ec/balances_trusted_calls branch April 18, 2023 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A0-core Affects core part (According to integritee worker) A1-cli Affects cli functionalites (According to integritee worker) A2-applibs Affects app-libs, i.e. runtime or stf (According to integritee worker) B1-releasenotes C1-low 📌 Does not elevate a release containing this beyond "low priority" E0-breaksnothing
Projects
None yet
2 participants