dydxprotocol / v4-clients

Other
68 stars 53 forks source link

examples/composite_example.py not working #86

Open zhouqiang2023 opened 10 months ago

zhouqiang2023 commented 10 months ago

python3 examples/composite_example.py

return

E1205 11:14:25.853674000 4689714624 hpack_parser.cc:999]               Error parsing 'content-type' metadata: invalid value
**Order Failed**
<_InactiveRpcError of RPC that terminated with:
        status = StatusCode.UNKNOWN
        details = "Stream removed"
        debug_error_string = "UNKNOWN:Error received from peer  {created_time:"2023-12-05T11:14:25.853876+08:00", grpc_status:2, grpc_message:"Stream removed"}"
>
E1205 11:14:32.285944000 4689714624 hpack_parser.cc:999]               Error parsing 'content-type' metadata: invalid value
**Order Failed**
<_InactiveRpcError of RPC that terminated with:
        status = StatusCode.UNKNOWN
        details = "Stream removed"
        debug_error_string = "UNKNOWN:Error received from peer  {grpc_message:"Stream removed", grpc_status:2, created_time:"2023-12-05T11:14:32.286025+08:00"}"
>
E1205 11:14:38.746211000 4689714624 hpack_parser.cc:999]               Error parsing 'content-type' metadata: invalid value
**Order Failed**
<_InactiveRpcError of RPC that terminated with:
        status = StatusCode.UNKNOWN
        details = "Stream removed"
        debug_error_string = "UNKNOWN:Error received from peer  {created_time:"2023-12-05T11:14:38.746286+08:00", grpc_status:2, grpc_message:"Stream removed"}"
>
E1205 11:14:45.148782000 4689714624 hpack_parser.cc:999]               Error parsing 'content-type' metadata: invalid value
**Order Failed**
<_InactiveRpcError of RPC that terminated with:
        status = StatusCode.UNKNOWN
        details = "Stream removed"
        debug_error_string = "UNKNOWN:Error received from peer  {created_time:"2023-12-05T11:14:45.148867+08:00", grpc_status:2, grpc_message:"Stream removed"}"
>
E1205 11:14:51.021330000 4689714624 hpack_parser.cc:999]               Error parsing 'content-type' metadata: invalid value
steven-varga commented 10 months ago

Probable cause is that the specified All That Node provider for testnet has been shut down: [Important] dYdX Testnet Public Node endpoints will no longer be supported as of November 29th, 2023 at 15:00 UTC. Setting up a node on testnet, and modifying the network configuration could be a possible work around. Note: running a node without TLS may require to let the library know, see this line in python.

zhouqiang2023 commented 10 months ago

Probable cause is that the specified All That Node provider for testnet has been shut down: [Important] dYdX Testnet Public Node endpoints will no longer be supported as of November 29th, 2023 at 15:00 UTC. Setting up a node on testnet, and modifying the network configuration could be a possible work around. Note: running a node without TLS may require to let the library know, see this line in python.

thank you for your response, I use the mainnet config, it also shows debug_error_string = "UNKNOWN:Error received from peer {created_time:"2023-12-05T19:36:19.611061+08:00", grpc_status:2, grpc_message:"Stream removed"}"

vincent7q commented 10 months ago

there is a bug in v4-client-py/v4_client_py/clients/modules/post.py line 46 to get testnet network config. Below change can fix the problem

change source code as following (post.py)

network = NetworkConfig.fetch_dydx_testnet() #bug to get testnet network config

network= NetworkConfig( #Mainnet setup chain_id=self.config.chain_id, url=self.config.grpc_endpoint, fee_minimum_gas_price=0, fee_denomination="adydx", staking_denomination="adydx", faucet_url=None, )