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

Refactor property writing + dev mode enhancements #1000

Merged
merged 27 commits into from
Oct 2, 2023

Conversation

mrshiposha
Copy link
Contributor

No description provided.

@mrshiposha mrshiposha added CI-collator-selection for CI workflows CI-governance for CI workflows and removed CI-collator-selection for CI workflows CI-governance for CI workflows labels Sep 25, 2023
pallets/nonfungible/src/weights.rs Outdated Show resolved Hide resolved
pallets/nonfungible/src/weights.rs Outdated Show resolved Hide resolved
pallets/nonfungible/src/weights.rs Show resolved Hide resolved
pallets/nonfungible/src/lib.rs Outdated Show resolved Hide resolved
.docker/Dockerfile-chain-dev Show resolved Hide resolved
@uandysmith uandysmith force-pushed the fix/minting-prop-weight branch from 5c37987 to d2c9363 Compare September 27, 2023 11:06
@mrshiposha mrshiposha marked this pull request as draft September 30, 2023 15:53
@mrshiposha mrshiposha marked this pull request as ready for review September 30, 2023 18:09
@mrshiposha mrshiposha changed the title Fix/minting prop weight Refactor property writing + dev mode enhancements Oct 2, 2023
pallets/fungible/src/common.rs Outdated Show resolved Hide resolved
pallets/nonfungible/src/common.rs Outdated Show resolved Hide resolved
pallets/refungible/src/lib.rs Show resolved Hide resolved
// Measured: `667`
// Estimated: `4325`
// Minimum execution time: 7_344_000 picoseconds.
Weight::from_parts(7_578_000, 4325)
Copy link
Member

Choose a reason for hiding this comment

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

Хм, интересно почему. У нас для поиска читалась какая-то большая информация для токенов, которая однако погружалась в коде инициализации бенчмарка? Да вроде не похоже...

@@ -52,10 +52,10 @@ pub const MAX_COLLATORS: u32 = 10;
pub const SESSION_LENGTH: BlockNumber = HOURS;

// Targeting 0.1 UNQ per transfer
pub const WEIGHT_TO_FEE_COEFF: u64 = /*<weight2fee>*/76_840_511_488_584_762/*</weight2fee>*/;
pub const WEIGHT_TO_FEE_COEFF: u64 = /*<weight2fee>*/77_334_604_063_436_322/*</weight2fee>*/;
Copy link
Member

Choose a reason for hiding this comment

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

Изменение во втором и третьем знаке! 🎉

tests/src/migrations/correctStateAfterMaintenance.ts Outdated Show resolved Hide resolved
tests/src/performance.test.ts Outdated Show resolved Hide resolved
pallets/nonfungible/src/erc.rs Outdated Show resolved Hide resolved
pallets/refungible/src/erc.rs Show resolved Hide resolved
@@ -90,7 +90,7 @@ evm_stubs: UniqueFungible UniqueNFT UniqueRefungible UniqueRefungibleToken Contr

.PHONY: _bench
_bench:
cargo run --release --features runtime-benchmarks,$(RUNTIME) -- \
cargo run --profile production --features runtime-benchmarks,$(RUNTIME) -- \
Copy link
Member

Choose a reason for hiding this comment

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

Я подумал, а зачем мы вообще это кучу раз компилируем...
У нас там перед каждым бенчмарком палеты ноду снова пересобирает, и я только что понял что она пересобирает - у нас изменяется weights.rs, и оно собирает ноду с новыми весами.

По идее тут нужно один раз ноду собрать, и потом вызывать ./unique-collator benchmark ...

Что тут однако не выйдет сделать, поскольку у нас рекурсивный make.
Сейчас unactionable, но способ оптимизации ясен.

Copy link
Member

@CertainLach CertainLach left a comment

Choose a reason for hiding this comment

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

Ещё один нитпик и можно принимать

node/cli/src/service.rs Show resolved Hide resolved
pub fn has_value(&self) -> bool {
self.value.is_some()
}

fn compute_value_if_not_already(&mut self) {
Copy link
Member

Choose a reason for hiding this comment

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

Длинно и не так понятно)
Может force() назвать, как в FP принято?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Мб force_value() тогда?

Copy link
Member

Choose a reason for hiding this comment

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

Можно

nesting_budget,
)?;

Ok(is_bundle_owner)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Ok(is_bundle_owner)
<PalletStructure<T>>::check_indirectly_owned(
maybe_owner.clone(),
self.id,
token,
None,
nesting_budget,
)

Copy link
Member

Choose a reason for hiding this comment

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

(clippy на это жалуется)

@CertainLach CertainLach merged commit 22b45b5 into develop Oct 2, 2023
12 of 20 checks passed
@CertainLach CertainLach deleted the fix/minting-prop-weight branch October 3, 2023 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants