Skip to content
This repository was archived by the owner on Nov 10, 2025. It is now read-only.

Ensure max length#845

Merged
shargon merged 4 commits intomasterfrom
check-max
Jan 10, 2024
Merged

Ensure max length#845
shargon merged 4 commits intomasterfrom
check-max

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
Inspired by neo-project/neo-modules#845.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
{
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
@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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants