Open vatsa287 opened 9 months ago
I don't think it is possible to create a schema exceeding MaxEncodedSchemaLength
and pass it to the create function.
The InputSchemaOf<T>
type is defined as a BoundedVec<u8, <T as Config>::MaxEncodedSchemaLength>
, which means it is inherently limited to a maximum size specified by MaxEncodedSchemaLength
.
So I don't think there is a need to write an explicit test for this. What do you say? or am i missing something? @vatsa287
Hi i would like to work on this issue.
Hi, I was currently working on this issue and find out that "schema size should be max of MaxEncodedSchemaLength and that we are getting as an input and we have to make tests which make sure that schema doesn't exceed the limit" am I right here or am i missing some details here. Can you please tell me more so that I can work on these issues, I think there are 10 in same way, so if I do one in good manner others will be easier for me.
Hey @Pankajjsuthar , as you can see there is already a PR linked to the issue, so you can work on different issue
Hello @Pankajjsuthar Are you open to working on this issue? We will be happy to assign it to you now. Thanks.
Description
Subtask under : https://github.com/cord-network/community/issues/7
New testcase can be tested under
cargo test -p pallet-schema
after adding it in the code.Goals
MaxEncodedSchemaLimitExceeded
for pallet/schemaExpected Outcome
MaxEncodedSchemaLimitExceeded
being returned properly in all the possible calls.Acceptance Criteria
NA
Implementation Details
Look at other test cases, and add a test case for the same. Ex: check method
check_duplicate_schema_creation
which validates error codeSchemaAlreadyAnchored
Mockups / Wireframes
NA
Product Name
CORD
Organization Name
Dhiway
Domain
Blockchain
Tech Skills Needed
Rust
Mentor(s)
@amarts
Complexity
[Medium]
Category
[Test]
Sub Category
[Beginner friendly]