Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure max length #845

Merged
merged 4 commits into from
Jan 10, 2024
Merged

Ensure max length #845

merged 4 commits into from
Jan 10, 2024

Conversation

shargon
Copy link
Member

@shargon shargon commented Nov 17, 2023

Related to: #827 (comment)

@shargon
Copy link
Member Author

shargon commented Nov 17, 2023

We can wait for #815

roman-khimov added a commit to nspcc-dev/neo-go that referenced this pull request Nov 20, 2023
@@ -166,6 +166,11 @@ private static JObject ToJson(StackItem item, Session session)

private static Signer[] SignersFromJson(JArray _params, ProtocolSettings settings)
{
if (_params.Count > Transaction.MaxTransactionAttributes)
{
throw new RpcException(-100, "Max allowed witness exceeded.");
Copy link
Member

Choose a reason for hiding this comment

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

We can wait for #815

Agree, some InvalidParams error can be used here. I'll review #815 one more time ASAP.

@cschuchardt88
Copy link
Member

cschuchardt88 commented Nov 20, 2023

have max allowed witness conditions been fixed in neo-core or here? like and boolean not etc

@shargon
Copy link
Member Author

shargon commented Dec 13, 2023

have max allowed witness conditions been fixed in neo-core or here? like and boolean not etc

Must be on both, here is composed manually, not deserialized.

@Jim8y
Copy link
Contributor

Jim8y commented Dec 13, 2023

@shargon , grand master, can we have a sole project where all limits are set together? the existing limitations are like here and there, hard to follow and track.

@shargon
Copy link
Member Author

shargon commented Dec 14, 2023

@shargon , grand master, can we have a sole project where all limits are set together? the existing limitations are like here and there, hard to follow and track.

Agree, but the limits are during deserialization, and here the object is composed manually, so the nodes are protected, but no the rpc node, I think

@shargon
Copy link
Member Author

shargon commented Jan 10, 2024

I will merge it, #815 is delayed and it can replace this throw later

@shargon shargon merged commit 6a5c7eb into master Jan 10, 2024
3 checks passed
@shargon shargon deleted the check-max branch January 10, 2024 08:15
Jim8y added a commit to Jim8y/neo-modules that referenced this pull request Jan 10, 2024
* 'master' of github.com:neo-project/neo-modules:
  Ensure max length (neo-project#845)
  Update .editorconfig and run code analyze (neo-project#866)
  Added AspNetCore (neo-project#863)
  RcpServer: Fixed CORS and Basic Auth (neo-project#812)
  Fix response from getversion due to WS removal (neo-project#859)
  Local dev setup (neo-project#861)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants