We're updating the issue view to help you get more done. 

EthSigner bugs

Description

As raised by Ivaylo from Web3Labs
==========================
1. EthSigner does a lot of validation - i.e. that fields are prefixed with 0x and that enclave public keys should be 32 bytes etc. What is the thinking behind this? It is my understanding that the validation should be done by the node and EthSigner should just proxy any errors back to the caller, from a maintainability perspective.
2. I support the modular release of jars as opposed to uber-jars. It is much more flexible :slightly_smiling_face: (edited)
3. The to address in the PrivateTransaction object should be optional. At the moment, when trying to deploy a private contract EthSigner is very unhappy because the to field is null while EthSigner expects it to start with 0x. Please see the example request below.
15:34:52.265 [DEBUG] [TestEventLogger] 15:34:52.265 | Test worker | DEBUG | HttpService | --> POST http://127.0.0.1:23606/ http/1.1
15:34:52.265 [DEBUG] [TestEventLogger] 15:34:52.265 | Test worker | DEBUG | HttpService | Content-Type: application/json; charset=utf-8
15:34:52.265 [DEBUG] [TestEventLogger] 15:34:52.265 | Test worker | DEBUG | HttpService | Content-Length: 1272
15:34:52.265 [DEBUG] [TestEventLogger] 15:34:52.265 | Test worker | DEBUG | HttpService |
15:34:52.266 [DEBUG] [TestEventLogger] 15:34:52.265 | Test worker | DEBUG | HttpService | {"jsonrpc":"2.0","method":"eea_sendTransaction","params":[{"from":"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73","nonce":"0x0","gasPrice":"0x3e8","gas":"0xf9f8","to":null,"value":"0x0","data":"0x608060405234801561001057600080fd5b5060008054600160a060020a03191633179055610199806100326000396000f3fe6080604052600436106100565763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f245811461005b5780636057361d1461008257806367e404ce146100ae575b600080fd5b34801561006757600080fd5b506100706100ec565b60408051918252519081900360200190f35b34801561008e57600080fd5b506100ac600480360360208110156100a557600080fd5b50356100f2565b005b3480156100ba57600080fd5b506100c3610151565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b60025490565b604080513381526020810183905281517fc9db20adedc6cf2b5d25252b101ab03e124902a73fcb12b753f3d1aaa2d8f9f5929181900390910190a16002556001805473ffffffffffffffffffffffffffffffffffffffff191633179055565b60015473ffffffffffffffffffffffffffffffffffffffff169056fea165627a7a72305820c7f729cb24e05c221f5aa913700793994656f233fe2ce3b9fd9a505ea17e8d8a0029","privateFrom":"A1aVtMxLCUHmBVHXoZzzBgPbW/wj5axDpW9X8l91SGo=","privateFor":["A1aVtMxLCUHmBVHXoZzzBgPbW/wj5axDpW9X8l91SGo="],"restriction":"restricted"}],"id":3}
15:34:52.266 [DEBUG] [TestEventLogger] 15:34:52.266 | Test worker | DEBUG | HttpService | --> END POST (1272-byte body)

I am sure more will come :smile: let me know if you are not the right person to flag this stuff to.

Status

Assignee

Unassigned

Reporter

Trent Mohay

Labels

None

Refinement State

Requires Team Review

Scrum Team

Dropbear

Epic Link

Priority

P3