Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Replace minBlock property on eth_sendTransaction Transaction parameter in documentation with condition property. #5391

Closed
MicahZoltu opened this issue Apr 4, 2017 · 8 comments
Assignees
Labels
F5-documentation 📑 Documentation needs fixing, improving or augmenting. M6-rpcapi 📣 RPC API.

Comments

@MicahZoltu
Copy link
Contributor

I'm running ethcore/parity:v1.6.5 in Docker with:

/parity/parity \
	--chain dev \
	--no-discovery \
	--force-ui --ui-no-validation --ui-interface 0.0.0.0 \
	--jsonrpc-interface all --jsonrpc-cors "*" --jsonrpc-hosts all \
	--unlock 0x00a329c0648769a73afac7f9381e08fb43dbea72 --password /parity/password

When I try to call eth_sendTransaction via HTTP with this payload (note the minBlock property):

{"id":2408,"jsonrpc":"2.0","method":"eth_sendTransaction","params":[{"from":"0x00a329c0648769a73afac7f9381e08fb43dbea72","to":"0x1f79a7d7fe04baf6b5343131cd71c52a749cc6f4","data":"0x47c7ea4200000000000000000000000000000000000000000000000000000000000f69b500000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000058e344700000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000001bc16d674ec80000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000470de4df820000616f657500000000000000000000000000000000000000000000000000000000666f6f0000000000000000000000000000000000000000000000000000000000626172000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006f05b59d3b2000000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000004616f657500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004616f657500000000000000000000000000000000000000000000000000000000","gas":"0x2fd618","gasPrice":"0x1","value":"0x19f0a0","minBlock":"latest"}]}

I get this response:

{"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params: unknown field `minBlock`, expected one of `from`, `to`, `gasPrice`, `gas`, `value`, `data`, `nonce`, `condition`."},"id":2408}

According to the documentation, minBlock is a valid property to have on a Transaction.

This seems related to #3921, but that has been merged for several months so I would expect to see it in the release from a week ago.

@5chdn 5chdn added M6-rpcapi 📣 RPC API. F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. labels Apr 4, 2017
@tomusdrw
Copy link
Collaborator

tomusdrw commented Apr 4, 2017

minBlock property is now part of condition, so transaction should look like this:

{
  "from": "0x123...123",
  "condition": { "block": 1 }
}

Seems that the documentation is outdated.

@tomusdrw tomusdrw self-assigned this Apr 4, 2017
@5chdn 5chdn added F5-documentation 📑 Documentation needs fixing, improving or augmenting. and removed F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. labels Apr 4, 2017
@tomusdrw tomusdrw assigned tomusdrw and unassigned tomusdrw Apr 4, 2017
@MicahZoltu
Copy link
Contributor Author

Do you happen to know if this API change will occur in geth as well? When writing a dApp, working with multiple node client types is desirable and little API differences like this can really make that difficult.

@MicahZoltu
Copy link
Contributor Author

Also, does this mean that parity isn't following semantic versioning? This is a backwards incompatible change after all.

@tomusdrw
Copy link
Collaborator

tomusdrw commented Apr 4, 2017

That feature is not available in geth as far as I know. It's a custom Parity extension. The way it was described in docs actually never reached beta channel (was like this only in master for few days), but the documentation was not updated.

@MicahZoltu
Copy link
Contributor Author

Hmm, okay. I wonder how it ended up in our code (which was originally written for Geth). Searching in the go-ethereum repository doesn't return anything for minBlock though, so it would seem you are right that it is a Parity only thing. I'll leave this open for the documentation update and rename the title of this issue to reflect as much.

@MicahZoltu MicahZoltu changed the title Support minBlock property on eth_sendTransaction Transaction parameter. Replace minBlock property on eth_sendTransaction Transaction parameter in documentation with condition property. Apr 4, 2017
@5chdn
Copy link
Contributor

5chdn commented May 15, 2017

Reopening as the wiki is still outdated. @tomusdrw I can update the wiki, what else does condition accept?

@5chdn 5chdn reopened this May 15, 2017
@tomusdrw
Copy link
Collaborator

RPC wiki should be updated from auto-generated files from code, so please don't update it manually.
The update process looks like this

$ cd parity/js
$ npm i && npm run build:markdown
$ cat docs/eth.md | xclip
# Edit wiki page and paste content.

Update eth wiki page now.

@5chdn
Copy link
Contributor

5chdn commented May 15, 2017

Thanks for the hint.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F5-documentation 📑 Documentation needs fixing, improving or augmenting. M6-rpcapi 📣 RPC API.
Projects
None yet
Development

No branches or pull requests

3 participants