Creating Witness Signature: non-mandatory-script-verify-flag (Signature must be zero for failed CHECK(MULTI)SIG operation)

So I am trying to do my own witness signatures as described in bip143. I have code that correctly verifies the example signature, so I thought I had a hold of the basic signing and verification. I have code that can verify the signatures in bip143 correctly, and using the same code I verify this output correctly, so I am not sure how to determine what is going wrong. The error that I get is

error code: -26
error message:
non-mandatory-script-verify-flag (Non-canonical DER signature)

I suspect that I am not reversing the byte order in something, but I am really not sure how to further diagnose this.

----unsigned transaction-------
-------end unsigned transaction------
nversion:      02000000
hashPrevouts: 9ebc8589966e2dd13cd64af1835262c2d8e931b4388a8ebe76620814b4f407bd
hashSequence: 3bb13029ce7b1f559ef5e747fcac439f1455a2ec7c5f09b72290795e70665044
outpoint:     02303e285bb228344346acb5292397a761103efcd0182c4cf95b4d01b2bdda4000000000
scriptCode:   1976a914992fda25fdf8447092aa223a34bedd3572173d8688ac
amount:       00f2052a01000000
nSequence:    ffffffff
hashOutputs   a54e6a8744fa773a5f1c64d7f60d53efd69f8d76e85e7817970a87990874e4c1
nLockTime     00000000
nHashType     01000000
pre hash image: 020000009ebc8589966e2dd13cd64af1835262c2d8e931b4388a8ebe76620814b4f407bd3bb13029ce7b1f559ef5e747fcac439f1455a2ec7c5f09b72290795e7066504402303e285bb228344346acb5292397a761103efcd0182c4cf95b4d01b2bdda40000000001976a914992fda25fdf8447092aa223a34bedd3572173d8688ac00f2052a01000000ffffffffa54e6a8744fa773a5f1c64d7f60d53efd69f8d76e85e7817970a87990874e4c10000000001000000
dhashed image: 4f8fce636bb4a44aa6a241e9597bbe54fce3bfe3426a49a94c5b006d42eac007
rawsig: 2cbb748d06a1b87c933a3118d8c2a5a0ab02111bae777a9e52ba8571eee2d549e80a6e4cef24a172e64d11aa7b83c8005fe6fc078307b9e663ef9eb14fce05a3
der sig: 304402202cbb748d06a1b87c933a3118d8c2a5a0ab02111bae777a9e52ba8571eee2d5490220e80a6e4cef24a172e64d11aa7b83c8005fe6fc078307b9e663ef9eb14fce05a3 
script pub key: 992fda25fdf8447092aa223a34bedd3572173d86
pub key: 0392ff36d0ae9f3a74c0483fd309ff9144972b1dce6d6dfe4d9de474c721b36521
----signed transaction-------
-------end signed transaction------

This is running on my regtest. I can provide any additional info that people might think would be helpful. I have spent many hours comparing every bit possible to all the examples before posting here. I know it says non connical der sig, but my researching, other people say that error happens when many different things go wrong. Also when I compare the signature to the core signed ones they are an exact match in format with the “30440220” then 32 bytes then 0220 then the other 32 bytes. The only thing that is different is the actual sig data. Plus I get the same error when using a native connical DER output. Any help is greatly appreciated as always

How to slow down iMac CPU for quiet operation

With the help of Turbo Boost Switcher Pro, I could always keep my iMac 2020 with its 8-core i7 fanless for 99% of the time without any noticeable slowdown on daily work.

Until now. However, now it gets warmer (and there’s no air conditioning 😅), it starts using its fans even when idling.

Is there a trick or tool to slow down the CPU further to reduce heat and fan noise? The CPU power would probably still be more than enough for daily usage.

finder – Operation not Permitted: 401 Unauthorized Access to ~/Library folder in MacOS

I have encountered a problem in regards to Operation not Permittedon my ~/Library folder where either I encountered a 401 unauthorized issue or Operation not permitted and even points to default.realm.lock as per on the cato client.

This happened when Mac shows a popup about access on library, I accidentally click Don't allow and this was the start of the problem

enter image description here

Cato Client
enter image description here

What I did so far was to provide:

1.] Full Disk Access on these following applications e.g Terminal, ITerm2, Cato Client, and even on my IDE Webstorm but somehow I still get the user permission issue

enter image description here

2.] Perform chmod 777 on the ~/Library folder or even sudo chown -R $USER ~/Library

3.] Have also performed csrutil disable on Recovery Mode

But none are working on my side.
Would like to be guided if what are other steps I still needed to take in order to resolve this issue? thank you very much.

bash – Operation not permitted – probably not a Full Disk Access issue

I’ve given both iterm and bash (both bashes – one is from homebrew) Full Disk Access, but I still see:

$ find /System/Volumes/Data/private/var/networkd/db
cmd output started 2021 Mon Jun 14 10:03:24 PM PDT
find: /System/Volumes/Data/private/var/networkd/db: Operation not permitted

And there don’t appear to be any special flags set on it:

$ ls -lO /System/Volumes/Data/private/var/networkd/
cmd output started 2021 Mon Jun 14 10:12:22 PM PDT
total 0
drwx------  3 _networkd  _networkd  -  96 Jan 12 11:49 Library
drwxr-xr-x  5 _networkd  _networkd  - 160 Jan 12 11:50 db

And the permissions bits seem pretty normal:

$ python3
cmd output started 2021 Tue Jun 15 08:27:38 AM PDT
Python 3.9.5 (default, May  4 2021, 03:36:27)
(Clang 12.0.0 (clang-1200.0.32.29)) on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> oct(os.stat('/System/Volumes/Data/private/var/networkd/db').st_mode)

What do I need to do to give find the ability to traverse this directory without an error?


memory – Linux server beeping during operation

I have an Ubuntu 20.4 headless server with Cockpit as a management tool, it’s been running fine for a few months since I built it until yesterday when I came home to find it beeping. 2 short beeps repeated.

The server continues to run and perform as expected, there are no errors in the logs I can check via Cockpit. I shutdown and booted Memtest86 to check it wasn’t a memory issue and the RAM passed the tests (I did only run 3 of 4 as it took over an hour). I reseated the RAM before I did the test.

I did a full power down and it stopped the beeping for 24 hours, but it’s come back again. I also tried using a different plug socket, though I didn’t expect this to do anything.

My hardware is:- AsRock H470M-ITX motherboard, Intel i5-10600, 2x Integral IN4T8GNELSI 8GB DDR4 RAM 2666MHz, 1x Samsung Evo 970 Plus, 1x WD WD20EFRX-68E, In RAID 5: 2x WD WD40PURZ-85T, 1x WD WD40PURX-64G, InWin IW-MS04 case with Mini-SAS 6Gb/s, SFF-8087 backplane

Software:- Cockpit, In docker: Plex, Nextcloud, Nginx Proxy

Some hints as to where to look for errors, or what could be causing it would be extremely helpful. Also it’s worth saying I didn’t install a beeper and I believe the board doesn’t have one built in.

upgrade – Software Updater doesn’t update and returns : Package Operation Failed

I have this version : Ubuntu 18.04.5 LTS

and when I try to update with the Software Updater it returns this error :
Package Operation Failed

I have tried everything that I found here and still no results, the
‘Package Operation Failed : The installation or removal of a software package failed. ‘ seems to be returned everytime.

I want to upgrade to Ubuntu 20.04 but without this it seems like I cant.
Is there something I can do?

real analysis – What unary operation on sequences produces the sequence of pairwise sums?

Given a sequence $(a, b, c,…)$:

  • The partial difference operator produces the sequence $(b-a, c-b, …)$, and
  • The partial summation operator produces the sequence $(a, a+b, a+b+c, … )$

According to a section in the Wikipedia page on series.

What about the sequence $(a+b, b+c, c+d, …)$?

Is there a formal name for the operator that produces this one?

dart – Flutter Web App: XMLHttpRequest error – responce headers _mapUnsupported operation :unknown library?

Judging from many postings here a lot of people suffer from similar problems.

I have tried to understand the CORS protocol explained here and here

In my Flutter web App I make the following call:-

Future<http.Response> fetchWebData() async {
    return (http.get(Uri.parse(''))); 

The server is written is Java receives the following record:-

GET /? HTTP/1.1
Connection: keep-alive
User-Agent: Mozil
 la/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
Accept: */*
Origin: http://localhost:58559
Referer: http://localhost:58559/
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9

From the inclusion of the “Origin” head I concluded this was a simple CORS request and replied with:-

HTTP/1.1 200 OK
Date: Sun, 23 May 2021 13:51:56 GMT
Server: MRS_Server
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Content-type: text/plain;charset=utf-8
Content-Length: 90
Access-Control-Allow-Methods: GET
Keep-Alive: timeout=2, max=100
Connection: Keep-Alive

{"book": ({"id": "01","language": "Java","edition": "third","author": "Herbert Schildt"})}

In an attempt to understand the problem I placed a breakpoint at

    unawaited(xhr.onError.first.then((_) {    <<<BREAKPOINT
      // Unfortunately, the underlying XMLHttpRequest API doesn't expose any
      // specific information about the error itself.
          ClientException('XMLHttpRequest error.', request.url),

and looked at the request.headers._map which showed:-

<getObject>Unsupported operation :unknown library

Some references say the Content-type: should be “text/plain” whilst other show
I am hoping someone can explain what I doing wrong??
What is the unknown library??