This repository has been archived by the owner on Nov 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
EIP-1186: add eth_getProof
RPC-Method
#9001
Merged
Merged
Changes from 99 commits
Commits
Show all changes
100 commits
Select commit
Hold shift + click to select a range
c99e021
added eth_getAccount
simon-jentzsch f6d95f8
changed to getProof
simon-jentzsch d13364d
implemented storage_proof
simon-jentzsch 767847b
better formatting of storage proof
simon-jentzsch 35e522c
fixed imports;2C
simon-jentzsch 7a62f08
removed spaces
simon-jentzsch 388947f
fixed whitespace
simon-jentzsch f4090a9
fixed docker
simon-jentzsch 2ba4396
added doc
simon-jentzsch bbfbaa5
fixed Compile-error
simon-jentzsch 2621b4a
expose more ports
simon-jentzsch 080ce05
added eth_getAccount
simon-jentzsch 4f9f285
changed to getProof
simon-jentzsch a66db7f
implemented storage_proof
simon-jentzsch f5f3e1c
better formatting of storage proof
simon-jentzsch ad50c15
fixed docker
simon-jentzsch 2f1f536
removed slockit-changes
simon-jentzsch f024622
fixed Dockerfile
simon-jentzsch c119551
intend
simon-jentzsch 7a26db8
spaces
simon-jentzsch 0fa4456
removed spaces
simon-jentzsch ddd2db5
fixed whitespace
simon-jentzsch b55131d
fixed docker
simon-jentzsch fc4da1c
tabs
simon-jentzsch be62ef5
fixed Compile-error
simon-jentzsch b616a20
added eth_getAccount
simon-jentzsch e2cc24e
changed to getProof
simon-jentzsch 0b4ad47
implemented storage_proof
simon-jentzsch 345712b
fixed docker
simon-jentzsch 8c3adb4
removed slockit-changes
simon-jentzsch a3348c7
fixed Dockerfile
simon-jentzsch cbc8f64
intend
simon-jentzsch 8f59da2
spaces
simon-jentzsch 785d35b
removed spaces
simon-jentzsch 0807ea3
fixed whitespace
simon-jentzsch 2663199
fixed docker
simon-jentzsch 8128639
tabs
simon-jentzsch aa194da
merged changes
simon-jentzsch e5b4e21
fixed warnings
simon-jentzsch eeceb4d
added eth_getAccount
simon-jentzsch 81fc2a2
changed to getProof
simon-jentzsch 44327c6
implemented storage_proof
simon-jentzsch 90c24f5
better formatting of storage proof
simon-jentzsch 1c2c603
Update Dockerfile
simon-jentzsch ce9d30d
fixed docker
simon-jentzsch 8394d82
removed slockit-changes
simon-jentzsch ddbf8db
fixed Dockerfile
simon-jentzsch 690d94c
intend
simon-jentzsch be46184
spaces
simon-jentzsch 6f91025
removed spaces
simon-jentzsch 39fd491
fixed whitespace
simon-jentzsch 1831b00
fixed docker
simon-jentzsch d09e66e
tabs
simon-jentzsch 9888eac
added eth_getAccount
simon-jentzsch 8beaa27
changed to getProof
simon-jentzsch f69855c
implemented storage_proof
simon-jentzsch 3340d80
removed spaces
simon-jentzsch 2e4e809
fixed whitespace
simon-jentzsch 501cd20
fixed docker
simon-jentzsch 2ec8ecb
added eth_getAccount
simon-jentzsch 0297c27
changed to getProof
simon-jentzsch 61a27f3
implemented storage_proof
simon-jentzsch 2ae1e30
better formatting of storage proof
simon-jentzsch 232558b
fixed docker
simon-jentzsch 76ecd30
removed slockit-changes
simon-jentzsch 8101a00
fixed Dockerfile
simon-jentzsch 529efe9
intend
simon-jentzsch 940690b
spaces
simon-jentzsch 6cc9084
removed spaces
simon-jentzsch e33d262
fixed whitespace
simon-jentzsch 9649190
fixed docker
simon-jentzsch 412ff56
tabs
simon-jentzsch 76f5618
merged changes
simon-jentzsch ddbc0cd
fixed merge error
simon-jentzsch 4c3d318
fixed formatting
simon-jentzsch 16abb5e
fixed rename_all = "camelCase"
simon-jentzsch 1e4216a
fixed tabs
simon-jentzsch d3a2497
fixed spaces
simon-jentzsch df7a9ff
removed port exposer
simon-jentzsch 468f82f
formatting
simon-jentzsch 8edb13b
fixed comment
simon-jentzsch 85860f7
use filter_map
simon-jentzsch b988548
formatting
simon-jentzsch 8662f39
use better variable names
simon-jentzsch c35cfbf
changed casting
simon-jentzsch b3dd659
fixed tabs
simon-jentzsch e766cb1
remote into() from address
simon-jentzsch 179bb78
remove space
niklasad1 70c48a9
fixed storage_index
niklasad1 3a9c3d8
fixed clone
simon-jentzsch 0c6c8a9
fixed format
niklasad1 972c4c2
fixed empty lines
simon-jentzsch 6f67a42
Merge branch 'in3' of github.com:slockit/parity into in3
simon-jentzsch fa05357
removed Option from EthAccount
simon-jentzsch 4db8cec
fixed storage_index
simon-jentzsch 1d652dc
implemented test and fixed the struct-spaces
simon-jentzsch 094898a
Merge branch 'master' into in3
5chdn b27be88
fixed tests
simon-jentzsch 151ff09
added experimental RPCs flag for getProof
simon-jentzsch ad9c241
optmized code
simon-jentzsch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ use parity_runtime::Runtime; | |
use jsonrpc_core::IoHandler; | ||
use v1::helpers::dispatch::FullDispatcher; | ||
use v1::helpers::nonce; | ||
use v1::impls::{EthClient, SigningUnsafeClient}; | ||
use v1::impls::{EthClient, EthClientOptions, SigningUnsafeClient}; | ||
use v1::metadata::Metadata; | ||
use v1::tests::helpers::{TestSnapshotService, TestSyncProvider, Config}; | ||
use v1::traits::eth::Eth; | ||
|
@@ -140,7 +140,13 @@ impl EthTester { | |
&opt_account_provider, | ||
&miner_service, | ||
&external_miner, | ||
Default::default(), | ||
EthClientOptions { | ||
pending_nonce_from_queue: false, | ||
allow_pending_receipt_query: true, | ||
send_block_number_in_get_work: true, | ||
gas_price_percentile: 50, | ||
allow_experimental_rpcs: true, | ||
}, | ||
); | ||
|
||
let reservations = Arc::new(Mutex::new(nonce::Reservations::new(runtime.executor()))); | ||
|
@@ -198,6 +204,33 @@ fn eth_get_balance() { | |
assert_eq!(tester.handler.handle_request_sync(req_new_acc).unwrap(), res_new_acc); | ||
} | ||
|
||
#[test] | ||
fn eth_get_proof() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would be good to have a test already when |
||
let chain = extract_chain!("BlockchainTests/bcWalletTest/wallet2outOf3txs"); | ||
let tester = EthTester::from_chain(&chain); | ||
// final account state | ||
let req_latest = r#"{ | ||
"jsonrpc": "2.0", | ||
"method": "eth_getProof", | ||
"params": ["0xaaaf5374fce5edbc8e2a8697c15331677e6ebaaa", [], "latest"], | ||
"id": 1 | ||
}"#; | ||
|
||
let res_latest = r#","address":"0xaaaf5374fce5edbc8e2a8697c15331677e6ebaaa","balance":"0x9","codeHash":"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470","nonce":"0x0","storageHash":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","storageProof":[]},"id":1}"#.to_owned(); | ||
assert!(tester.handler.handle_request_sync(req_latest).unwrap().to_string().ends_with(res_latest.as_str())); | ||
|
||
// non-existant account | ||
let req_new_acc = r#"{ | ||
"jsonrpc": "2.0", | ||
"method": "eth_getProof", | ||
"params": ["0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",[],"latest"], | ||
"id": 3 | ||
}"#; | ||
|
||
let res_new_acc = r#","address":"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","balance":"0x0","codeHash":"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470","nonce":"0x0","storageHash":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","storageProof":[]},"id":3}"#.to_owned(); | ||
assert!(tester.handler.handle_request_sync(req_new_acc).unwrap().to_string().ends_with(res_new_acc.as_str())); | ||
} | ||
|
||
#[test] | ||
fn eth_block_number() { | ||
let chain = extract_chain!("BlockchainTests/bcGasPricerTest/RPC_API_Test"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be a
.map
instead ofmatch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, changed it.