• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

neo-project / neo / 13694720894
79%

Build:
DEFAULT BRANCH: master
Ran 06 Mar 2025 08:53AM UTC
Jobs 1
Files 413
Run time 4min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 Mar 2025 08:49AM UTC coverage: 78.376% (+0.1%) from 78.259%
13694720894

push

github

web-flow
Transaction: ensure standard witness scripts are properly verified (#3805)

* Transaction: ensure standard witness scripts are properly verified

Problem:

Invocation scripts of standard witnesses considered to be invalid if not
following the `PUSHDATA1 signature` pattern. Consider the following
example of transaction witness:

Invocation script:
`CDkMQMPzMFVACq4PjnjbH8wB5/3ajfp7JaGo9MLyo25OPNTNIeo2WsYWZZ6wjUvGSlzd8FjMMdu4WXHU2KoUMo9Fkkk=`
which is:
```
NEO-GO-VM 0 > ops
INDEX    OPCODE       PARAMETER
0        PUSHT            <<
1        ASSERT
2        PUSHDATA1    c3f33055425a1a8f4cb08d4bc648f459249
```

Verification script:
`DCEDzfbXTXxymUH2d9SQNI8aYHgF4wZ2xi6MTYCqM7cw+dBBVuezJw==`
which is:
```
NEO-GO-VM 0 > ops
INDEX    OPCODE       PARAMETER
0        PUSHDATA1    03cdf6d740676c62e8c4d80aa33b730f9d0    <<
35       SYSCALL      System.Crypto.CheckSig (56e7b327)
```

As you can see, verification script has the form of standard signature
contract, and invocation script is just some side VM script that should
be properly executed to check transaction's witness. The problem is that
VerifyStateIndependent treats this invocation script as invalid and
aborts transaction witness verification.

Solution:
Check if Invocation witness script matches the expected standard
SignatureContract or MultiSigContract witness. If not, then do not
consider this witness as "standard".

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>

* Transaction: rename IsSingleSignature and IsSingleSignatures

No functional changes.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>

* Transaction: adjust state dependent verification

Apply the same rule for standard witness detection as for state
independent verification.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>

* Transaction: use var keyword for variables declaration

No functional changes.

S... (continued)

6080 of 8826 branches covered (68.89%)

Branch coverage included in aggregate %.

28 of 28 new or added lines in 1 file covered. (100.0%)

4 existing lines in 2 files now uncovered.

22199 of 27255 relevant lines covered (81.45%)

127925.58 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
60.58
25.96% src/Plugins/OracleService/Protocols/OracleHttpsProtocol.cs
3
83.68
1.55% src/Plugins/RpcServer/RpcServer.Wallet.cs
Jobs
ID Job ID Ran Files Coverage
1 13694720894.1 06 Mar 2025 08:53AM UTC 2676
25.16
GitHub Action Run
Source Files on build 13694720894
  • Tree
  • List 413
  • Changed 323
  • Source Changed 1
  • Coverage Changed 323
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #13694720894
  • bb1b9dcc on github
  • Prev Build on master (#13694596890)
  • Next Build on master (#13700907243)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc