Skip to content

Commit

Permalink
Merge pull request #5132 from Joystream/luxor
Browse files Browse the repository at this point in the history
Luxor release
  • Loading branch information
mnaamani committed Apr 18, 2024
2 parents b65a2c0 + ffde4d9 commit ced9962
Show file tree
Hide file tree
Showing 85 changed files with 4,711 additions and 1,545 deletions.
31 changes: 27 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bin/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ authors = ['Joystream contributors']
build = 'build.rs'
edition = '2018'
name = 'joystream-node'
version = '8.5.0'
version = '8.6.0'
default-run = "joystream-node"

[[bin]]
Expand Down
2 changes: 2 additions & 0 deletions bin/node/src/chain_spec/council_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use node_runtime::{
constants::currency, council::CouncilStageUpdate, days, dollars, hours,
monthly_dollars_to_per_block, Balance, CouncilConfig, ExpectedBlockTime,
};
use sp_runtime::Percent;

pub fn create_council_config() -> CouncilConfig {
CouncilConfig {
Expand All @@ -12,5 +13,6 @@ pub fn create_council_config() -> CouncilConfig {
next_budget_refill: 1,
budget_increment: dollars!(22_000),
councilor_reward: monthly_dollars_to_per_block!(10_000),
era_payout_damping_factor: Percent::from_percent(100),
}
}
2 changes: 1 addition & 1 deletion bin/node/src/chain_spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ pub fn testnet_genesis(
minimum_validator_count: initial_authorities.len().min(4) as u32,
invulnerables: initial_authorities.iter().map(|x| x.0.clone()).collect(),
slash_reward_fraction: Perbill::from_percent(10),
force_era: Forcing::ForceNone,
force_era: Forcing::NotForcing,
stakers,
min_nominator_bond: GENESIS_MIN_NOMINATOR_BOND,
min_validator_bond: GENESIS_MIN_VALIDATOR_BOND,
Expand Down
2 changes: 1 addition & 1 deletion chain-metadata.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"start": "./start.sh",
"test": "./tests/network-tests/run-tests.sh",
"cargo-checks": "./scripts/cargo-checks.sh",
"cargo-checks-with-benchmarking": "./scripts/cargo-checks-with-benchmarking.sh",
"cargo-build": "./scripts/cargo-build.sh",
"lint": "./scripts/lint-typescript.sh",
"update-chain-metadata": "./scripts/fetch-chain-metadata.sh | tee chain-metadata.json query-node/chain-metadata/$(./scripts/fetch-chain-spec-version.sh).json >/dev/null",
Expand Down
1 change: 1 addition & 0 deletions query-node/chain-metadata/2003.json

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions query-node/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ typegen:
- storageWorkingGroup.WorkerRewardAmountUpdated
- storageWorkingGroup.StatusTextChanged
- storageWorkingGroup.BudgetSpending
- storageWorkingGroup.VestedBudgetSpending
- storageWorkingGroup.RewardPaid
- storageWorkingGroup.NewMissedRewardLevelReached
- storageWorkingGroup.LeadRemarked
Expand Down Expand Up @@ -160,6 +161,7 @@ typegen:
- council.CouncilorRewardUpdated
- council.RequestFunded
- council.CouncilBudgetFunded
- council.CouncilBudgetDecreased
# Referendum
- referendum.ReferendumStarted
- referendum.ReferendumStartedForcefully
Expand Down Expand Up @@ -288,6 +290,8 @@ mappings:
handler: workingGroups_StatusTextChanged
- event: storageWorkingGroup.BudgetSpending
handler: workingGroups_BudgetSpending
- event: storageWorkingGroup.VestedBudgetSpending
handler: workingGroups_VestedBudgetSpending
- event: storageWorkingGroup.RewardPaid
handler: workingGroups_RewardPaid
- event: storageWorkingGroup.NewMissedRewardLevelReached
Expand Down Expand Up @@ -335,6 +339,8 @@ mappings:
handler: workingGroups_StatusTextChanged
- event: forumWorkingGroup.BudgetSpending
handler: workingGroups_BudgetSpending
- event: forumWorkingGroup.VestedBudgetSpending
handler: workingGroups_VestedBudgetSpending
- event: forumWorkingGroup.RewardPaid
handler: workingGroups_RewardPaid
- event: forumWorkingGroup.NewMissedRewardLevelReached
Expand Down Expand Up @@ -386,6 +392,8 @@ mappings:
handler: workingGroups_StatusTextChanged
- event: membershipWorkingGroup.BudgetSpending
handler: workingGroups_BudgetSpending
- event: membershipWorkingGroup.VestedBudgetSpending
handler: workingGroups_VestedBudgetSpending
- event: membershipWorkingGroup.RewardPaid
handler: workingGroups_RewardPaid
- event: membershipWorkingGroup.NewMissedRewardLevelReached
Expand Down Expand Up @@ -437,6 +445,8 @@ mappings:
handler: workingGroups_StatusTextChanged
- event: contentWorkingGroup.BudgetSpending
handler: workingGroups_BudgetSpending
- event: contentWorkingGroup.VestedBudgetSpending
handler: workingGroups_VestedBudgetSpending
- event: contentWorkingGroup.RewardPaid
handler: workingGroups_RewardPaid
- event: contentWorkingGroup.NewMissedRewardLevelReached
Expand Down Expand Up @@ -484,6 +494,8 @@ mappings:
handler: workingGroups_StatusTextChanged
- event: operationsWorkingGroupAlpha.BudgetSpending
handler: workingGroups_BudgetSpending
- event: operationsWorkingGroupAlpha.VestedBudgetSpending
handler: workingGroups_VestedBudgetSpending
- event: operationsWorkingGroupAlpha.RewardPaid
handler: workingGroups_RewardPaid
- event: operationsWorkingGroupAlpha.NewMissedRewardLevelReached
Expand Down Expand Up @@ -531,6 +543,8 @@ mappings:
handler: workingGroups_StatusTextChanged
- event: operationsWorkingGroupBeta.BudgetSpending
handler: workingGroups_BudgetSpending
- event: operationsWorkingGroupBeta.VestedBudgetSpending
handler: workingGroups_VestedBudgetSpending
- event: operationsWorkingGroupBeta.RewardPaid
handler: workingGroups_RewardPaid
- event: operationsWorkingGroupBeta.NewMissedRewardLevelReached
Expand Down Expand Up @@ -578,6 +592,8 @@ mappings:
handler: workingGroups_StatusTextChanged
- event: operationsWorkingGroupGamma.BudgetSpending
handler: workingGroups_BudgetSpending
- event: operationsWorkingGroupGamma.VestedBudgetSpending
handler: workingGroups_VestedBudgetSpending
- event: operationsWorkingGroupGamma.RewardPaid
handler: workingGroups_RewardPaid
- event: operationsWorkingGroupGamma.NewMissedRewardLevelReached
Expand Down Expand Up @@ -625,6 +641,8 @@ mappings:
handler: workingGroups_StatusTextChanged
- event: distributionWorkingGroup.BudgetSpending
handler: workingGroups_BudgetSpending
- event: distributionWorkingGroup.VestedBudgetSpending
handler: workingGroups_VestedBudgetSpending
- event: distributionWorkingGroup.RewardPaid
handler: workingGroups_RewardPaid
- event: distributionWorkingGroup.NewMissedRewardLevelReached
Expand Down Expand Up @@ -672,6 +690,8 @@ mappings:
handler: workingGroups_StatusTextChanged
- event: appWorkingGroup.BudgetSpending
handler: workingGroups_BudgetSpending
- event: appWorkingGroup.VestedBudgetSpending
handler: workingGroups_VestedBudgetSpending
- event: appWorkingGroup.RewardPaid
handler: workingGroups_RewardPaid
- event: appWorkingGroup.NewMissedRewardLevelReached
Expand Down Expand Up @@ -914,6 +934,8 @@ mappings:
handler: council_RequestFunded
- event: council.CouncilBudgetFunded
handler: council_CouncilBudgetFunded
- event: council.CouncilBudgetDecreased
handler: council_CouncilBudgetDecreased
# Referendum
- event: referendum.ReferendumStarted
handler: referendum_ReferendumStarted
Expand Down
2 changes: 1 addition & 1 deletion query-node/mappings/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "query-node-mappings",
"version": "2.2.1",
"version": "2.3.0",
"description": "Mappings for hydra-processor",
"main": "lib/src/index.js",
"license": "MIT",
Expand Down
17 changes: 17 additions & 0 deletions query-node/mappings/src/council.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
CandidacyWithdrawEvent,
Candidate,
CastVote,
CouncilBudgetDecreasedEvent,
CouncilBudgetFundedEvent,
CouncilMember,
CouncilStage,
Expand Down Expand Up @@ -68,6 +69,7 @@ import {
Council_CandidacyStakeReleaseEvent_V1001 as CandidacyStakeReleaseEvent_V1001,
Council_CandidacyWithdrawEvent_V1001 as CandidacyWithdrawEvent_V1001,
Council_CouncilBudgetFundedEvent_V1001 as CouncilBudgetFundedEvent_V1001,
Council_CouncilBudgetDecreasedEvent_V2003 as CouncilBudgetDecreasedEvent_V2003,
Council_RequestFundedEvent_V1001,
Council_CouncilorRewardUpdatedEvent_V1001 as CouncilorRewardUpdatedEvent_V1001,
Council_NewCandidateEvent_V1001 as NewCandidateEvent_V1001,
Expand Down Expand Up @@ -857,6 +859,21 @@ export async function council_CouncilBudgetFunded({ event, store }: EventContext
// no specific event processing
}

export async function council_CouncilBudgetDecreased({ event, store }: EventContext & StoreContext): Promise<void> {
// common event processing

const [amount] = new CouncilBudgetDecreasedEvent_V2003(event).params

const budgetDecreasedEvent = new CouncilBudgetDecreasedEvent({
...genericEventFields(event),
amount,
})

await store.save<CouncilBudgetDecreasedEvent>(budgetDecreasedEvent)

// no specific event processing
}

/// /////////////// Referendum events //////////////////////////////////////////

/*
Expand Down
Loading

0 comments on commit ced9962

Please sign in to comment.