Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error messages refactoring #1854

Merged
merged 61 commits into from
Jan 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
775c141
use VMError instead of String in FunctionCall error
lexfrl Dec 12, 2019
5f2226f
some progress on errors
lexfrl Dec 18, 2019
a986bc7
errors refactor
lexfrl Dec 18, 2019
bc9910c
revert changes (rename fields)
lexfrl Dec 18, 2019
ad1e830
test pass
lexfrl Dec 18, 2019
4cd0ff5
error view update
lexfrl Dec 19, 2019
5fc2e61
WIP
lexfrl Dec 19, 2019
5696c99
make it compile
lexfrl Dec 19, 2019
6515670
tests pass
lexfrl Dec 19, 2019
27ab39b
action index added to ActionError
lexfrl Dec 20, 2019
3062291
action index added: test pass
lexfrl Dec 20, 2019
8657d92
merge statging
lexfrl Dec 23, 2019
6d7c555
FunctionCall(String) -> FunctionCall(VMError)
lexfrl Dec 23, 2019
52ebc4d
rpctypegen start
lexfrl Dec 25, 2019
a339c34
continue with RpcError derive_macro
lexfrl Dec 26, 2019
c32ddb9
continue working
lexfrl Dec 26, 2019
63e7cc4
errors JSON schema generation done
lexfrl Dec 27, 2019
3aebd75
Do not rewrite the schema file. Merge error schemas instead.
lexfrl Dec 30, 2019
695c11b
small fix
lexfrl Dec 30, 2019
212a430
VMErrors refactoring
lexfrl Dec 31, 2019
08f601f
expose errors schema
lexfrl Jan 3, 2020
614287f
rename rpc_errors_schema.json
lexfrl Jan 6, 2020
c07565d
merge staging
lexfrl Jan 6, 2020
95ce423
specify a nearlib revision to test against
lexfrl Jan 8, 2020
c09cb6c
fix tests
lexfrl Jan 8, 2020
cd6e006
fix merge
lexfrl Jan 8, 2020
03c0ee8
fix rpctypegen build
lexfrl Jan 8, 2020
5979f68
Merge branch 'staging' into fckt/rpc-errors
lexfrl Jan 8, 2020
86ad272
fix ci: exclude near_rpc_error_macro from tests
lexfrl Jan 10, 2020
7815156
Merge branch 'staging' into fckt/rpc-errors
lexfrl Jan 10, 2020
f09766e
Merge branch 'staging' into fckt/rpc-errors
lexfrl Jan 10, 2020
a82fa00
add Errors docs, rename error types fix Balance formatting
lexfrl Jan 13, 2020
9694cf6
fix formatting
lexfrl Jan 13, 2020
216c808
Merge branch 'staging' into fckt/rpc-errors
lexfrl Jan 13, 2020
7090763
make schema deterministic
lexfrl Jan 13, 2020
c15391c
Update core/primitives/src/errors.rs
lexfrl Jan 13, 2020
d3f7e7b
Update core/primitives/src/errors.rs
lexfrl Jan 13, 2020
6f30669
Update core/primitives/src/errors.rs
lexfrl Jan 13, 2020
3c8f755
Apply suggestions from code review
lexfrl Jan 13, 2020
006bdf8
return ActionErrorKind::ActorNoPermission on AccountDelete and not sir
lexfrl Jan 13, 2020
68a3a99
Merge branch 'fckt/rpc-errors' of github.com:nearprotocol/nearcore in…
lexfrl Jan 13, 2020
4c476f1
StorageError doc comment addition
lexfrl Jan 13, 2020
75f5383
update BalanceMismatch doc comment
lexfrl Jan 13, 2020
90c1f44
Apply suggestions from code review
lexfrl Jan 13, 2020
7fb443d
Merge branch 'staging' into fckt/rpc-errors
lexfrl Jan 13, 2020
1a7eb06
ActionError index doc added
lexfrl Jan 13, 2020
4b749d7
Merge branch 'fckt/rpc-errors' of github.com:nearprotocol/nearcore in…
lexfrl Jan 13, 2020
a2ae077
fix check_actor_permissions for DeleteAccount
lexfrl Jan 13, 2020
879dffe
no cargo clean in build_errors_schema.sh and move to scripts
lexfrl Jan 13, 2020
c641f4a
feature-gated schema dump generation
lexfrl Jan 14, 2020
b9ae3fd
Merge branch 'staging' into fckt/rpc-errors
lexfrl Jan 16, 2020
18ccdf3
Update tools/rpctypegen/Cargo.toml
lexfrl Jan 17, 2020
361319b
removed rpc_error_variant attribute
lexfrl Jan 20, 2020
7bbba23
split rpctypegen into core and macro crated + tests added
lexfrl Jan 20, 2020
615121d
Merge branch 'staging' into fckt/rpc-errors
lexfrl Jan 20, 2020
addf11f
ServerError Display impl
lexfrl Jan 20, 2020
c1a094b
moved build_errors_schema.sh and res/rpc_errors_schema.json to a json…
lexfrl Jan 20, 2020
d9f3c6d
fix rpc-errors test
lexfrl Jan 21, 2020
e44e157
ActionError -> RequiresFullAccess
lexfrl Jan 21, 2020
d56236f
Merge branch 'staging' into fckt/rpc-errors
lexfrl Jan 22, 2020
983478b
fix comment
lexfrl Jan 22, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ members = [
"test-utils/loadtester",
"test-utils/state-viewer",
"near/",
"tools/rpctypegen/core",
"tools/rpctypegen/macro",
"genesis-tools/genesis-csv-to-json",
"genesis-tools/genesis-populate",
"genesis-tools/keypair-generator",
Expand Down
8 changes: 7 additions & 1 deletion chain/jsonrpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ serde_derive = "1.0"
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
uuid = { version = "~0.8", features = ["v4"] }

borsh = "0.2.10"

near-crypto = { path = "../../core/crypto" }
Expand All @@ -33,3 +32,10 @@ near-client = { path = "../client" }
near-network = { path = "../network" }
near-pool = { path = "../pool" }
near-jsonrpc-client = { path = "client" }
near-rpc-error-macro = { path = "../../tools/rpctypegen/macro" }

[build-dependencies]
_rand = { package = "rand", version = "0.6.5" }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need this specific version of rand?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a trick to make it compile. Take a look:

dalek-cryptography/ed25519-dalek#89


[features]
dump_errors_schema = ["near-rpc-error-macro/dump_errors_schema"]
3 changes: 3 additions & 0 deletions chain/jsonrpc/build_errors_schema.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
cargo build --features dump_errors_schema
cp ../../target/rpc_errors_schema.json ./res/rpc_errors_schema.json
Loading