instance_id
stringlengths
10
65
repo
stringlengths
5
59
pr_number
int64
1
313k
task_type
stringclasses
1 value
base_commit
stringlengths
40
40
review_commit
stringlengths
40
40
title
stringlengths
2
282
body
stringlengths
7
3k
patch
stringlengths
202
204k
n_defects
int64
1
72
n_supported
int64
1
65
n_major
int64
0
32
defects
stringlengths
140
18.8k
certifier_count
int64
Polymarket__py-clob-client-v2__17
Polymarket/py-clob-client-v2
17
defect
356bce4bc0b880409b89910105f518f975e800b2
697db5fa2eb47bf09b004b64bba9978cbdff6d63
Fix/v1 fee bps
<!-- CURSOR_SUMMARY --> > [!NOTE] > **Medium Risk** > Touches order creation/signing for legacy `version=1` orders and changes how fee rates are fetched/cached, which could impact order validity or fee parameters sent to the API. Changes are localized and covered by expanded unit tests, keeping overall risk moderate. >...
diff --git a/py_clob_client_v2/client.py b/py_clob_client_v2/client.py index 20da9f7..fc47eef 100644 --- a/py_clob_client_v2/client.py +++ b/py_clob_client_v2/client.py @@ -163,6 +163,7 @@ def __init__( # Caches self.__tick_sizes: dict = {} self.__neg_risk: dict = {} + self.__fee_rates...
1
1
1
[{"id": "G0", "claim": "The validation block in __resolve_fee_rate_bps is unreachable dead code because both callers invoke it as self.__resolve_fee_rate_bps(token_id) and never pass user_fee_rate_bps, unlike the analogous __resolve_tick_size which receives and validates user input.", "category": "correctness", "verdic...
null
Polymarket__rs-clob-client__115
Polymarket/rs-clob-client
115
defect
a6a889c3e0421bba1b77aa96bf8ccdebd8c60bea
57428ec760b95464f760dc669e8ee1811e9d458a
feat: support post-only orders
This PR adds post-only order support, allowing orders to rest on the order book as makers only, without immediately matching as takers. What’s included: 1. Introduced the OrderWithPostOnly struct to represent post-only order payloads 2. Added post_order_with_post_only and post_orders_with_post_only client APIs ...
diff --git a/src/clob/client.rs b/src/clob/client.rs index 914567d1..7218a375 100644 --- a/src/clob/client.rs +++ b/src/clob/client.rs @@ -38,7 +38,7 @@ use crate::clob::types::response::{ SpreadsResponse, TickSizeResponse, TotalUserEarningResponse, TradeResponse, UserEarningResponse, UserRewardsEarningRespon...
5
3
2
[{"id": "G0", "claim": "The new client methods post_order_with_post_only and post_orders_with_post_only have no tests, and the author asks whether tests are needed for them and whether that would require mocking the order book.", "category": "testing", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {...
null
Polymarket__rs-clob-client__124
Polymarket/rs-clob-client
124
defect
b9a18cc080d63bfd604498b88d4cae5c49ab3653
c1d3c1cb8f309b65a2a0ff39f8d3c7311c98097f
feat: add Unknown(String) variant to all enums for forward compatibility
Adds Unknown(String) variant to response enums so new API values don't cause deserialization failures. Custom Deserialize impls preserve the original string value for debugging. Closes #123
diff --git a/src/clob/client.rs b/src/clob/client.rs index 694bba53..a626d603 100644 --- a/src/clob/client.rs +++ b/src/clob/client.rs @@ -565,7 +565,7 @@ impl<S: State> Client<S> { .request(Method::GET, format!("{}prices-history", self.host())) .query(&[("market", request.market.as_str())]); ...
2
1
0
[{"id": "G0", "claim": "Use `#[serde(alias)]` together with an untagged `Unknown` variant instead of hand-writing a `Deserialize` impl for each enum.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Keep `Side` as it is so that `#[repr(u8)]` can be used, r...
null
Polymarket__rs-clob-client__126
Polymarket/rs-clob-client
126
defect
b9a18cc080d63bfd604498b88d4cae5c49ab3653
1cab0cc575af774a36d549ac33f5e271cebaacb5
feat(gamma): use typed Address and B256 for hex string fields
Replace String types with proper Address and B256 types for gamma API fields that represent Ethereum addresses and 32-byte hashes. This provides type safety and validation at deserialization time. Accounts for null, "", and valid values sent by api in custom deserializers. Changes: - Add OptionAddressFromHex and...
diff --git a/Cargo.toml b/Cargo.toml index fddb9ef7..6d350b63 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -133,7 +133,7 @@ required-features = ["data"] [[example]] name = "gamma" path = "examples/gamma.rs" -required-features = ["gamma"] +required-features = ["gamma", "tracing"] [[example]] name = "bridge" diff -...
2
1
0
[{"id": "G0", "claim": "The custom OptionAddressFromHex/OptionB256FromHex serializers might be replaceable with the existing serde_with::NoneAsEmptyString type instead of hand-written custom serializers.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The...
null
Polymarket__rs-clob-client__139
Polymarket/rs-clob-client
139
defect
c37a7aaedadeb0944ba9aa6e0609e1eb88c8294b
f3298da1e782ef9fd6cc85282d2d08bf8c228d12
feat(clob): clob typed b256 address
- Fixed clob types - Fixed unauthenticated testing to verify types live - Updated serde_helper to include more info for deserialization errors found when testing Clob part of #119
diff --git a/Cargo.lock b/Cargo.lock index 30890acd..d41cff8d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3382,6 +3382,7 @@ dependencies = [ "serde", "serde_ignored", "serde_json", + "serde_path_to_error", "serde_repr", "serde_urlencoded", "serde_with", @@ -4337,6 +4338,17 @@ dependencies = [ "zmij", ] ...
3
3
0
[{"id": "G0", "claim": "In examples/clob/unauthenticated.rs, all Err branches should log at the `error` level instead of `debug`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The serde_helpers.rs changes (deserialization-error diagnostics) sho...
null
Polymarket__rs-clob-client__148
Polymarket/rs-clob-client
148
defect
3eb4e7e75de84b135a4ec6996bc7f8c2e776fec8
db724553a4920831bff47aa1ad47597aa906c3e8
fix(gamma): use repeated query params for array fields
The Gamma API expects array parameters as repeated keys (`?key=val1&key=val2`) instead of comma-separated values (`?key=val1,val2`). - Add `to_query_pairs()` function to convert structs to repeated query params - Remove `StringWithSeparator` serialization from all array fields - Update gamma client to use new seri...
diff --git a/examples/gamma.rs b/examples/gamma.rs index d1d89c17..f2de57d6 100644 --- a/examples/gamma.rs +++ b/examples/gamma.rs @@ -220,6 +220,30 @@ async fn main() -> anyhow::Result<()> { } }; + // Test multiple slugs - verifies repeated query params work (issue #147) + if let Ok(markets) = &m...
2
2
0
[{"id": "G0", "claim": "Use the serde_html_form crate for gamma query serialization instead of the pull request's hand-rolled to_query_pairs helper.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Replace the serde_urlencoded dependency with serde_html_fo...
null
Polymarket__rs-clob-client__166
Polymarket/rs-clob-client
166
defect
aef0d1c65269870703bca42ac00aa8ae9a51b909
e7ff6f15e73430de0a0bbb8321b170fa3d7c929c
chore(gamma)!: well-type structs
Also: * Ensures that CLOB RFQ requests use `Display` for `U256` * Run Clippy on no features * Adds Gamma streaming and example
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3bdcd7d..7d912e49 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,9 +41,12 @@ jobs: # Run nightly formatting to allow group imports run: cargo +nightly-2025-11-24 fmt --all -- --check - - name: C...
1
1
0
[{"id": "G0", "claim": "The example's doc-comment run commands should use the example name `gamma_streaming` instead of `gamma-streaming`.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
Polymarket__rs-clob-client__212
Polymarket/rs-clob-client
212
defect
fe8fc5b58faa815f5f3250cd8d35d0978b8ce067
665b05eab4a3365ef2779a9bf9b34c7208994be3
fix: MarketResolved event
Server can return `MarketResolved` event without `question`, `slug` and some other fields. This PR makes fields optional Example of error log: ``` WARN polymarket_client_sdk::ws::connection: Failed to parse WebSocket message text={"id":"1219974","market":"0xc0f0a0fe8d00ac01a98382a16e0254217491b02a2f240f24e296d6913...
diff --git a/src/clob/ws/types/response.rs b/src/clob/ws/types/response.rs index e42e858e..afc92f77 100644 --- a/src/clob/ws/types/response.rs +++ b/src/clob/ws/types/response.rs @@ -236,18 +236,22 @@ pub struct MarketResolved { /// Market ID pub id: String, /// Market question - pub question: String,...
1
1
0
[{"id": "G0", "claim": "Use `#[serde_as(deserialize_as = \"DefaultOnNull\")]` on the outcomes field so the Vec does not need to be wrapped in Option.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
Polymarket__rs-clob-client__29
Polymarket/rs-clob-client
29
defect
fd5530d955163623d117a315492a214c6bde6f5d
e30ea9b6c1a0535b7943e2ba09f84badc9a4bf62
feat: support share-denominated market orders
Add share-denominated market buys so users can buy a specific share size
diff --git a/src/order_builder.rs b/src/order_builder.rs index 553e3432..7b599d2e 100644 --- a/src/order_builder.rs +++ b/src/order_builder.rs @@ -241,6 +241,10 @@ impl<K: AuthKind> OrderBuilder<Market, K> { } // Attempts to calculate the market price from the top of the book for the particular token. + ...
2
2
1
[{"id": "G0", "claim": "The pull request adds a duplicate salt masking (an added `let salt = to_ieee_754_int(...)` identical to the existing one right below it), and it should be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The change...
null
Polymarket__rs-clob-client__55
Polymarket/rs-clob-client
55
defect
1739321a8baefad73b8b94506fedab454f809863
31d441ca1f7eb72275a59526cd6f3e1acd65f0a0
feat: add bridge API client
Add REST client for Polymarket Bridge API with two endpoints: - POST /deposit - create deposit addresses for multi-chain bridging - GET /supported-assets - retrieve supported chains and tokens Follows existing gamma/data-api client patterns with builder types, tracing support, and comprehensive tests.
diff --git a/Cargo.toml b/Cargo.toml index 59de5b39..a637ec98 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,6 +23,7 @@ rust-version = "1.88.0" # MSRV default = [] data-api = ["dep:serde_urlencoded"] gamma = ["dep:serde_urlencoded"] +bridge = [] tracing = ["dep:tracing"] ws = ["dep:backoff", "dep:tokio", "dep:tok...
4
2
1
[{"id": "G0", "claim": "Consider adding module-level documentation to tests/bridge.rs similar to the gamma tests, describing running the tests, organization and coverage areas.", "category": "documentation", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Break src/bridge/types/...
null
Polymarket__rs-clob-client__63
Polymarket/rs-clob-client
63
defect
66832cd1016c6ea9f5a66dd3818a4cff3a189f9e
12e7aa18a943466baaf3d89b5c943c55589c0e8e
feat: add geographic restrictions check
Add check_geoblock() method to verify if the user's IP is blocked from placing orders due to geographic restrictions. https://docs.polymarket.com/developers/CLOB/geoblock - Add GeoblockResponse type for API response - Add Kind::Geoblock error variant and Geoblock error struct - Add check_geoblock() method on Cl...
diff --git a/src/clob/client.rs b/src/clob/client.rs index d19cd3b9..88486195 100644 --- a/src/clob/client.rs +++ b/src/clob/client.rs @@ -30,12 +30,13 @@ use crate::clob::types::request::{ use crate::clob::types::response::{ ApiKeysResponse, BalanceAllowanceResponse, BanStatusResponse, BuilderApiKeyResponse, ...
3
2
2
[{"id": "G0", "claim": "The geoblock tests only cover deserialization and builder, so an integration test mocking the geoblock endpoint should be added to verify the actual check_geoblock() HTTP call and response handling.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id":...
null
Polymarket__rs-clob-client__70
Polymarket/rs-clob-client
70
defect
a4c69cdf0e74cfb298c5ee2de82c57aac31a708d
6c48ae9d2f9461b4232152a5c4deb2174a9bae95
feat(ws): add unsubscribe support with reference counting
Implement WebSocket unsubscribe functionality per Polymarket WSS API: - Add `operation` field to SubscriptionRequest - Only send unsubscribe to server when refcount reaches zero - Add unsubscribe methods to Client API for all subscription types
diff --git a/Cargo.lock b/Cargo.lock index e527cbe3..b4b771f6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2881,6 +2881,12 @@ dependencies = [ "sha3-asm", ] +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc...
13
3
2
[{"id": "G0", "claim": "Unsubscribe silently ignores market IDs / asset IDs that were never subscribed (no entry in the refcount map), and the reviewer asks whether error reporting or a warning would be more helpful than this silent success.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "in...
null
Polymarket__rs-clob-client__75
Polymarket/rs-clob-client
75
defect
86ca6391810578afc517d1d6a6a98c6452762bc3
67187c5f08c6559d5110b6036936426dba80d4a7
chore(auth): migrate from sec to secrecy crate
Replace the sec crate with secrecy for handling sensitive credentials. The secrecy crate is more widely adopted and provides stronger security guarantees: - Secrets are zeroized from memory on drop via the zeroize crate - Prevents accidental exposure through Debug/Display traits - Explicit .expose_secret() API mak...
diff --git a/Cargo.lock b/Cargo.lock index f6e334b5..3640b211 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3320,7 +3320,7 @@ dependencies = [ "reqwest", "rust_decimal", "rust_decimal_macros", - "sec", + "secrecy", "serde", "serde_json", "serde_repr", @@ -3984,15 +3984,6 @@ version = "4.1.0" source = "regis...
1
1
0
[{"id": "G0", "claim": "The PR can get away without having the PartialEq impl for Credentials at all.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
Polymarket__rs-clob-client__76
Polymarket/rs-clob-client
76
defect
16ba4bf4a86de26bd11a9045138f8ded45a29ce9
4be6ed464eb4aa82a72f5852cb31a965251b1d31
feat(rfq): add standalone RFQ API client
Add a new RFQ (Request for Quote) module that provides a standalone client for interacting with the Polymarket RFQ API. The module is completely independent from the CLOB client and can be enabled separately via the `rfq` feature flag. https://docs.polymarket.com/developers/market-makers/rfq/api-reference Include...
diff --git a/Cargo.toml b/Cargo.toml index 3b724de5..febcf4c1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,6 +24,7 @@ default = [] data = [] gamma = [] bridge = [] +rfq = [] tracing = ["dep:tracing"] ws = ["dep:backoff", "dep:bitflags", "dep:tokio", "dep:tokio-tungstenite"] rtds = ["dep:backoff", "dep:tokio", ...
10
9
3
[{"id": "G0", "claim": "Use the crate::types::Address re-export instead of alloy::primitives::Address in rfq/types/request.rs and response.rs.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Fold the standalone RFQ client into the CLOB client, st...
null
PolymeshAssociation__Polymesh__1003
PolymeshAssociation/Polymesh
1,003
defect
a9ae91e8868437725babd25a0aae1b6bb9f9cfd1
43d0dabdc7da3bc09e95157221a0ca49bc11215e
MESH-1620/improve batch functions (EventCounts, ErrorAt)
## changelog ### new features - batch functions return number of events emitted from each call. ### modified API - Changed `BatchInterrupted`, `BatchOptimisticFailed` and `BatchCompleted` events to include a vector of event counts. - Wrap the call index and error in a `ErrorAt` type. This changes `BatchIn...
diff --git a/pallets/runtime/tests/src/utility_test.rs b/pallets/runtime/tests/src/utility_test.rs index b494957c82..0285548d97 100644 --- a/pallets/runtime/tests/src/utility_test.rs +++ b/pallets/runtime/tests/src/utility_test.rs @@ -65,7 +65,7 @@ fn batch_with_signed_works() { assert_ok!(Utility::batch(Origi...
5
5
1
[{"id": "G0", "claim": "In batch_secondary_with_permissions the new event assertions should compare the event-count vector against a slice literal (e.g. events == [0, 1] and events == [0] && err.0 == 0) instead of checking len() and elements individually.", "category": "testing", "verdict": "supported", "priority": "P2...
null
PolymeshAssociation__Polymesh__1004
PolymeshAssociation/Polymesh
1,004
defect
a9ae91e8868437725babd25a0aae1b6bb9f9cfd1
2e24f7b63c9d761a2d264924ceb7d4f604882116
MESH-1623/add memo field to portfolio
## TODO - [x] Add tests for move_portfolio_funds with a memo. Right now the tests have `None` for the memo field. - [x] Check docs to see if they need to be updated. ## changelog ### new features - Add optional memo field to `portfolio.move_portfolio_funds`. Each asset moved can have a memo added to the ...
diff --git a/pallets/common/src/traits/balances.rs b/pallets/common/src/traits/balances.rs index 93c92c2426..2f980cdcbe 100644 --- a/pallets/common/src/traits/balances.rs +++ b/pallets/common/src/traits/balances.rs @@ -30,7 +30,7 @@ use polymesh_primitives_derive::SliceU8StrongTyped; use sp_runtime::{traits::Saturatin...
2
2
0
[{"id": "G0", "claim": "The benchmark should push MovePortfolioItem directly with `amount` (field-init shorthand) and `memo: make_worst_memo()`, instead of binding an intermediate `memo` variable and spelling `amount: amount`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduc...
null
PolymeshAssociation__Polymesh__1009
PolymeshAssociation/Polymesh
1,009
defect
a0685d6864971d4a6599878cb5b73cf04db04c72
9afcbb57acf178878d5182c262fcff5b7844e97d
Polymesh 3.0.3
## changelog ### modified logic - Do not allow currently linked keys to be assigned when rotating to a new Primary Key
diff --git a/Cargo.lock b/Cargo.lock index 58391f9f80..dfe49e98af 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6730,7 +6730,7 @@ dependencies = [ [[package]] name = "polymesh" -version = "3.0.1" +version = "3.0.2" dependencies = [ "chrono", "ed25519-dalek", diff --git a/Cargo.toml b/Cargo.toml index 48af5d4774...
1
1
1
[{"id": "G0", "claim": "The PR's edit of Cargo.toml dropped the package `name = \"polymesh\"` line from the `[package]` section while bumping the version to 3.0.3, and the name line should be restored (as the reviewer's suggestion block asks).", "category": "correctness", "verdict": "supported", "priority": "P0", "scop...
null
PolymeshAssociation__Polymesh__1046
PolymeshAssociation/Polymesh
1,046
defect
b97cc1912cdfc417544360d8e68eebfb4e716c22
e0b78b40835770e64dd85716ac4196d69c201d02
MESH-1631/redirect fees to subsidiser
## changelog ### new features - Add support to pay transaction & protocol fees using a subsidy in Relayer. - Add restriction on pallets that can be subsidised. ### modified API - Added error `InsufficientSubsidyBalance` to `protocol-fee` pallet. This error is returned if the subsidy doesn't have enough re...
diff --git a/Cargo.lock b/Cargo.lock index c3214d88be..af1aa8b006 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4926,6 +4926,7 @@ dependencies = [ "parity-scale-codec 2.1.3", "polymesh-common-utilities", "polymesh-primitives", + "sp-runtime", "sp-std", ] diff --git a/pallets/common/src/traits/relayer.rs b/pal...
5
5
0
[{"id": "G0", "claim": "The one-line `/// Subsidiser.` doc comment on the protocol-fee `Subsidiser` config type should be replaced with a comment explaining the connection to the `Relayer` pallet and that protocol fees are charged to a subsidizer when present.", "category": "documentation", "verdict": "supported", "pri...
null
PolymeshAssociation__Polymesh__1057
PolymeshAssociation/Polymesh
1,057
defect
21ed564432e8b1b4f6474d30fdbd4a8383ff4e90
1ccc722f136b852bdde73543ecb41e45aaee2747
MESH-1662/allow changing paying key
MESH-1662 & MESH-1663 ## changelog ### new features - Allow user key to change subsidiser in single transaction. - Fix issue with user key calling `remove_paying_key`. ### modified API - Removed error `AlreadyHasPayingKey`. ### modified logic - `accept_paying_key` now allows accepting a new paying...
diff --git a/pallets/relayer/src/lib.rs b/pallets/relayer/src/lib.rs index 771f4f0973..2acac4a4eb 100644 --- a/pallets/relayer/src/lib.rs +++ b/pallets/relayer/src/lib.rs @@ -35,8 +35,6 @@ //! - `accept_paying_key` accepts a `paying_key` authorization. //! - `remove_paying_key` removes the `paying_key` from a `user_k...
3
2
0
[{"id": "G0", "claim": "Fix the typo `remove_pakying_key` in the comment above the `Relayer` pallet case, as suggested to read `remove_paying_key`.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Use `<Subsidies<T>>::get(&user_key)` instead of `tak...
null
PolymeshAssociation__Polymesh__1068
PolymeshAssociation/Polymesh
1,068
defect
b47ccb8672865f4e0a999c71eab73b7d6a82208f
d8aa4c4916b65f455ca402df4e4f9858ef7a93a0
MESH-1659/relayer increase decrease polyx limit
## changelog ### new features - Add extrinsics `increase_polyx_limit` and `decrease_polyx_limit` to increase/decrease the POLYX limit of a subsidy. - Add error `Overflow` that can be thrown by `increase_polyx_limit` or `decrease_polyx_limit`. ### modified agent functionality - Added extrinsics `increase_po...
diff --git a/pallets/common/src/traits/relayer.rs b/pallets/common/src/traits/relayer.rs index e9f20f9d84..bfd0fad3a9 100644 --- a/pallets/common/src/traits/relayer.rs +++ b/pallets/common/src/traits/relayer.rs @@ -8,6 +8,8 @@ pub trait WeightInfo { fn accept_paying_key() -> Weight; fn remove_paying_key() -> ...
5
5
0
[{"id": "G0", "claim": "The three repeated assert_noop blocks checking Error::NotPayingKey in the polyx-limit test should be deduplicated, e.g. with a for loop over the three extrinsic functions.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Th...
null
PolymeshAssociation__Polymesh__1098
PolymeshAssociation/Polymesh
1,098
defect
b6e303681aac42ca5e2ce5622cd9d761eab84e88
48efb245723610abb8544a378ca1a086ed16c852
MESH-1686: Update mainnet config
Updates `mainnet` genesis config: - binary version moved to 4.0.0 - spec version moved to 30 namespace, transaction version to 1 - identities / keys / GC / committees aligned for mainnet - bridge limit removed - pip expiry added and minimum bond - adds schema fix from 3.3
diff --git a/Cargo.lock b/Cargo.lock index 90efb56766..a72949fb7f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5757,7 +5757,7 @@ dependencies = [ [[package]] name = "polymesh" -version = "3.0.1" +version = "4.0.0" dependencies = [ "chrono", "ed25519-dalek", diff --git a/Cargo.toml b/Cargo.toml index 80ec2c05e1...
2
1
0
[{"id": "G0", "claim": "The comment saying reservations expire at the end of 2021 is stale, since the updated registration_length runs to the end of March 2022; it should say 'end of March 2022'.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Rais...
null
PolymeshAssociation__Polymesh__1111
PolymeshAssociation/Polymesh
1,111
defect
c4bc51a9002974693d7d21221cdd03398b322646
9db8090bf30f268c795ea2c00d6480f37d5078ab
MESH-1695: Round down in `transfer_benefit`
## changelog ### modified logic - `CapitalDistribution.{claim, push_benefit}` will now round down for indivisible currencies before transferring gains.
diff --git a/pallets/asset/src/lib.rs b/pallets/asset/src/lib.rs index 964c3ad4f6..5362704663 100644 --- a/pallets/asset/src/lib.rs +++ b/pallets/asset/src/lib.rs @@ -1513,9 +1513,7 @@ impl<T: Config> Module<T> { } fn check_granularity(ticker: &Ticker, value: Balance) -> bool { - // Read the token de...
3
1
1
[{"id": "G0", "claim": "The added doc comments misdescribe rounding and locking for indivisible currencies: `distribute`'s doc should say funds are locked from when `distribute` is called and that, for indivisible currencies, unlocked amounts of less than one whole unit are not transferable from the portfolio, and the ...
null
PolymeshAssociation__Polymesh__1135
PolymeshAssociation/Polymesh
1,135
defect
7bd95dbb7073504a8d500d2770edecb9f992c347
f63e61d25c85f2c521721f53ce97e4f7e275b59c
Newtypes in settlement + sto
## changelog ### modified API - Added newtypes `FundraiserId`, `InstructionId`, `LegId`, and `VenueId`. No storage changes but shows up in schema.
diff --git a/Cargo.lock b/Cargo.lock index 299a320958..3fed87cf6f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4499,6 +4499,7 @@ dependencies = [ "frame-system", "parity-scale-codec 2.2.0", "polymesh-common-utilities", + "polymesh-primitives", "serde", "serde_derive", "sp-api", diff --git a/pallets/base/Car...
4
4
0
[{"id": "G0", "claim": "The docstring of `modify_fundraiser_window` is missing the update for the renamed `id` parameter.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The docstring of `stop` should be updated to use the new `id` parameter name, ...
null
PolymeshAssociation__Polymesh__1142
PolymeshAssociation/Polymesh
1,142
defect
aaf838530208a73654b13d24328d26986a1f55f8
b16625f70dec2d97eb32891d5cbc9ab8314503c1
MESH-1722 fix dedup in compliance requirements
Fix bugs in `replace_asset_compliance` and `change_compliance_requirement` No API change.
diff --git a/pallets/compliance-manager/src/lib.rs b/pallets/compliance-manager/src/lib.rs index 1bd96bd5d3..0685185878 100644 --- a/pallets/compliance-manager/src/lib.rs +++ b/pallets/compliance-manager/src/lib.rs @@ -201,10 +201,9 @@ decl_module! { // Bundle as a requirement. let id = Self::...
7
3
0
[{"id": "G0", "claim": "A note should be added to the top comments explaining that requirements will be inserted in ascending order by ID.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The make_req closure should be a top level function and reuse...
null
PolymeshAssociation__Polymesh__1153
PolymeshAssociation/Polymesh
1,153
defect
168b3fde6b8d2dc3ab26f259b6b8cdfaaa1c54f0
6c052a6b02f65e20fe5d26740eeee4e57299ec7e
MESH-1718/Correctly Prune STO settlement instructions
### modified logic - `STO::Invest` - Now correctly prunes instructions.
diff --git a/pallets/runtime/tests/src/sto_test.rs b/pallets/runtime/tests/src/sto_test.rs index 777e228577..2594bc7e1c 100644 --- a/pallets/runtime/tests/src/sto_test.rs +++ b/pallets/runtime/tests/src/sto_test.rs @@ -5,12 +5,12 @@ use super::{ }; use pallet_asset as asset; use pallet_compliance_manager as complian...
4
2
1
[{"id": "G0", "claim": "If the with_transaction block fails, the prune_instruction call will not happen, and since the settlement affirm functions are only called from the STO path they should not nest their own with_transaction blocks.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "in...
null
PolymeshAssociation__Polymesh__1163
PolymeshAssociation/Polymesh
1,163
defect
178738bf4d1652f7832ac122ec2d65d22026bea0
d0a2c5f6c33034650a2e8de88f39acd128ab092c
MESH-1743 Add rotate_primary_key extrinsic
## changelog ### new features - Added new extrinsic `rotate_primary_key_to_secondary`. ### modified API - Added new extrinsic `rotate_primary_key_to_secondary`. - Added new Item to enum `AuthorizationData::RotatePrimaryKeyToSecondary(Permissions)`. - Added new Item to enum `AuthorizationType::RotatePrimar...
diff --git a/pallets/common/src/traits/identity.rs b/pallets/common/src/traits/identity.rs index 4316d0b2b4..da6cfb7ef9 100644 --- a/pallets/common/src/traits/identity.rs +++ b/pallets/common/src/traits/identity.rs @@ -80,6 +80,7 @@ pub trait WeightInfo { fn invalidate_cdd_claims() -> Weight; fn remove_second...
11
9
0
[{"id": "G0", "claim": "The doc comments for the new rotation extrinsic are inaccurate: they claim it 'requires no authorization' and reference the old DirectRotatePrimaryKey authorization instead of RotatePrimaryKeyToSecondary.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduc...
null
PolymeshAssociation__Polymesh__1198
PolymeshAssociation/Polymesh
1,198
defect
ae0280327e9e02eb06c374af9b65ea234cab212c
800e4234edc6fee622872291d27a9f996e8eb2c2
New unit testing framework
Attempt to have extrinsics in tests run more similarly to how they are run in prod.
diff --git a/pallets/runtime/tests/src/lib.rs b/pallets/runtime/tests/src/lib.rs index 482b8161ea..1516ee4176 100644 --- a/pallets/runtime/tests/src/lib.rs +++ b/pallets/runtime/tests/src/lib.rs @@ -5,8 +5,8 @@ pub mod storage; pub use storage::{ - account_from, add_secondary_key, fast_forward_blocks, fast_forwa...
6
4
0
[{"id": "G0", "claim": "Requests type aliases for `::Origin`, `::Call` and `::AccountId` and their use throughout the storage test module instead of the fully qualified paths the new `exec` helper spells out.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1",...
null
PolymeshAssociation__Polymesh__1200
PolymeshAssociation/Polymesh
1,200
defect
87aa97602d0c8fdb1d6cdc390d5b68734635b661
af73cb8a12dd342bd4dd16fdc632a807c1b794cc
MESH-1759 Remove porfolio name to number mapping after deletion
## changelog ### modified logic The portfolio name is now removed from the NameToNumber mapping in the `delete_portfolio` extrinsic.
diff --git a/pallets/portfolio/src/lib.rs b/pallets/portfolio/src/lib.rs index 98cf6e201d..357ea17511 100644 --- a/pallets/portfolio/src/lib.rs +++ b/pallets/portfolio/src/lib.rs @@ -191,7 +191,9 @@ decl_module! { Self::ensure_portfolio_custody_and_permission(pid, primary_did, secondary_key.as_ref())?; ...
2
2
1
[{"id": "G0", "claim": "The pull request should include a storage migration to clean up the NameToNumber mappings left dangling by portfolios deleted before this change.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G3", "claim": "The line reading the portfolio s...
null
PolymeshAssociation__Polymesh__1226
PolymeshAssociation/Polymesh
1,226
defect
38f49caed00c8036a53f0e2345ae447c21b01c8d
091db21ffcd035532bca79db472bc44827fa90ad
MESH-1792/ improving signer already linked errors
## changelog ### modified logic - Created more specific error types for improving singer already linked type errors
diff --git a/pallets/multisig/src/lib.rs b/pallets/multisig/src/lib.rs index e0536ebe2e..31dd0d1088 100644 --- a/pallets/multisig/src/lib.rs +++ b/pallets/multisig/src/lib.rs @@ -653,7 +653,9 @@ decl_error! { /// Changing multisig parameters not allowed since multisig is a primary key. ChangeNotAllowe...
3
3
2
[{"id": "G0", "claim": "The doc comment added above SignerAlreadyLinkedToIdentity should read 'associated with an identity' rather than 'a identity'.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The self-add check (a multisig adding itself as it...
null
PolymeshAssociation__Polymesh__1233
PolymeshAssociation/Polymesh
1,233
defect
2ff684e5a2063abcdb4c0584a01b5bb934ccf576
3aa372b7c8f613772ecb850c8e80aa54e02dd88c
MESH-1806 verify did in treasury disbursement
## TODO - [x] Emit `Balances::Transfer` event during disbursement. ## changelog ### modified API - Added error `Treasury::InvalidIdentity` returned from `Treasury::disbursement` if one of the beneficiaries doesn't exist or doesn't have a primary key. - Added the primary key to event `Treasury::TreasuryDisb...
diff --git a/pallets/identity/src/keys.rs b/pallets/identity/src/keys.rs index a096084b4e..327090e749 100644 --- a/pallets/identity/src/keys.rs +++ b/pallets/identity/src/keys.rs @@ -73,6 +73,16 @@ impl<T: Config> Module<T> { Ok(()) } + /// Get the primary key for an identity if it exists. + /// +...
1
1
0
[{"id": "G0", "claim": "The added code comment should read \"its primary key\" instead of the typo \"it's primary key\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
PolymeshAssociation__Polymesh__1236
PolymeshAssociation/Polymesh
1,236
defect
a153a8d16ab386cba8665cb424345dfc663e120d
9597a1414ceb67dff9ffeed1edb94d55954171fc
MESH-1813 - reject invalid distributions
## changelog ### new features - Bump transaction version to 3. ### modified logic - `capitalDistribution.distribute()` will throw error `DistributionAmountIsZero` when `amount` is zero and throw `DistributionPerShareIsZero` when `per_share` is zero.
diff --git a/pallets/corporate-actions/src/distribution/mod.rs b/pallets/corporate-actions/src/distribution/mod.rs index 512d53170f..3616ef2990 100644 --- a/pallets/corporate-actions/src/distribution/mod.rs +++ b/pallets/corporate-actions/src/distribution/mod.rs @@ -87,6 +87,7 @@ use polymesh_primitives::{ Seconda...
1
1
0
[{"id": "G0", "claim": "The new helper functions should carry doc comments — `base_remove_distribution` should get a `///` doc line and the doc on `unverified_remove_distribution` should be extended to say that unlike `base_remove_distribution` it skips permission and existence checks.", "category": "documentation", "v...
null
PolymeshAssociation__Polymesh__1251
PolymeshAssociation/Polymesh
1,251
defect
fa2fbcf127c17a8e205358de51be482b9e343c50
dee3ae224e96daf6a244224470662d6440f6209e
MESH-1786/ Limit the number of times accepting an authorization can fail
Adding count to Authorization struct and modifying the accept auth logic so it can only fail for the specific amount of times specified in count. ## changelog ### modified logic - added count to Authorization struct
diff --git a/pallets/identity/src/auth.rs b/pallets/identity/src/auth.rs index 74a9999aaa..48a76f877e 100644 --- a/pallets/identity/src/auth.rs +++ b/pallets/identity/src/auth.rs @@ -59,6 +59,7 @@ impl<T: Config> Module<T> { authorized_by: from, expiry, auth_id: new_nonce, + ...
7
7
5
[{"id": "G0", "claim": "The return value of `auth.count.eq(&0u32)` is discarded, so the filter closure never returns true when the count is zero; it needs to return true if the count is zero OR the auth has expired.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G...
null
PolymeshAssociation__Polymesh__1266
PolymeshAssociation/Polymesh
1,266
defect
a76c797b84051f67ec770310c37e49fb86507612
2e2278cda3fd4f7d66cd67dbf0826d85640ec12a
MESH-1788/Ability to add custom attestations to an asset and / or DID
## changelog ### new features - adds the ability to register and then add custom claims (`Claim::Custom`) ### modified API - adds `CustomClaimTypeAdded` event to record custom claim - adds `CustomClaimTypeDoesNotExist` error if claim type doesn't exist - adds `CustomClaims`, `CustomClaimsInverse`, `Custom...
diff --git a/pallets/asset/src/lib.rs b/pallets/asset/src/lib.rs index f36fc5b25c..9c76e08261 100644 --- a/pallets/asset/src/lib.rs +++ b/pallets/asset/src/lib.rs @@ -991,7 +991,8 @@ impl<T: Config> AssetFnTrait<T::AccountId, T::Origin> for Module<T> { ), did, None, - ); + ...
2
1
1
[{"id": "G0", "claim": "Add an `unverified_` variant of `base_add_claim` that skips the custom-claim-type check (the check belongs only in `base_add_claim`), so internal callers don't have to `unwrap` or ignore the returned `Result`.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced...
null
PolymeshAssociation__Polymesh__1273
PolymeshAssociation/Polymesh
1,273
defect
63f656e9386b0eb55d869410bf3fd6645f74754a
85343b523dddf8b599fa08557f2e7023c40bca63
MESH-1784/ Ability to modify signer list for a venue after creation
## changelog ### modified API - created update_venue_signers function and VenueSignersUpdated Event
diff --git a/pallets/settlement/src/benchmarking.rs b/pallets/settlement/src/benchmarking.rs index f1befa7441..217f94b802 100644 --- a/pallets/settlement/src/benchmarking.rs +++ b/pallets/settlement/src/benchmarking.rs @@ -555,6 +555,21 @@ benchmarks! { assert_eq!(Module::<T>::venue_info(VenueId(1)).unwrap().v...
8
8
3
[{"id": "G0", "claim": "The new update_venue_signers extrinsic should only be added after the existing extrinsics, at the end of the decl_module! block.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The extrinsic must check that the caller is a...
null
PolymeshAssociation__Polymesh__1324
PolymeshAssociation/Polymesh
1,324
defect
85a4a230a1082901e9bcce3035708ada37f065fa
868e7c28820cdab82dd292ef90b54a143e751aef
Add update_asset_type extrinsic
### new features - Add `update_asset_type` extrinsic, which allows changing the type of a token after asset creation; ### modified API - Add `AssetTypeChanged` event;
diff --git a/pallets/asset/src/benchmarking.rs b/pallets/asset/src/benchmarking.rs index e0e1ec4191..a870fd0b59 100644 --- a/pallets/asset/src/benchmarking.rs +++ b/pallets/asset/src/benchmarking.rs @@ -254,6 +254,23 @@ benchmarks! { assert_eq!(Module::<T>::identifiers(ticker), identifiers2); } + upd...
2
2
1
[{"id": "G0", "claim": "The benchmark parameters (n, i, f) are not needed because update_asset_type has no complex input parameter, so the setup code should be simplified to be like the freeze benchmark below.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim"...
null
PolymeshAssociation__Polymesh__1333
PolymeshAssociation/Polymesh
1,333
defect
f10f523d0135a073f8c8eb8e5c387f055dd9dd4b
1d1caa718cab65b4856d16f4b88e304825ab10f5
MESH-1879/ If a validator stash is moved between identies then running_count may be incorrect
## changelog ### modified logic - made minor changes to running_count insert and delete logic ### data migration required - called Identity `add_account_key_ref_count` function on current validators
diff --git a/pallets/staking/src/lib.rs b/pallets/staking/src/lib.rs index df8162fdf6..0a5dbed57c 100644 --- a/pallets/staking/src/lib.rs +++ b/pallets/staking/src/lib.rs @@ -324,7 +324,7 @@ use frame_system::{ use pallet_identity as identity; use pallet_session::historical; use polymesh_common_utilities::{identity:...
1
1
1
[{"id": "G0", "claim": "Please add tests covering the new stash-key ref-count behaviour: (1) ensure the validator's stash key can't be removed from its identity while validating, and (2) call `chill` to remove the validator and then ensure the stash key can be removed from the identity.", "category": "testing", "verdic...
null
PolymeshAssociation__Polymesh__1348
PolymeshAssociation/Polymesh
1,348
defect
f10f523d0135a073f8c8eb8e5c387f055dd9dd4b
44de47959f0d946b407b6abb3cb86b81ace207f2
MESH-1909/Do not allow an active operator to unbond beyond their 50k minimum operator limit
## changelog ### modified logic - modified unbond function to not allow a validator to unbond leaving less than 50k POLYX bonded
diff --git a/pallets/runtime/tests/src/staking/mod.rs b/pallets/runtime/tests/src/staking/mod.rs index bc01ad7c59..9540d79921 100644 --- a/pallets/runtime/tests/src/staking/mod.rs +++ b/pallets/runtime/tests/src/staking/mod.rs @@ -5819,3 +5819,31 @@ fn test_bond_too_small() { assert_ok!(both(90, 91, MinimumBon...
5
5
3
[{"id": "G0", "claim": "The explicit `bond(50, 51, 500000)` call in the new test is redundant because `bond_validator_with_intended_count` already calls `bond`.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The test should also bond more than 50k and v...
null
PolymeshAssociation__Polymesh__1352
PolymeshAssociation/Polymesh
1,352
defect
0d76397ceefac54156fc50498a09ecf5a6045aa9
d4745b86de1c7064756899174bb24b93108fff76
Add a new settlement type called `ManualExecution`
Add a new variant to the SettlementType enum to allow users to manually execute settlements rather than them being done via the scheduler. ## changelog ### modified logic - Added execute_manual_instruction extrinsic
diff --git a/pallets/settlement/src/lib.rs b/pallets/settlement/src/lib.rs index ee90b149e7..cba695abf5 100644 --- a/pallets/settlement/src/lib.rs +++ b/pallets/settlement/src/lib.rs @@ -203,6 +203,8 @@ pub enum SettlementType<BlockNumber> { SettleOnAffirmation, /// Instruction should be settled on a particul...
13
12
2
[{"id": "G0", "claim": "The `collect::<Vec<_>>()` call is not needed — `iter_prefix` returns an iterator that can be used directly in the `ensure` check below; only collect into a `Vec` if the values are needed later.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": ...
null
PolymeshAssociation__Polymesh__1400
PolymeshAssociation/Polymesh
1,400
defect
116e9faf5cfe8c3fea52f4f0c48d7fd8bdb1e70c
7f2b2a69011526ed69c25d030c73da2c21e6e1a7
MESH-1850/Use `BoundedVec` instead of `Vec` and bounded versions of `BTreeSet`/`BTreeMap`.
## changelog ### modified logic - Change btreeset to bounded version
diff --git a/pallets/runtime/tests/src/transfer_compliance_test.rs b/pallets/runtime/tests/src/transfer_compliance_test.rs index 3dc7bf3bb4..e5d21a3550 100644 --- a/pallets/runtime/tests/src/transfer_compliance_test.rs +++ b/pallets/runtime/tests/src/transfer_compliance_test.rs @@ -999,6 +999,26 @@ fn jurisdiction_owne...
1
1
1
[{"id": "G0", "claim": "The StatType conversion must use `map_err` instead of `map` to map the `try_into` error to `Error::StatTypeLimitReached`.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}]
null
PolymeshAssociation__Polymesh__1411
PolymeshAssociation/Polymesh
1,411
defect
cbfe877b23d20ad5c969f4dfacd74c75e54d2a42
b40a3c83c579fe06e3b245e75f5339486f797a52
MESH-1944 child identities
## changelog ### new features - Identities can create child identities (if they are not a child identity). The child identities share the CDD claim of their parent. - Child identities can be unlinked from their parent identity and receive their own CDD claim from a CDD provider. ### modified API - Added `...
diff --git a/pallets/common/src/traits/identity.rs b/pallets/common/src/traits/identity.rs index 5920614224..916bcd3328 100644 --- a/pallets/common/src/traits/identity.rs +++ b/pallets/common/src/traits/identity.rs @@ -62,13 +62,10 @@ pub struct TargetIdAuthorization<Moment> { pub expires_at: Moment, } -/// It ...
3
1
0
[{"id": "G0", "claim": "The parent-CDD-claims lookup could be simplified: return an empty iterator when `include_parent` is false and otherwise eagerly collect the parent's CDD claims.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The auth-removal logic a...
null
PolymeshAssociation__Polymesh__1487
PolymeshAssociation/Polymesh
1,487
defect
422cd2c039830eeca1da2af623b6766cd447837a
8d27abf512d17cde17d6d2f152d79e5368ddb725
Remove reschedule_instruction extrinsic;
## changelog ### modified API - Removes `reschedule_instruction`; ### modified logic - Failed instructions can be manually executed now
diff --git a/pallets/common/src/traits/settlement.rs b/pallets/common/src/traits/settlement.rs index f68c4a1819..36b78c2974 100644 --- a/pallets/common/src/traits/settlement.rs +++ b/pallets/common/src/traits/settlement.rs @@ -91,7 +91,6 @@ pub trait WeightInfo { fn allow_venues(u: u32) -> Weight; fn disallow...
2
2
2
[{"id": "G0", "claim": "Do not add the placeholder_reschedule_instruction function (or any more placeholder functions) to the settlement pallet.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The failed_execution test should perform a manual execution of...
null
PolymeshAssociation__Polymesh__1546
PolymeshAssociation/Polymesh
1,546
defect
d4a4e25cb8e32aea6336870daa8e329d0347e62e
0d99bdb1e74ad9f8547d60db2d14482328b769dc
MESH-2110/Add storage for tracking an NFT owner
Adds a storage for tracking the owner of an NFT. ## changelog ### data migration - Initializes the new storage with data that already lives on chain.
diff --git a/pallets/nft/src/lib.rs b/pallets/nft/src/lib.rs index 32b3829b04..8b435bb6ae 100644 --- a/pallets/nft/src/lib.rs +++ b/pallets/nft/src/lib.rs @@ -33,7 +33,7 @@ type Portfolio<T> = pallet_portfolio::Module<T>; #[cfg(feature = "runtime-benchmarks")] pub mod benchmarking; -storage_migration_ver!(1); +stor...
3
3
1
[{"id": "G0", "claim": "Consider making the new NFTOwner storage a double map (hasher on Ticker, then NFTId) instead of a single map keyed by the (Ticker, NFTId) tuple, which would allow getting a list of all unburnt NFTs in a collection using the nicer paging interface.", "category": "design", "verdict": "supported", ...
null
PolymeshAssociation__Polymesh__1547
PolymeshAssociation/Polymesh
1,547
defect
d4a4e25cb8e32aea6336870daa8e329d0347e62e
7a248369338b9746074a33b83dee39d5b3f44cbd
MESH-2110/allow-sc-to-create-custodial-portfolios
Adds extrisincs for allowing a smart contract to create and take custody of user portfolios on behalf of an identity. ## changelog ### new features - Adds the following extrisincs: `allow_identity_to_create_portfolios`, `revoke_create_portfolios_permission`, `create_custody_portfolio`;
diff --git a/pallets/common/src/traits/portfolio.rs b/pallets/common/src/traits/portfolio.rs index 6d8a1b4ae9..afc535515a 100644 --- a/pallets/common/src/traits/portfolio.rs +++ b/pallets/common/src/traits/portfolio.rs @@ -100,6 +100,9 @@ pub trait WeightInfo { Self::move_portfolio_funds(f, n) } fn m...
1
1
1
[{"id": "G0", "claim": "The new base_create_custody_portfolio path must emit the PortfolioCustodianChanged event after taking custody of the newly created portfolio.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
PolymeshAssociation__Polymesh__1658
PolymeshAssociation/Polymesh
1,658
defect
8ac0b675c60be283d572a274b8327b19df009158
c06807ab4f460b3a81b508b6df480879af404a8d
Mesh 2176/fix-storage-naming
## changelog ### modified external API - Deprecate the following asset storage: `AssetMetadataNextLocalKey`, `AssetMetadataNextGlobalKey`; - Deprecate the following NFT storage: `NextCollectionId`, `NextNFTId`; ### new external API - Add the following asset storage: `CurrentAssetMetadataLocalKey`, `Curr...
diff --git a/pallets/asset/src/benchmarking.rs b/pallets/asset/src/benchmarking.rs index 5f41c1fa40..1ca290f3c1 100644 --- a/pallets/asset/src/benchmarking.rs +++ b/pallets/asset/src/benchmarking.rs @@ -90,7 +90,7 @@ fn register_metadata_global_name<T: Config>() -> AssetMetadataKey { Module::<T>::register_asset_me...
6
6
0
[{"id": "G0", "claim": "Instead of calling the mutating closure, the old storage value should just be set to `key`, since the mutate operation performs an extra unneeded read.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Instead of calling the mut...
null
PolymeshAssociation__Polymesh__1660
PolymeshAssociation/Polymesh
1,660
defect
8ac0b675c60be283d572a274b8327b19df009158
a1de601d30aad939e2bc9c77c9d55b994ce1bb76
MESH-2152/add-state-trie-migration
## changelog ### other - Adds `pallet_state_trie_migration` to the runtime; - Allows running the trie migration.
diff --git a/Cargo.lock b/Cargo.lock index 6f4942985f..8a46c165da 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5825,6 +5825,23 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "pallet-state-trie-migration" +version = "4.0.0-dev" +source = "git+https://github.com/PolymeshAssociation/polkadot-sdk?branch=poly...
2
1
1
[{"id": "G0", "claim": "The develop runtime's migration deposit constants (MigrationSignedDepositPerItem = 1_000, MigrationSignedDepositBase = 1_000_000) differ from the zeros used for testnet and mainnet, and the reviewer asks why they are different, suggesting zeros could be used for these.", "category": "design", "v...
null
PolymeshAssociation__Polymesh__1688
PolymeshAssociation/Polymesh
1,688
defect
a5ab783f8a83588430ec204c53530b5e977c5adf
aaecf1e47ddf9cf4281dff9afac5486764e60ecf
Fix set-controller and ref count update
## changelog ### other Allow updating the controller if the stash is the same as the controller; Update reference count even if the validator is not a permission-ed identity; ### data migration Update reference count for three keys;
diff --git a/Cargo.lock b/Cargo.lock index 031b378531..6d7df3f545 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5398,6 +5398,7 @@ dependencies = [ "frame-support", "frame-system", "hex", + "hex-literal 0.3.4", "log", "pallet-balances 0.1.0", "pallet-base", diff --git a/pallets/identity/Cargo.toml b/pallets/i...
1
1
0
[{"id": "G0", "claim": "The stash-controller check can be made a little cheaper by skipping the ledger lookup when old_controller equals stash.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
PolymeshAssociation__Polymesh__1704
PolymeshAssociation/Polymesh
1,704
defect
e2a4739c3f38626ed42650adf20ce676de4a4221
c01614f79afbc553dd69fbb33c96883ab5d7c75b
Clean Old Storage; Add Id to Event; Improve rpc call
Mesh-2189 && Mesh-2197 && Mesh-2203 && Mesh-2068 ## changelog ### modified external API * `get_execute_instruction_info` call returns an option; * removes the following nft storage: `NextCollectionId`, `NextNFTId`; * removes the following asset storage: `AssetMetadataNextLocalKey`, `AssetMetadataNextGlobalK...
diff --git a/pallets/asset/src/lib.rs b/pallets/asset/src/lib.rs index a7f3ba37fa..068dc0c872 100644 --- a/pallets/asset/src/lib.rs +++ b/pallets/asset/src/lib.rs @@ -206,15 +206,6 @@ decl_storage! { pub AssetMetadataGlobalSpecs get(fn asset_metadata_global_specs): map hasher(twox_64_concat) Asset...
1
1
1
[{"id": "G0", "claim": "The PR removes the deprecated AssetMetadataNextLocalKey and AssetMetadataNextGlobalKey storage without a migration to clear them.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
PolymeshAssociation__Polymesh__1739
PolymeshAssociation/Polymesh
1,739
defect
2dfde746f50e797f648103bf0c563969e2883641
ed089cd70718127d9110b8b62177fbe455cb02b2
Small fixes
## changelog ### modified external API - Removes deprecated extrinsics from the utility pallet: `batch_old`, `batch_atomic`, `batch_optimistic`; - Adds `SelfAdditionNotAllowed` restriction in the `allow_identity_to_create_portfolios` extrinsic; ### modified events - Removes the following events from the util...
diff --git a/pallets/asset/src/lib.rs b/pallets/asset/src/lib.rs index 613ab74bb6..c195e4d0bd 100644 --- a/pallets/asset/src/lib.rs +++ b/pallets/asset/src/lib.rs @@ -565,8 +565,11 @@ decl_module! { #[weight = <T as Config>::WeightInfo::create_asset( asset_name.len() as u32, asset_ide...
1
1
1
[{"id": "G0", "claim": "The extrinsic call_index values should be left fixed; changing them (as the PR does for as_derivative) will require a change to the transaction_version and an update to the Ledger app.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
PolymeshAssociation__Polymesh__1753
PolymeshAssociation/Polymesh
1,753
defect
83535d2b9effb4d2b7de784aec85678bb6711a9c
8ff23541353cda8f74f4f085ec7c065e7e72e658
Update pallet to use new macros
## changelog ### other - Update pallet to use new macros;
diff --git a/pallets/runtime/tests/src/relayer_test.rs b/pallets/runtime/tests/src/relayer_test.rs index 90c483e40a..47407bcebb 100644 --- a/pallets/runtime/tests/src/relayer_test.rs +++ b/pallets/runtime/tests/src/relayer_test.rs @@ -28,7 +28,7 @@ type Identity = pallet_identity::Module<TestStorage>; type AccountKeyR...
1
1
1
[{"id": "G0", "claim": "The `TransactionByteFee` and `WeightToFee` constants must be exported with `#[pallet::constant]` in the new `Config` trait.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
PolymeshAssociation__Polymesh__1827
PolymeshAssociation/Polymesh
1,827
defect
6a62ecafdcc55657f22466eebabd0677ff12f298
76b44894da5ed7af10c84cef6f962681b8df99b7
Soften CDD requirement
## changelog ### other - Moves the CDD check from the Signed Extension to the Identity pallet. This will remove the need for CDD for some extrinsics; - Adds the following errors to the identity pallet: `UnauthorizedCallerFrozenDid`, `UnauthorizedCallerDidMissingCdd`, `UnauthorizedCallerMissingPermissions`
diff --git a/pallets/identity/src/keys.rs b/pallets/identity/src/keys.rs index 983c04e59a..387e1d7da8 100644 --- a/pallets/identity/src/keys.rs +++ b/pallets/identity/src/keys.rs @@ -891,7 +891,8 @@ impl<T: Config> Pallet<T> { Ok(()) } - /// Ensures that `origin`'s key is the primary key of a DID. + ...
8
6
5
[{"id": "G0", "claim": "check_account_call_permissions should use the MissingIdentity error for the MultiSigSignerKey variant instead of UnauthorizedCallerMultisigKey, since MS signer keys cannot be linked to a MS and a DID.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id"...
null
PolymeshAssociation__Polymesh__1828
PolymeshAssociation/Polymesh
1,828
defect
680ff78fff31d20b7c246181db13055da6028c17
4b1bc94cffaff66e046fe9fecf8d6a5b4ef32e7b
Disallow custody remove cdd
## changelog ### other - Adds the following error to the portfolio pallet: `DefaultPortfoliosCannotHaveCustodians`; - Remove ability to accept custody of a default portfolio; - Remove CDD checks for nominators;
diff --git a/pallets/identity/src/auth.rs b/pallets/identity/src/auth.rs index 33bc4c1a8e..33ec782867 100644 --- a/pallets/identity/src/auth.rs +++ b/pallets/identity/src/auth.rs @@ -20,7 +20,7 @@ use crate::{ use frame_support::dispatch::DispatchResult; use frame_support::ensure; use frame_system::ensure_signed; -u...
1
1
0
[{"id": "G0", "claim": "The default-portfolio-custody checks in add_auth should be done when the authorization is accepted instead, so add_auth does not accumulate checks for many different authorization kinds.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
PolymeshAssociation__Polymesh__1856
PolymeshAssociation/Polymesh
1,856
defect
44b85c0187275372fcdaa277eca7be955144daea
ea1565e1a0f3127d8ef743b7b2db17e8914a6d3a
Soften CDD requirements part II; Add TransferWithMemo event
## changelog ### new events - Adds `TransferWithMemo` to the balances pallet; ### other - Removes cdd check from relayer; - Removes cdd check from relay_tx;
diff --git a/pallets/balances/src/lib.rs b/pallets/balances/src/lib.rs index 5165a8d003..8560cc0e09 100644 --- a/pallets/balances/src/lib.rs +++ b/pallets/balances/src/lib.rs @@ -319,6 +319,13 @@ pub mod pallet { /// Final argument indicates the destination balance type. /// \[from, to, balance, desti...
4
2
0
[{"id": "G0", "claim": "The new event should be named `TransferMemo` to match the variant added to the Substrate balances pallet (or the Substrate event should be renamed instead).", "category": "correctness", "verdict": "opposed", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The `memo.clone()` pass...
null
PolymeshAssociation__Polymesh__1862
PolymeshAssociation/Polymesh
1,862
defect
34e028641140ad67056609dc3c0b4ce75f4d8b9a
8bb14efa42e5abc5a71155efc0aa2afaa32681e0
Add account key base asset transfer support.
## changelog ### new features - Add support for account based asset transfers. ### new external API - Added extrinsics `transfer_asset`, `receiver_affirm_asset_transfer` and `reject_asset_transfer` to the Asset pallet. ### new events - Added event `CreatedAssetTransfer { asset_id: AssetId, from: Accou...
diff --git a/pallets/asset/src/benchmarking.rs b/pallets/asset/src/benchmarking.rs index 071822ed21..9b2fa32eae 100644 --- a/pallets/asset/src/benchmarking.rs +++ b/pallets/asset/src/benchmarking.rs @@ -127,7 +127,7 @@ pub(crate) fn create_and_issue_sample_asset<T: AssetConfig>(asset_owner: &User<T Pallet::<T>::is...
12
10
1
[{"id": "G0", "claim": "The doc comment for the new transfer extrinsic misspells \"the\" as \"ther\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new event's documentation misspells \"transferred\" as \"transfered\".", "category": "document...
null
PolymeshAssociation__Polymesh__1863
PolymeshAssociation/Polymesh
1,863
defect
3bc74ac447f13163beddb169c3bf962c8fecf459
094a7ee09b2a6d2ba00dbeccd2752a9bd048fb15
Fix tx_payment `TransactionExtensions`; Use `call_weight` instead of `total_weight`
## changelog ### other - Fix tx_payment TransactionExtensions; - Change `total_weight` to `call_weight`;
diff --git a/pallets/committee/src/lib.rs b/pallets/committee/src/lib.rs index d9ec015a99..56aa60b62d 100644 --- a/pallets/committee/src/lib.rs +++ b/pallets/committee/src/lib.rs @@ -401,7 +401,7 @@ pub mod pallet { /// * `FirstVoteReject`, if `call` hasn't been proposed and `approve == false`. /// * ...
5
3
3
[{"id": "G0", "claim": "prepare re-validates the tip with ensure_valid_tip although the Val comes from validate, so the tip from Val::Charge should be used directly and the redundant check removed.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The ...
null
PolymeshAssociation__Polymesh__1869
PolymeshAssociation/Polymesh
1,869
defect
34e028641140ad67056609dc3c0b4ce75f4d8b9a
20236e027f48548d7dc5321a86c3e288dd549aec
Change Fee Handler
### other - Update CddHandler to decrease [`Authorization.count`] every time the any of the following extrinsics fail: - pallet-identity (accept_primary_key, join_identity_as_key, rotate_primary_key_to_secondary); - pallet-relayer (accept_paying_key) - pallet-multisig (accept_multisig_signer)
diff --git a/pallets/identity/src/auth.rs b/pallets/identity/src/auth.rs index d5984c39ae..e3a00f98a9 100644 --- a/pallets/identity/src/auth.rs +++ b/pallets/identity/src/auth.rs @@ -166,6 +166,7 @@ impl<T: Config> Pallet<T> { auth.expiry .filter(|&expiry| <pallet_timestamp::Pallet<T>>::ge...
6
5
2
[{"id": "G0", "claim": "The Pre type should store Option<u64> (the auth_id) instead of the whole call, because the call can be 1-2MB for chain upgrades and storing it would waste memory and risk an out-of-memory error during a chain upgrade.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "in...
null
PolymeshAssociation__Polymesh__1896
PolymeshAssociation/Polymesh
1,896
defect
d2e3192d06705f840265d66d5881306c662fff47
70d3a0222fce908a349a09b1409e57a7105c68d9
Fix distroless healthcheck
## changelog ### other - Fix docker HEALTHCHECK in our Distroless image. - Update RPC port to 9944 in health-check and rotate-keys tools. - Fix deterministic build of Testnet runtime. - Fix contracts gas limit in Rust integration tests.
diff --git a/.docker/Dockerfile.distroless b/.docker/Dockerfile.distroless index 64067be0c2..f35ae8fd2f 100644 --- a/.docker/Dockerfile.distroless +++ b/.docker/Dockerfile.distroless @@ -19,9 +19,13 @@ RUN apt update && \ mkdir /var/lib/polymesh && \ chown 4001:4001 /var/lib/polymesh +FROM busybox:stable-uc...
2
2
1
[{"id": "G0", "claim": "The same BusyBox shell fix should also be applied to .docker/arm64/Dockerfile.distroless (with an arm64-appropriate busybox image), because the arm64 distroless image will still fail its health check without a shell.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope":...
null
PolymeshAssociation__Polymesh__1915
PolymeshAssociation/Polymesh
1,915
defect
cc61652254778d0a1fd81121c159cd89b171f127
0773f2c03a9a5d640e5e26c71227869f6638b607
Reject duplicate venue signers in `create_venue` and `update_venue_signers`
## changelog ### modified external API - Changed `signers` parameter in `create_venue` and `update_venue_signers` from `Vec<AccountId>` to `BTreeSet<AccountId>` to avoid duplicate signers - Changed `VenueSignersUpdated` event to use `BTreeSet<AccountId>`
diff --git a/pallets/runtime/tests/src/settlement_test.rs b/pallets/runtime/tests/src/settlement_test.rs index 3675beb75a..3a0aecfdf0 100644 --- a/pallets/runtime/tests/src/settlement_test.rs +++ b/pallets/runtime/tests/src/settlement_test.rs @@ -2317,6 +2317,59 @@ fn assert_number_of_venue_signers() { }) } +#[...
1
1
0
[{"id": "G0", "claim": "Change create_venue to take the venue signers as a BTreeSet instead of the Vec-with-runtime-duplicate-check, and do the same for update_venue_signers.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
PolymeshAssociation__Polymesh__274
PolymeshAssociation/Polymesh
274
defect
ba44f08b6331a9bf99e155bd0c82ad2c3bd4f099
4ffffaec54598694088a68f3558f787d82dda783
Mesh 826/systematic cdd claims
This PR covers MESH-788 & MESH-789. It automatically generates CDD claims (a.k.a. Systematic CDD Claims) for any Identity which is added to GC or CDD Trusted Providers. Once a member of those groups is removed, that claim is revoked too. There are two Systematic Claim Issuer, one for each group. I did that to supp...
diff --git a/pallets/committee/Cargo.lock b/pallets/committee/Cargo.lock index f8941f8983..0d646a6275 100644 --- a/pallets/committee/Cargo.lock +++ b/pallets/committee/Cargo.lock @@ -2230,6 +2230,7 @@ version = "0.1.0" dependencies = [ "frame-support", "frame-system", + "pallet-session", "pallet-timestamp", "p...
3
2
0
[{"id": "G0", "claim": "Add a dev note on the committee pallet's change_members_sorted documenting that it specifically uses SystematicIssuers::GovernanceCommittee as the CDD issuer, so that if multiple instances of this module were used a different implementation of these functions should be used (as is done for CDD p...
null
PolymeshAssociation__Polymesh__316
PolymeshAssociation/Polymesh
316
defect
63859d54ad3ead3d5eca5d202652444bdc94163b
42a47fde7215a388b73976f57961c4484f262f76
MESH-877: a burn extrinsic
Requirements were unclear, so let's determine them during peer review.
diff --git a/pallets/balances/src/lib.rs b/pallets/balances/src/lib.rs index 4c3e84cb81..5520981fd1 100644 --- a/pallets/balances/src/lib.rs +++ b/pallets/balances/src/lib.rs @@ -462,6 +462,22 @@ decl_module! { let dest = T::Lookup::lookup(dest)?; Self::transfer_core(&source, &dest, value, Non...
3
3
3
[{"id": "G0", "claim": "The burn should be implemented with `Currency::withdraw()` plus `Currency::burn()` (or, failing that, replicate the checks such as `ensure_can_withdraw()` that those functions perform) so the withdraw checks are not missed.", "category": "correctness", "verdict": "supported", "priority": "P1", "...
null
PolymeshAssociation__Polymesh__352
PolymeshAssociation/Polymesh
352
defect
7a4d13a84229f357e2d7c2c0b164cf7e36d04a23
772b7389adbefb958f819a524d74ea9da8842b07
Frozen Signatory transfers
It adds (and fixes) the following UT: 1. Bob (signing key of Alice's Id) cannot transfer POLYX from itself to any other account while it is frozen. 2. Bob cannot do some other operations on Alice'is (i.e. create an asset).
diff --git a/pallets/balances/src/lib.rs b/pallets/balances/src/lib.rs index 414691c124..37b9ca64fb 100644 --- a/pallets/balances/src/lib.rs +++ b/pallets/balances/src/lib.rs @@ -223,7 +223,9 @@ decl_error! { /// AccountId is not attached with Identity UnAuthorized, /// Receiver does not have...
5
5
4
[{"id": "G0", "claim": "In the balances transfer the dest_key is built from `transactor` instead of `dest`, so the receiver CDD check inspects the wrong account.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The sender's CDD should be checked in th...
null
PolymeshAssociation__Polymesh__501
PolymeshAssociation/Polymesh
501
defect
da400ddcb2dffbd30c6208fa6b984a6d70493c5d
981199a4057375306ce8200c928839c26451f769
Mesh 1039/Allow compliance management based on sender/receiver's did
1) Remove special cases for issuance/redemption on the basis of the treasury. 2) Add a new rule type to specify the sender/receiver identity (specific static or dynamic treasury). These rules are meant to be used to specify issuance/redemption rules. CM can now also be used as allowlist/blocklist TM. 3) Issuance func...
diff --git a/pallets/asset/src/benchmarking.rs b/pallets/asset/src/benchmarking.rs index 11a39038a2..5de284cea1 100644 --- a/pallets/asset/src/benchmarking.rs +++ b/pallets/asset/src/benchmarking.rs @@ -237,29 +237,7 @@ benchmarks! { // Token amount. let a in 1 .. 1_000_000; let (_, alice_ori...
2
2
1
[{"id": "G0", "claim": "The name `Match`/`MatchPredicate` is too generic for a predicate that makes a statement about the treasury/target identity, and should be replaced with something more descriptive (e.g. `Treasury` or `TreasuryIdentity`).", "category": "maintainability", "verdict": "supported", "priority": "P2", "...
null
PolymeshAssociation__Polymesh__537
PolymeshAssociation/Polymesh
537
defect
05189845b74124d8cad571522c7f91e81ac0d8e6
9f231d070f9e576025cbb1449215ee3f7fa03a24
MESH-1175/ Set MAX_LIMIT of TM Extensions
It also consist changes in [settlement](https://github.com/PolymathNetwork/polymesh-settlement-module/compare/6265f21...e5a720b) pallet
diff --git a/pallets/asset/src/lib.rs b/pallets/asset/src/lib.rs index 0ab54f1d6b..966ce513f7 100644 --- a/pallets/asset/src/lib.rs +++ b/pallets/asset/src/lib.rs @@ -90,9 +90,10 @@ use core::result::Result as StdResult; use currency::*; use frame_support::{ decl_error, decl_event, decl_module, decl_storage, - ...
8
5
0
[{"id": "G0", "claim": "The doc comment on MaximumTMExtensionLimitReached should be reformatted as suggested (`asset >= MAX_TM_EXT_LIMIT` in backticks).", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The `return Ok(...)` inside the `Ok(if ...)` in...
null
PolymeshAssociation__Polymesh__550
PolymeshAssociation/Polymesh
550
defect
4df6d1912d7e30bfcd32a4a1593a1679b052307b
69c3cb5f1ffa3833780a0b15aa978ffa7284c0df
Create confidential asset pallet
~I duplicated the asset pallet into confidentail-asset pallet and made some notes on the things that need changing.~ ~Submitting this PR to have a discussion. A related (more high level) discussion is also happening on https://polymath.atlassian.net/wiki/spaces/CE/pages/664403973/Data+structures+and+their+placement~ ...
diff --git a/.gitmodules b/.gitmodules index aacbd8f173..2a416e452f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,7 @@ [submodule "external/cryptography"] path = external/cryptography url = git@github.com:PolymathNetwork/cryptography.git - branch = master + branch = develop [submodule "pallets/settlemen...
3
2
1
[{"id": "G0", "claim": "The confidential-asset pallet should not support the transfer(), transfer_from(), redeem() and redeem_from() dispatchables — every asset transfer, confidential or non-confidential, should go through the settlement module.", "category": "design", "verdict": "supported", "priority": "P1", "scope":...
null
PolymeshAssociation__Polymesh__659
PolymeshAssociation/Polymesh
659
defect
76a5e659ec9ad5617ddd56edcae484376704f2b6
bd8dd918e1cb752539da21476129fd85c42daac7
Move to `develop` cryptography branch, and generalise scopes
- use `develop` branch from cryptography repo - pass bytes to confidential identity library rather than scalars - generalise proof scopes - fix for claim type schema
diff --git a/Cargo.lock b/Cargo.lock index b21bfc0c39..6d694f0da9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1125,10 +1125,11 @@ dependencies = [ [[package]] name = "cryptography" version = "0.1.0" -source = "git+https://github.com/PolymathNetwork/cryptography.git?branch=master#dc249f0417168a67569000aefea2ed930b7c...
3
1
1
[{"id": "G0", "claim": "The Ticker import into valid_proof_of_investor.rs behaves inconsistently between CI systems: without the import the Concourse build fails, with the import the CircleCI test fails.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim":...
null
PolymeshAssociation__Polymesh__683
PolymeshAssociation/Polymesh
683
defect
64d401fa0870ac3432adc98bc0abfea1372a8a30
5491237879322035aed5ecd968f9051ee0b1de44
Cryp 169/end to end test
Added base64 to binary types that were causing troubles during my end-to-end test of confidential transfer.
diff --git a/pallets/confidential-asset/src/lib.rs b/pallets/confidential-asset/src/lib.rs index 4ea42fe086..378ce3f064 100644 --- a/pallets/confidential-asset/src/lib.rs +++ b/pallets/confidential-asset/src/lib.rs @@ -56,14 +56,35 @@ pub trait Trait: frame_system::Trait + IdentityTrait + statistics::Trait { type ...
2
2
0
[{"id": "G0", "claim": "Base64Vec should be defined in the primitives crate and imported by the settlement and confidential-asset pallets instead of being defined separately in each pallet.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The error variant...
null
PolymeshAssociation__Polymesh__705
PolymeshAssociation/Polymesh
705
defect
f2f15b3c306472e6e365340de282a72d8bf2bab9
4d2d3520178d07095cd9f27065b641ed9f5c5745
MESH-1272: Implement Corporate Ballots
Based on https://github.com/PolymathNetwork/Polymesh/pull/692. Will add tests in a different PR.
diff --git a/pallets/asset/src/checkpoint.rs b/pallets/asset/src/checkpoint.rs index 993cd5c3be..c0a59f7693 100644 --- a/pallets/asset/src/checkpoint.rs +++ b/pallets/asset/src/checkpoint.rs @@ -563,7 +563,7 @@ impl<T: Trait> Module<T> { } /// Returns the current UNIX time, i.e. seconds since UNIX epoch, 19...
13
12
1
[{"id": "G0", "claim": "The ballot's title should use a dedicated `BallotTitle` type instead of reusing `MotionTitle`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "`BallotRange` and the `Ranges` storage item should be renamed so the names refl...
null
PolymeshAssociation__Polymesh__733
PolymeshAssociation/Polymesh
733
defect
130f38f81181b2195002c198e86ba5cfcdcbdac3
bed61ea7cbb0bd32e3ac3e014390a2f9ba4ee580
Mesh 1349/update permissions
- Portfolio permissions are now PortfolioId based instead of PortfolioNumber based - Added checking of Portfolio and Asset permissions
diff --git a/Cargo.lock b/Cargo.lock index a4a9c805a5..ae3762abc3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4558,6 +4558,7 @@ version = "0.1.0" dependencies = [ "frame-support", "frame-system", + "pallet-asset", "pallet-balances 0.1.0", "pallet-identity", "pallet-timestamp", diff --git a/pallets/asset/src...
5
2
0
[{"id": "G0", "claim": "The settlement module carries a leftover commented-out draft of ensure_portfolios_and_affirmation_status that should either be cleaned up or completed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Please explain why the...
null
PolymeshAssociation__Polymesh__762
PolymeshAssociation/Polymesh
762
defect
c4c9fbe6e19ae00043f884a680fd543d50ecc507
e2c5e2b4d0dd1cc83b67a2991f69060539b125bd
Add benchs to Asset
Benchmarks for Asset pallets. I've also added some **length constraints** to some _unbounded types_: - Asset name, limited by `AssetNameMaxLenght`(default = 128), - Name of the funding round, limited by `FundingRoundNameMaxLength` (default = 128) Other stuff: - Use of `schnorrkell` from `cryptography` library...
diff --git a/pallets/asset/src/benchmarking.rs b/pallets/asset/src/benchmarking.rs index 61acf8c99d..0d6f20092e 100644 --- a/pallets/asset/src/benchmarking.rs +++ b/pallets/asset/src/benchmarking.rs @@ -15,52 +15,119 @@ #![cfg(feature = "runtime-benchmarks")] use crate::*; -use frame_benchmarking::benchmarks; -use ...
3
2
0
[{"id": "G0", "claim": "The MaxIdentifiersPerAsset trait parameter is not needed and should be removed: the weight is based on the number of identifiers and the max-weight limit already caps them indirectly.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": ...
null
PolymeshAssociation__Polymesh__805
PolymeshAssociation/Polymesh
805
defect
d998d23cd5f59a30b52ba7001d6516090cff1c0d
0a000ef03e824c6761995d051c4628fa993732da
MESH-1422: correctly check permissions in batches
## changelog ### modified behaviour * Portfolio module name corrected (was: Session) and runtime upgrade is implemented for all portfolio storage items. * Utility batch functions no longer require extrinsic permissions (but batched extrinsics still do).
diff --git a/Cargo.lock b/Cargo.lock index 800d6868c6..4e76406cab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4811,8 +4811,6 @@ dependencies = [ "hex", "hex-literal 0.2.1", "pallet-balances 0.1.0", - "pallet-identity", - "pallet-indices", "pallet-permissions", "parity-scale-codec", "polymesh-common-utiliti...
10
10
2
[{"id": "G0", "claim": "The new batch permissions test could be cleaned up a bit by using the `User` abstraction from `pips_test`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The `Permissions` literal for Bob should use `..Permissions::defaul...
null
PolymeshAssociation__Polymesh__809
PolymeshAssociation/Polymesh
809
defect
4131f59c57740b686663877060196685ca263e4a
df9831f083ca2161d60f21c79bfa1faeb70fcdc6
MESH-1409/Add check for zero balance during revoke of IU claim
## Changelog ### Modified behavior - Removal of IU claim is only allowed when the target ScopeId has 0 balance.
diff --git a/Cargo.lock b/Cargo.lock index b5db014686..b7bf5a837b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4786,6 +4786,7 @@ dependencies = [ name = "pallet-treasury" version = "0.1.0" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "pallet-balances 0.1.0", @@ -5412,6 +5413,7 @@ d...
6
5
0
[{"id": "G0", "claim": "The new zero-balance check should perhaps use an existential-deposit-style threshold (balance_of_at_scope < Balances::ExistentialDeposit::get()) instead of requiring exactly zero, unless that would create a circular dependency, in which case it is better avoided.", "category": "correctness", "ve...
null
PolymeshAssociation__Polymesh__811
PolymeshAssociation/Polymesh
811
defect
f24ed016370c70d4703b8f10b30c66db4df71daa
0eaff92ed8dddca23c567313162bae852e2e8b25
MESH-1483: Rename valid_from to trade_date and add value_date
I haven't added runtime migration as I think it is fine for the `value_date` of previous instructions to be `None`. ## changelog ### new features - Capture `value_date` of an instruction. ### modified API - Modified `add_instruction` and `add_and_affirm_instruction` by renaming `valid_from` to `trade_dat...
diff --git a/Cargo.lock b/Cargo.lock index b5db014686..b7bf5a837b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4786,6 +4786,7 @@ dependencies = [ name = "pallet-treasury" version = "0.1.0" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "pallet-balances 0.1.0", @@ -5412,6 +5413,7 @@ d...
2
1
1
[{"id": "G0", "claim": "Remove the check that the current time is at or after the instruction's trade_date so issuers can record trades that already happened offchain.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "trade_date and value_date should be com...
null
PolymeshAssociation__Polymesh__817
PolymeshAssociation/Polymesh
817
defect
8979866e4f9251bc909273d01a3714b24521362b
6ca6b4b082b33ab8d505aa45e010f8fe25a07511
MESH-1095/DocumentHash
## Description - `DocumentHash` type is not limited to the output of the most common hash functions. - Migration of `Document` added in asset module. - **Optimization**: It uses `migrate_double_map_only_values` which works directly with iterators (`collect` is not needed) and allows the caller to handle errors duri...
diff --git a/pallets/asset/src/benchmarking.rs b/pallets/asset/src/benchmarking.rs index 9b74655d9b..d548503477 100644 --- a/pallets/asset/src/benchmarking.rs +++ b/pallets/asset/src/benchmarking.rs @@ -78,7 +78,7 @@ fn make_base_asset<T: Trait>(owner: &User<T>, divisible: bool) -> Ticker { pub fn make_document() -> D...
2
2
1
[{"id": "G0", "claim": "Dropping the `.collect()` before iterating the drained double map is unsound, because writing values back during the loop can overwrite other map entries whose keys hash to the same slot, so the optimization should be reverted and a comment added explaining why the collect is needed.", "category...
null
PolymeshAssociation__Polymesh__818
PolymeshAssociation/Polymesh
818
defect
455284c0d8681ddd7c245ec024c7008c71c40115
19eac22a10ea446286bab0751a47863e5447e94e
MESH-1413: ASCII-only tickers
## changelog ### modified logic - A `Ticker` must now consist of ASCII characters or error `TickerNotAscii` occurs at registration or asset creation time. Not applied retroactively to existing tickers.
diff --git a/pallets/asset/src/lib.rs b/pallets/asset/src/lib.rs index d5e3ae0a60..6730dbdc4a 100644 --- a/pallets/asset/src/lib.rs +++ b/pallets/asset/src/lib.rs @@ -529,6 +529,11 @@ decl_module! { TickerRegistrationStatus::Available => true, }; + // If `ticker` isn't registe...
1
1
1
[{"id": "G0", "claim": "The ticker characters need to be restricted to the printable, non-extended ASCII range [32-126], whereas the check added in S1 only requires is_ascii() and so accepts non-printable control bytes (0-31, 127).", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introdu...
null
PolymeshAssociation__Polymesh__827
PolymeshAssociation/Polymesh
827
defect
3ae74e299f8cbe94073235e8a948d0279a8a48eb
3b2af7d4f275b8a344fc7a2fd07d949706bfbf8c
MESH-1433: Introduce limits for fixed values in CA extrinsic weights
## changelog ### modified logic - `set_default_targets(..., targets)` requires that the number of DIDs in `targets` <= a new limit, or an error occurs. The error occurs also in `ìnitiate_corporate_action` if `targets` is provided under the same condition. - `set_did_withholding_tax(..., did, Some(tax))` requir...
diff --git a/pallets/corporate-actions/src/ballot/mod.rs b/pallets/corporate-actions/src/ballot/mod.rs index 21d0231ae5..69f3456710 100644 --- a/pallets/corporate-actions/src/ballot/mod.rs +++ b/pallets/corporate-actions/src/ballot/mod.rs @@ -86,6 +86,7 @@ use frame_support::{ decl_error, decl_event, decl_module, ...
2
2
0
[{"id": "G0", "claim": "The identity-count limit check in `ensure_target_ids_limited` should compare `usize` lengths directly (`targets.identities.len() <= T::MaxTargetIds::get() as usize`) instead of converting through `try_into().unwrap_or(u32::MAX)`.", "category": "maintainability", "verdict": "supported", "priority...
null
PolymeshAssociation__Polymesh__839
PolymeshAssociation/Polymesh
839
defect
642be231277f96440243d4adcd4c1701d100695c
e803b024f53170e9ae962a0b48200953db3b12e8
MESH-1418/Enforce cdd_id uniqueness
## changelog ### modified logic - Either a single (unique within its claims) cdd_id is allowed for a given identity or it can be `default_cdd_id()` only if the claims issuer is the systematic issuers. Ex - Alice can have default_cdd_id() that is provided by the systematic issuers and Alice can also possess one no...
diff --git a/Cargo.lock b/Cargo.lock index 30900aa448..125a3791f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1328,6 +1328,26 @@ version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +[[package]] +name = "enu...
10
10
1
[{"id": "G0", "claim": "base_fetch_valid_cdd_claims can be made lazy (return impl Iterator) to avoid collecting the entire vector.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The explicit .into_iter() call in base_fetch_key_cdd_claims is redundan...
null
PolymeshAssociation__Polymesh__840
PolymeshAssociation/Polymesh
840
defect
6b8f5913bb742f3f034a73905b2fc5568b7f98a7
ce859b28f1715bdbbaa22fcce574613a2b938256
Refactored Multisig benchmarks
It was not possible to predict `change_all_signers_and_sigs_required` gas cost since we don't know how many signers will be removed. We would have had to take that as input from the user. I removed this function altogether in favor of using the generic `utility.batch`. ## changelog ### modified API - `change_a...
diff --git a/pallets/multisig/src/benchmarking.rs b/pallets/multisig/src/benchmarking.rs index a2e2c010cf..b9dacbd0ed 100644 --- a/pallets/multisig/src/benchmarking.rs +++ b/pallets/multisig/src/benchmarking.rs @@ -17,7 +17,7 @@ use crate::*; use frame_benchmarking::benchmarks; use frame_system::RawOrigin; -use poly...
4
1
0
[{"id": "G0", "claim": "The `create_or_approve_proposal_as_identity` extrinsic should not declare a `DispatchResult` return type (and the trailing `Ok(())` should be dropped), i.e. it should just return unit.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim":...
null
PolymeshAssociation__Polymesh__841
PolymeshAssociation/Polymesh
841
defect
76105c7c5e726c81a73eb0756732a949d630c4c2
b10a1ded573d01f7bbaf8ecad75a193dadf20c4e
MESH-1431/Allow fix rewards
## changelog ### modified logic - Introduce a fixed reward process, Which will kick in whenever the `total_issuance()` >= `MaxInflatedTotalIssuance::get()`.
diff --git a/Cargo.lock b/Cargo.lock index 5bef65cceb..427da26844 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4644,6 +4644,7 @@ dependencies = [ "pallet-babe", "pallet-identity", "pallet-session", + "pallet-staking-reward-curve", "parity-scale-codec", "polymesh-common-utilities", "polymesh-primitives", dif...
6
6
0
[{"id": "G0", "claim": "The comment '// Check whether the fixed rewards kicks in?.' should be reworded to '// Have fixed rewards kicked in?'.", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The repetitive assert_eq blocks calling compute_total_payo...
null
PolymeshAssociation__Polymesh__848
PolymeshAssociation/Polymesh
848
defect
edb9e877e44a789050677b6f2045b634a400a610
5ad624139931b97b0e33d7d993514d7d68a9889b
Mesh 1460/STO improvements
## changelog ### new features - STOs can now have a name and a minimum investment amount. ### modified API - `Fundraiser` data struct changed to contain the STO status and min investment amount, Schema update required. - `FundraiserCreated` event changed to contain the STO name.
diff --git a/Cargo.lock b/Cargo.lock index 427da26844..8e51d62f82 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4736,6 +4736,7 @@ dependencies = [ "parity-scale-codec", "polymesh-common-utilities", "polymesh-primitives", + "polymesh-primitives-derive", "serde", "serde_derive", "sp-api", diff --git a/pallets/...
6
2
1
[{"id": "G0", "claim": "The doc comment on the Live variant should say a fundraiser is open for investments when start_time <= current_time < end_time, not start_time < current_time.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Use an Option ins...
null
PolymeshAssociation__Polymesh__856
PolymeshAssociation/Polymesh
856
defect
a0fda73803ca9a4469c103b77feb69b254b01f45
60b018f2ca9873289ef5d0e3d77568751dc837b7
Minor refactoring of settlement benchmarks and a bug fix
Please review the PR only for the changes I've made. This is not a full cleanup/refactor. This only contains changes that I had to make to get proper results. ## changelog ### modified API - `affirm_with_receipts` now takes one more parameter, `max_legs_count` - the no. of legs in which the sender portfolio i...
diff --git a/Cargo.lock b/Cargo.lock index 6dfffdf6a5..a5b83f0969 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4399,6 +4399,7 @@ name = "pallet-indices" version = "2.0.0" source = "git+https://github.com/paritytech/substrate?tag=v2.0.0#a200cdb93c6af5763b9c7bf313fa708764ac88ca" dependencies = [ + "frame-benchmarking"...
6
5
1
[{"id": "G0", "claim": "The rewritten claim lookup (fetching the claim before the contains_key check) should regress performance, so the change should not be made.", "category": "performance", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Introducing a temporary variable in th...
null
PolymeshAssociation__Polymesh__857
PolymeshAssociation/Polymesh
857
defect
a0fda73803ca9a4469c103b77feb69b254b01f45
966a9f1a1eaaabcc2b95b754ab9d21f7c1e072e1
MESH-1456, MESH-1464, MESH-1459: In committee, nix `close` + only use dynamic threshold
## changelog ### modified API - `committee::RawOrigin` is now a zero sized type (ZST) and simplified. - `close` extrinsic was removed. `Closed` event and errors `CloseBeforeVoteEnd` and `NotAllowed` are removed as a result.
diff --git a/Cargo.lock b/Cargo.lock index 6dfffdf6a5..8830830560 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4101,6 +4101,7 @@ dependencies = [ "parity-scale-codec", "polymesh-common-utilities", "polymesh-primitives", + "polymesh-primitives-derive", "serde", "serde_derive", "sp-api", @@ -4399,6 +4400,7 @@...
6
4
1
[{"id": "G0", "claim": "The variant named `Condoned` carries negative connotations; rename it to something more positive such as `Approved` or `Endorsed`.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Using `VoteThresholdOrigin` for `set_vote_t...
null
PolymeshAssociation__Polymesh__869
PolymeshAssociation/Polymesh
869
defect
5eb77a9fd9dc0af3dcf5bce671ae8fa28e7a2375
69ff0ed28af285aad4131b46969dcc3af760d5a8
Fixed minor bugs in sto
## changelog ### Internal - Minimum investment amount is now checked correctly against the payment tokens instead of the offering token. - Accounted for `price_divisor` when checking for max price. - No longer checks that the sender is an asset holder since 0 amount transfers are allowed.
diff --git a/pallets/runtime/tests/src/sto_test.rs b/pallets/runtime/tests/src/sto_test.rs index 109298f892..23c4d17c58 100644 --- a/pallets/runtime/tests/src/sto_test.rs +++ b/pallets/runtime/tests/src/sto_test.rs @@ -182,11 +182,39 @@ fn raise_happy_path() { offering_ticker, fundraiser_id, ...
3
1
0
[{"id": "G0", "claim": "Check that max_price isn't Some(0) to avoid a division by zero in the max-price check.", "category": "correctness", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "price_divisor should be a common constant rather than what it currently is.", "category": "ma...
null
PolymeshAssociation__Polymesh__873
PolymeshAssociation/Polymesh
873
defect
d7bfeecbebfe927725ebeb2a531610d59de19b96
144c3f78791fe182f4de9c63d93f4a1e0394c90b
Execute legs in order
Added an unrelated test case, plus: ## changelog ### modifed logic - Legs of a settlement instruction are now executed in order.
diff --git a/pallets/asset/src/lib.rs b/pallets/asset/src/lib.rs index f59833e7c4..b2e10dbd70 100644 --- a/pallets/asset/src/lib.rs +++ b/pallets/asset/src/lib.rs @@ -1599,10 +1599,6 @@ impl<T: Trait> Module<T> { ) -> DispatchResult { Self::ensure_granular(ticker, value)?; - ensure!( - ...
2
1
0
[{"id": "G0", "claim": "If possible, a test case for a 0 price STO should be added.", "category": "testing", "verdict": "opposed", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "Add an example of a compliance edge case to the comment for future readers.", "category": "documentation", "verdict": "sup...
null
PolymeshAssociation__Polymesh__878
PolymeshAssociation/Polymesh
878
defect
9beb038823fc69b7695b760ab1ea3753539aa252
73a768f94c8d75c27cf60c47dd1fd884874b3620
Allow receipt signers to invalidate receipts
## changelog ### new features - Receipt issuers for settlement can now invalidate and revalidate their receipts
diff --git a/pallets/runtime/tests/src/settlement_test.rs b/pallets/runtime/tests/src/settlement_test.rs index 2fce1a320c..8806435e76 100644 --- a/pallets/runtime/tests/src/settlement_test.rs +++ b/pallets/runtime/tests/src/settlement_test.rs @@ -917,6 +917,35 @@ fn claiming_receipt() { ); l...
3
2
0
[{"id": "G0", "claim": "The repeated claim_receipt calls whose only delta is the metadata should be deduplicated with a closure.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "change_receipt_validity should store validity in its original form ra...
null
PolymeshAssociation__Polymesh__889
PolymeshAssociation/Polymesh
889
defect
3d03f8335202db5acd7aac65e80b2ba2ba7a71db
7f1907a4ff00648e2b4f3ed18963eef30af0d37e
Audit 7: Mitigate Overflow
See description: [Integer overflow `pallets/sto/src/lib.rs` when creating a fundraiser #7](https://github.com/PolymathNetwork/polymesh-audit/issues/7)
diff --git a/pallets/sto/src/lib.rs b/pallets/sto/src/lib.rs index cb75bff330..2768efbd3e 100644 --- a/pallets/sto/src/lib.rs +++ b/pallets/sto/src/lib.rs @@ -282,7 +282,7 @@ decl_module! { let offering_amount: T::Balance = tiers .iter() .map(|t| t.total) - ...
1
1
1
[{"id": "G0", "claim": "Summing the price-tier totals should return an error on overflow instead of silently saturating.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
PolymeshAssociation__Polymesh__899
PolymeshAssociation/Polymesh
899
defect
a4eec8ee39932fd11870f78f189ed19c3a5ae478
2bbeddc5cbce8877103775121546e6409d6217f4
MESH-1531: Fix Checkpoint.timestamps into double map keyed by `Ticker`
## changelog ### modified API - `Checkpoint.timestamps` now is a double map `Ticker -> CheckpointId -> Moment` instead of just a map `CheckpointId -> Moment`. This fixes a bug. Existing storage is nuked on chain upgrade per discussion. - `Checkpoint.{total_supply_at, balance_at_checkpoint, balance_updates, sched...
diff --git a/pallets/asset/src/checkpoint/mod.rs b/pallets/asset/src/checkpoint/mod.rs index 3682777462..ea3f98b84f 100644 --- a/pallets/asset/src/checkpoint/mod.rs +++ b/pallets/asset/src/checkpoint/mod.rs @@ -124,7 +124,7 @@ impl From<Moment> for ScheduleSpec { } } -storage_migration_ver!(1); +storage_migrati...
4
3
2
[{"id": "G0", "claim": "Consider using an enum (as seen in Substrate's inherited pallets) instead of an int for the storage migration version in pallets/asset/src/checkpoint/mod.rs.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The Ticker key is user inpu...
null
PolymeshAssociation__Polymesh__910
PolymeshAssociation/Polymesh
910
defect
445ac19bd1b417b6a59a8680a04b42446357f7a4
d9b7c51b21c11d4a80ab87fc083ec369b8348de2
MESH-1533/Require minimum 1 POLYX bond
Test case will be added later in a different PR. Merging this so that it can be part of the next release. ## changelog ### modified logic - A minimum of 1 POLYX must be locked when bonding for staking.
diff --git a/pallets/runtime/develop/src/runtime.rs b/pallets/runtime/develop/src/runtime.rs index e1270e6349..929d3e3215 100644 --- a/pallets/runtime/develop/src/runtime.rs +++ b/pallets/runtime/develop/src/runtime.rs @@ -352,6 +352,7 @@ parameter_types! { pub MinSolutionScoreBump: Perbill = Perbill::from_rationa...
2
2
1
[{"id": "G0", "claim": "The newly added error variant is misspelled `BondToSmall` and should be spelled `BondTooSmall`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new bond check uses `value > T::MinimumBond::get()`, so bonding exactly th...
null
PolymeshAssociation__Polymesh__918
PolymeshAssociation/Polymesh
918
defect
ca23b41d32bd38f3ec8c4bc274675479c49e8496
d9b0e6fff61224b3e16aba5058d6255a76ce3c22
Allow tipping for Operational TX from CDD/GC member
## Description Tipping for Operational transactions is allowed only if the caller is member of CDD Providers or Governance Committee. ## New operational TX - `Committee` pallet: Any function - `set_vote_threshold`, `set_release_coordinator`, `set_expires_after`: Any function that requires `T::CommitteeOrigi...
diff --git a/Cargo.lock b/Cargo.lock index 3510765ff9..27c9f2f67a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6048,6 +6048,7 @@ version = "2.0.0" dependencies = [ "frame-support 2.0.1 (git+https://github.com/PolymathNetwork/substrate?tag=v2.0.1-2)", "frame-system 2.0.1 (git+https://github.com/PolymathNetwork/subs...
8
6
1
[{"id": "G0", "claim": "The governance and PIP extrinsics marked `DispatchClass::Operational` by this pull request need not be operational, because they are executed intrinsically via their committee origins, so the dispatch class is irrelevant.", "category": "design", "verdict": "opposed", "priority": "P1", "scope": "...
null
PolymeshAssociation__Polymesh__926
PolymeshAssociation/Polymesh
926
defect
6789f94f4894dc852c75335101dda16628bb35b6
d1fafbecf95be085d161928ecbde31d2d9917025
MESH-1556: allow distribution past dividend date
## changelog ### modified API - The error `NowAfterPayment` is no longer emitted by the `distribute` extrinsic of the `CapitalDistribution` pallet. ### modified logic - The `distribute` extrinsic of the `CapitalDistribution` pallet can now be called past the dividend date defined in the `payment_at` argumen...
diff --git a/pallets/corporate-actions/src/distribution/mod.rs b/pallets/corporate-actions/src/distribution/mod.rs index 3caff6aed5..e5133c755b 100644 --- a/pallets/corporate-actions/src/distribution/mod.rs +++ b/pallets/corporate-actions/src/distribution/mod.rs @@ -169,7 +169,6 @@ decl_module! { /// - `Unauth...
1
1
1
[{"id": "G0", "claim": "The removed NowAfterPayment assert_noop case should be turned into an assert_ok! test that distributing with a past payment date succeeds.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
PolymeshAssociation__Polymesh__955
PolymeshAssociation/Polymesh
955
defect
583f5c57d28de922899217bb56b0bab160d4b63a
6dac8b4c66769ba89f5958b50f6e6165ba86ff92
Mesh 1570/clean old scope_id
## changelog ### modified logic - Calling the `add_investor_uniqueness_claim` extrinsic in the `identity` pallet with a new investor uniqueness `claim` that has a new `ScopeId` cleans up identity-ticker balances related to the `ScopeId` of the old investor uniqueness claim if there was one.
diff --git a/pallets/asset/src/lib.rs b/pallets/asset/src/lib.rs index 75308692e7..081706110b 100644 --- a/pallets/asset/src/lib.rs +++ b/pallets/asset/src/lib.rs @@ -1077,24 +1077,34 @@ impl<T: Trait> AssetSubTrait<T::Balance> for Module<T> { } fn update_balance_of_scope_id( - of: ScopeId, + ...
5
4
1
[{"id": "G0", "claim": "The claim-matching code would preferably be written using `match` with a guard instead of the current if-let form.", "category": "design", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The new test should use the asset trait helper methods (Asset::balan...
null
PolymeshAssociation__Polymesh__970
PolymeshAssociation/Polymesh
970
defect
eb5878e84b2ad6d7f6df15227315b1e05c03efba
3611517e33978f0acce71918a2df5dc19554e662
UT for `add_investor_uniqueness_claim_v2`
- [x] New UT for `add_investor_uniqueness_claim_v2`. - [x] Fix verification process: It uses `scope` from the claim, instead of `scope_id` which is used only in v1. - [x] `ExtBuilder` generates mocked InvestorUid v2. - [x] New `Claim::InvestorUniquenessV2`. - [x] Bug on Benchmarks running on WASM. - [x] Remove `Sc...
diff --git a/Cargo.lock b/Cargo.lock index 854044a3d7..968ac623e8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -140,9 +140,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.38" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afddf7f520a80dbf76e6f50a3...
1
1
0
[{"id": "G1", "claim": "The name `scope_did` should not be used anywhere in `verify_proof`; it should be called `scope` or `scope_scalar`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
PolymeshAssociation__Polymesh__977
PolymeshAssociation/Polymesh
977
defect
1213cad0157709313e136bbb1d3f00fa6df03ef8
8290b7b3f03f95694e00919b6e3e6c002f2f8b8a
MESH-1603: allow portfolio custodians unilaterally quit
## changelog ### new features - A new extrinsic `quit_portfolio_custody` is added in the `portfolio` module to allow a portfolio custodian to relinquish custodianship duties without going through the authorization sequence. ### modified logic - Accepting a portfolio custody authorization for the portfolio o...
diff --git a/pallets/portfolio/src/benchmarking.rs b/pallets/portfolio/src/benchmarking.rs index 5ea9486ba7..a89ba61561 100644 --- a/pallets/portfolio/src/benchmarking.rs +++ b/pallets/portfolio/src/benchmarking.rs @@ -22,18 +22,17 @@ use polymesh_common_utilities::{ use polymesh_primitives::PortfolioName; use sp_std...
5
4
0
[{"id": "G0", "claim": "PORTFOLIO_NAME_LEN is declared as u32 but every use casts it to usize, so it should be declared as usize.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The benchmark params should use the newly introduced PORTFOLIO_NAME_...
null
PolymeshAssociation__Polymesh__980
PolymeshAssociation/Polymesh
980
defect
d79f2aad914f1570161b569cff9ca85d054319b0
478f75cad8e1b025eec23c084dc6d10e98b67a78
Remove some unused RPCs
## changelog ### modified API - Removed `pips_votingHistoryByAddress`, `pips_votingHistoryById`, and `asset_balanceAt` RPC functions.
diff --git a/.circleci/config.yml b/.circleci/config.yml index d494f3db47..a9c89e01f3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,6 +11,16 @@ jobs: - run: name: Check formatting command: ./scripts/rustfmt.sh + rpc-check: + docker: + - image: circleci/node:lt...
2
2
0
[{"id": "G0", "claim": "The now-unused `flatten_keys` function in pallets/identity/src/lib.rs can also be removed, since this PR deleted its caller `voting_history_by_id`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The comment in scripts/cli...
null
Pometry__Raphtory__2446
Pometry/Raphtory
2,446
defect
3a2dabf26e3ac0b8b9d50dfce4ac4bce64243cda
509ade43be05bc8f6519190535ddcb83601c0fbf
Features/graph filter
Fixes https://github.com/Pometry/Raphtory/issues/2263
diff --git a/python/python/raphtory/filter/__init__.pyi b/python/python/raphtory/filter/__init__.pyi index 55201fc36b..899226a6e4 100644 --- a/python/python/raphtory/filter/__init__.pyi +++ b/python/python/raphtory/filter/__init__.pyi @@ -40,6 +40,7 @@ __all__ = [ "EdgeEndpointNameFilter", "EdgeEndpointTypeFi...
1
1
0
[{"id": "G0", "claim": "The GqlGraphFilter-to-DynView conversion should call the underlying view API (e.g. `inner.window` instead of constructing `Windowed` manually, and likewise for the other methods) so the GraphQL implementation remains consistent with the core one.", "category": "design", "verdict": "supported", "...
null
Portabase__agent__39
Portabase/agent
39
defect
b1c14f098b75c7770e215bd6a6f7274ca45c4e0e
58a0b92710e2287fabd8f98b3efcd915ae198656
feat: add-redis
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added Redis support: connectivity checks and backup; Redis entries added to development config and compose. * **Tests** * Added integration tests for Redis and Postgres. * Improved test tra...
diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index aa9011e..9a430b3 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -25,6 +25,9 @@ jobs: - name: Install grcov run: cargo install grcov + - name: Install test requirements + run:...
15
2
2
[{"id": "G0", "claim": "Remove the credential-like Redis password committed in databases.json and docker-compose.yml; use a known placeholder or env-injected value and rotate it if it was ever real.", "category": "security", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Add -y...
null
Portabase__agent__43
Portabase/agent
43
defect
987c630c73e0370f9e95e2568a0743594340d4a6
cddb9d78faed001e4203167203175534cadb910b
feat: add-valkey
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added Valkey as a supported database backend with optional authentication and sample configurations. * **Chores** * Expanded local container setup to include Valkey services, volumes and netw...
diff --git a/databases.json b/databases.json index 90b7d73..cb701b0 100644 --- a/databases.json +++ b/databases.json @@ -60,11 +60,27 @@ { "name": "Test database 9 - Redis Auth", "type": "redis", - "password": "m6o2L0Ukw3Og5RJUKh", + "password": "supersecurepassword", "port": 6379, ...
7
2
1
[{"id": "G0", "claim": "Avoid committing the EDGE_KEY secret value in docker-compose.yml; use environment substitution, a gitignored .env file, or at least document that it is an intentional development-only key.", "category": "security", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "c...
null
Portabase__agent__51
Portabase/agent
51
defect
a1aa66ff3f9e450376ea078571454a4715bab158
2ab293a5469702cba5238675d201f03569c11db7
feat: add firebird
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Firebird support: health-check, backup, restore and sample seed data; multi-db local stack now includes Firebird. * **Chores** * Local DB orchestration moved to a new task runner and dedicated...
diff --git a/Makefile b/Makefile index b05eebb..3914ac9 100644 --- a/Makefile +++ b/Makefile @@ -49,6 +49,11 @@ seed-sqlite: docker exec -it db-sqlite sqlite3 /workspace/data/app.db "SELECT name FROM sqlite_master WHERE type='table';" @echo "Done" - +seed-firebird: + @echo "Seeding Firebird..." + docker exec -i d...
11
1
0
[{"id": "G0", "claim": "The debug log in src/domain/firebird/restore.rs incorrectly says \"Starting MongoDB restore\" in a Firebird restore operation; change it to say Firebird.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The production stage of ...
null
Portkey-AI__gateway__1027
Portkey-AI/gateway
1,027
defect
ec18ac58a574b66fbfeb88cee8597204b28f319e
42a7d312f703326b444b9eed9a62520eed35b259
Exa plugin for online search
![Code Quality](https://img.shields.io/badge/Code_Quality-92%25-02b838) ![new feature](https://img.shields.io/badge/new_feature-818aff) ## Author Description # Exa Web Search Plugin: Make Any LLM Online ## Overview This PR introduces an Exa Web Search plugin that enhances LLMs with real-time web information. The...
diff --git a/plugins/exa/exa.test.ts b/plugins/exa/exa.test.ts new file mode 100644 index 000000000..3290ed7cf --- /dev/null +++ b/plugins/exa/exa.test.ts @@ -0,0 +1,386 @@ +import testCreds from './.creds.json'; +import { handler as onlineHandler } from './online'; +import { PluginContext } from '../types'; + +// This...
4
2
1
[{"id": "G0", "claim": "There is a naming inconsistency: the handler reads the parameter 'numResults' while the tests provide 'num_results', which could cause unexpected search-query behavior.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The bare ...
null
Portkey-AI__gateway__1088
Portkey-AI/gateway
1,088
defect
787acc19bf0e11c5784fa89bc28c3768beb0393f
a43b0ef62bcd00f56063fb17a6f45a16d4874331
Add panw-prisma-airs plugin with tests and update config/index
## Description Integration with Palo Alto Networks Prisma AIRS API Intercept ## Motivation Support integration ## Type of Change <!-- Put an 'x' in the boxes that apply --> - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaki...
diff --git a/conf.json b/conf.json index 74d503797..e53e49bb4 100644 --- a/conf.json +++ b/conf.json @@ -7,7 +7,8 @@ "pillar", "patronus", "pangea", - "promptsecurity" + "promptsecurity", + "panw-prisma-airs" ], "credentials": { "portkey": { diff --git a/plugins/index.ts b/plugins/ind...
7
7
5
[{"id": "G0", "claim": "The pull request appears to be removing some of the repository's existing plugin configuration, and the reviewer asks the author to check it again.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "unclear"}, {"id": "G1", "claim": "The PluginContext object has no r...
null
Portkey-AI__gateway__1198
Portkey-AI/gateway
1,198
defect
2b229d48e1b33d954413d3bc91c5560af230ad2e
7ee197599f6efa77968a13e0c555b360856589c7
[New Plugin] WalledAi
## Description Integrating walledai plugin, for guardrails on Portkey platform Issue Link: #1197 ## Motivation <!-- Provide a brief motivation of why the changes in this PR are needed --> ## Type of Change <!-- Put an 'x' in the boxes that apply --> - [ ] Bug fix (non-breaking change which fixes an issue) ...
diff --git a/conf.json b/conf.json index e53e49bb4..f70072ba0 100644 --- a/conf.json +++ b/conf.json @@ -8,7 +8,8 @@ "patronus", "pangea", "promptsecurity", - "panw-prisma-airs" + "panw-prisma-airs", + "walledai" ], "credentials": { "portkey": { diff --git a/plugins/index.ts b/plugins...
6
3
2
[{"id": "G0", "claim": "Replace the console.log in the catch block of guardrails.ts with a more structured error-handling approach (console.error) for production traceability.", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Make the unsafe-conten...
null
Portkey-AI__gateway__1258
Portkey-AI/gateway
1,258
defect
8051db4e7ab075e7920e34cd8b7ba770375c3c3f
166cf0d71d3c57ef60a430a964d8f15912ee0c89
New "Add Prefix" Guardrail
## ✅ Testing Done ## Example Requests ```python from portkey_ai import Portkey client = Portkey( provider="openai", Authorization="your-openai-key", config={ "before_request_hooks": [{ "type": "guardrail", "id": "helpful_assistant", "checks": [{...
diff --git a/plugins/default/addPrefix.test.ts b/plugins/default/addPrefix.test.ts new file mode 100644 index 000000000..8b42b0703 --- /dev/null +++ b/plugins/default/addPrefix.test.ts @@ -0,0 +1,450 @@ +import { handler as addPrefixHandler } from './addPrefix'; +import { PluginContext } from '../types'; + +describe('p...
5
1
0
[{"id": "G0", "claim": "The catch block deletes the stack trace and stores the bare error, giving no context about where the error occurred, and should wrap the error with a contextual message plus the original error to ease debugging.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": ...
null