nspcc-dev / nspcc-dev/neofs-node
Do not make RPC for stateless N3 verification scripts
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 38
- Forks
- 51
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 38
Description
Is your feature request related to a problem? Please describe.
https://github.com/nspcc-dev/neofs-node/blob/master/internal/crypto/n3.go
currently, SN and IR always exec N3 scripts via invokecontainedscript FS chain RPC. This works for any kind of scripts, but for stateless - not optimal. Simple- and multi-sig scripts are self-contained and can be handled outside the chain
Describe the solution you'd like
pre-check whether verification script is a simple or multi signature one. Use NeoGo lib parsers to do. If that's the case, decode keys and verify signature, and return
note that height prm is only needed for stateful historic invocations, so do not forget to exclude its resolution from epoch (done via getEpochBlock Netmap contract RPC)
Describe alternatives you've considered
no
Additional context
- #3194
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with internal/crypto/n3.go and trace how SN and IR execute N3 scripts through invokecontainedscript. Review the NeoGo parsers and the getEpochBlock path, keeping height resolution limited to stateful historic invocations. Done means simple- and multi-signature stateless scripts are verified without the chain RPC while other scripts retain the existing path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- blockchain, distributed-systems, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100