Giter Site home page Giter Site logo

[bug] POST license/send about oss HOT 4 CLOSED

apjiyi avatar apjiyi commented on August 15, 2024
[bug] POST license/send

from oss.

Comments (4)

BenjaminLu avatar BenjaminLu commented on August 15, 2024

請給我第一步中反饋的raw_tx

以及這邊列出可能的問題點

https://github.com/OpenNetworking/OSS/blob/master/oss_server/base/v1/views.py#L92

92行傳入TransactionType.to_number('LICENSE')

可以看到這版OSS此表示為0x30

https://github.com/OpenNetworking/OSS/blob/master/oss_server/oss_server/types.py#L7

但是92行使用的make_raw_tx()卻是gcoin套件中的方法

因此,問題產生了

https://github.com/OpenNetworking/pygcointools/blob/master/gcoin/transaction.py#L9

pygcointools的TX_TYPE並沒有更新

可能與這有關,我驗證這點以後就會試著修正

from oss.

apjiyi avatar apjiyi commented on August 15, 2024

最後簽名完的raw_tx是可以送至core的,會成功。

from oss.

BenjaminLu avatar BenjaminLu commented on August 15, 2024

最後追到gcoin-rpc

在做/license/send的時候會噴exception

[2017-04-17 17:31:09] ERROR [base.v1.views:297] Invalid transaction:
Traceback (most recent call last):
  File "/root/OSS/oss_server/base/v1/views.py", line 293, in post
    tx_id = get_rpc_connection().sendrawtransaction(raw_tx)
  File "/usr/lib/python2.7/site-packages/gcoinrpc/connection.py", line 442, in sendrawtransaction
    return self.proxy.sendrawtransaction(hexstring)
  File "/usr/lib/python2.7/site-packages/gcoinrpc/proxy.py", line 124, in __call__
    self._service_proxy._raise_exception(resp['error'])
  File "/usr/lib/python2.7/site-packages/gcoinrpc/proxy.py", line 164, in _raise_exception
    raise self._exception_wrapper(error)
BitcoinException: TX decode failed

但這個raw transaction

透過gcoin-cli sendrawtransaction和
Dashboard的node.js版本sendrawtransaction的RPC功能都會通過並在區塊鏈上生效
唯獨OSS使用的gcoin-rpc會失敗

010000000163aae7a704184c25ed189532d91765a412e502a6f68f0c879bfa9473b235b04300000000fdfd00004830450221008e6876ac8464de08a51d3ad248fce945c2f643bf998b1c27415fa23ba35ac962022049aaba137e9e758c6c883f9ec9d30757839849cb47e55e2ab7454b0262984f2e014730440220218775a99e062c1410c50033ba9db11675aa43315a7aa0f195b8afb9a569fa6c02207b8a25ee236d37afd577046050b1f10b7d596050c1c076acca7b43e651832fdb014c6952210220099eae73546d4817538c8f9a2436f8f9317611cf98ee7d738964db11bbc230210273ffaee25ec87373b5268771530cd3fa452123bd90dd52a0c6c5bc6fc838e554210371ce7c1ca4cb038f4614c9bd17a7b41c53fd54a730b578a6f375f31bff87aeff53aeffffffff0200e1f505000000001976a9140dfe13933c65325375e2627a977a7e9d42a0b2b488ac010000000000000000000000db6a4cd8373231313031313030396536383938626537626138636538623262623036653861616161653639383865303436653666366536353031303030303030303030303030303030303030303030303030303436653666366536353030303030303030303030303030303030303030303030303030313236383734373437303361326632663635373836313664373036633635326536333666366430303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030010000000000000030000000

至於gcoin-rpc送raw transaction為何失敗我們還在測試

from oss.

BenjaminLu avatar BenjaminLu commented on August 15, 2024

是postman的bug

重開postman視窗就都會正常

from oss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.