Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

`signrawtransactionwithwallet` produces invalid Schnorr signatures

Đang mở
#1,238 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
28/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
cpp, python
Lĩnh vực
blockchain, testing

Hướng nghiên cứu

Bắt đầu với test/functional/wallet_taproot.py và chạy chuỗi createrawtransaction, fundrawtransaction, signrawtransactionwithwallet và sendrawtransaction được nêu. Kiểm tra giao dịch hoàn chỉnh và các giá trị witness được báo cáo; issue được giải quyết khi giao dịch đã ký được chấp nhận thay vì thất bại với Invalid Schnorr signature.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

If you try modifying the wallet_taproot.py functional test like so:

diff --git a/test/functional/wallet_taproot.py b/test/functional/wallet_taproot.py
index 123a6a40893..f37fc906549 100755
--- a/test/functional/wallet_taproot.py
+++ b/test/functional/wallet_taproot.py
@@ -275,6 +275,12 @@ class WalletTaprootTest(BitcoinTestFramework):
             self.nodes[0].generatetoaddress(1, self.boring.getnewaddress())
             test_balance = int(self.rpc_online.getbalance()['bitcoin'] * 100000000)
             ret_amnt = random.randrange(100000, test_balance)
+            # Start...
+            rawret = self.rpc_online.createrawtransaction([], [{self.boring.getnewaddress(): Decimal(ret_amnt) / 100000000}])
+            rawret = self.rpc_online.fundrawtransaction(rawret, {"changePosition":1, "subtractFeeFromOutputs":[0]})
+            rawret = self.rpc_online.signrawtransactionwithwallet(rawret['hex'])
+            self.rpc_online.sendrawtransaction(rawret['hex'])
+            # ...end
             res = self.rpc_online.sendtoaddress(address=self.boring.getnewaddress(), amount=Decimal(ret_amnt) / 100000000, subtractfeefromamount=True)
             self.nodes[0].generatetoaddress(1, self.boring.getnewaddress())
             assert(self.rpc_online.gettransaction(res)["confirmations"] > 0)

You will get a failure of the form

test_framework.authproxy.JSONRPCException: non-mandatory-script-verify-flag (Invalid Schnorr signature) (-26)

on the sendrawtransaction line. You can verify by printing intermediate values that the output of signrawtransactionwithwallet shows complete: true and that the transaction indeed has something Schnorr-signature-shaped in its witness.

Ngôn ngữ chính
C++
Star
1.2k
Fork
418
Merge trung bình
1 ngày 12 giờ
Pull request đã merge (30 ngày)
13

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ElementsProject/elements

Tất cả issue của ElementsProject/elements

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.