Skip to content

Conversation

@L3pereira
Copy link
Contributor

@L3pereira L3pereira commented Jun 1, 2022

When creating a channel, the sender gets slashed channel state bloat bond
When deleting a channel sender gets paid the channel state bloat bond amount
Uses the funds_needed_for_upload implemented here #3693 to verify the funds needed before charging
the channel state bloat bond

┆Issue is synchronized with this Asana task by Unito

@vercel
Copy link

vercel bot commented Jun 1, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
pioneer-testnet ⬜️ Ignored (Inspect) Jul 1, 2022 at 9:00AM (UTC)

//

let _ = Balances::<T>::slash(&sender, channel_state_bloat_bond);

Copy link
Member

Choose a reason for hiding this comment

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

Do we not credit the bloat bond to some treasury account? I don't actually remember, what do we do for bounties or in the storage pallet?

Copy link
Contributor Author

@L3pereira L3pereira Jun 3, 2022

Choose a reason for hiding this comment

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

Yes, we credited to StorageTreasury, in bounties we had a Council Budget, that's why I got confused about using content workgroup budget account instead of simply the sender's account. Since, for example, channel transfer uses the budget or the sender based on which type is the owner.
I implemented with an imbalance, and always used the sender's account, the reason I didn't use the storage treasury, was I thought we wanted to move this logic away from the storage pallet
In my opinion, we should use the following (I implemented this way at first, but then I step back since it was not clear to me if I should use it)
Lead -> Senders account
Memeber - > Senders account
Curator Group -> Content working group budget
We should also break the functions that transfer funds so they do not fail, as we did in bounties

Copy link
Collaborator

@dobertRowneySr dobertRowneySr left a comment

Choose a reason for hiding this comment

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

Cosmetics, otherwise LGTM. Good job!

@L3pereira L3pereira force-pushed the introduce_channel_state_bloat_bond_#3511 branch from a6b6918 to 719ba69 Compare June 17, 2022 11:42
@L3pereira L3pereira requested a review from dobertRowneySr June 17, 2022 12:14
Copy link
Collaborator

@dobertRowneySr dobertRowneySr left a comment

Choose a reason for hiding this comment

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

LGTM

@bedeho bedeho requested review from Lezek123 and bedeho and removed request for bedeho June 20, 2022 08:47
@bedeho bedeho changed the base branch from audit3 to carthage June 22, 2022 09:55
@L3pereira L3pereira requested a review from bedeho June 24, 2022 15:02
@bedeho bedeho removed the request for review from Lezek123 June 25, 2022 07:48
@L3pereira L3pereira force-pushed the introduce_channel_state_bloat_bond_#3511 branch from 996f4eb to 1202fc7 Compare June 30, 2022 08:13
@L3pereira L3pereira requested a review from dobertRowneySr June 30, 2022 08:16
@dobertRowneySr
Copy link
Collaborator

  • build node & runtime ✔️
  • types and metadata ✔️
  • cargo test ✔️
  • there are some problem with benchmarks:
---- tests::council_discard_remaining_rewards_on_depose stdout ----
thread 'tests::council_discard_remaining_rewards_on_depose' panicked at 'attempt to subtract with overflow', runtime-modules/council/src/mock.rs:1496:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- tests::council_many_cycle_rewards stdout ----
thread 'tests::council_many_cycle_rewards' panicked at 'attempt to subtract with overflow', runtime-modules/council/src/mock.rs:1496:17

---- tests::council_rewards_are_paid stdout ----
thread 'tests::council_rewards_are_paid' panicked at 'attempt to subtract with overflow', runtime-modules/council/src/mock.rs:1496:17

---- tests::vote_stake_locks_after_new_election_starts stdout ----
thread 'tests::vote_stake_locks_after_new_election_starts' panicked at 'attempt to subtract with overflow', runtime-modules/council/src/mock.rs:1496:17

These should be fixed see mnaamani#13

@L3pereira L3pereira force-pushed the introduce_channel_state_bloat_bond_#3511 branch from 1202fc7 to a9a875f Compare July 1, 2022 09:00
@dobertRowneySr dobertRowneySr merged commit 5d66d4e into Joystream:carthage Jul 1, 2022
@L3pereira L3pereira deleted the introduce_channel_state_bloat_bond_#3511 branch July 29, 2022 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants