Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
52c02ccb
Unverified
Commit
52c02ccb
authored
3 years ago
by
Martin Holst Swende
Committed by
GitHub
3 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/evm: handle rlp errors in t9n (#23771)
* cmd/evm: handle rlp errors in t9n * cmd/evm/testdata: fix readme
parent
eab4d898
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
0 deletions
+22
-0
transaction.go
cmd/evm/internal/t8ntool/transaction.go
+3
-0
t8n_test.go
cmd/evm/t8n_test.go
+9
-0
README.md
cmd/evm/testdata/18/README.md
+9
-0
invalid.rlp
cmd/evm/testdata/18/invalid.rlp
+1
-0
No files found.
cmd/evm/internal/t8ntool/transaction.go
View file @
52c02ccb
...
...
@@ -121,6 +121,9 @@ func Transaction(ctx *cli.Context) error {
}
var
results
[]
result
for
it
.
Next
()
{
if
err
:=
it
.
Err
();
err
!=
nil
{
return
NewError
(
ErrorIO
,
err
)
}
var
tx
types
.
Transaction
err
:=
rlp
.
DecodeBytes
(
it
.
Value
(),
&
tx
)
if
err
!=
nil
{
...
...
This diff is collapsed.
Click to expand it.
cmd/evm/t8n_test.go
View file @
52c02ccb
...
...
@@ -9,6 +9,7 @@ import (
"testing"
"github.com/docker/docker/pkg/reexec"
"github.com/ethereum/go-ethereum/cmd/evm/internal/t8ntool"
"github.com/ethereum/go-ethereum/internal/cmdtest"
)
...
...
@@ -265,6 +266,14 @@ func TestT9n(t *testing.T) {
},
expOut
:
"exp.json"
,
},
{
// Invalid RLP
base
:
"./testdata/18"
,
input
:
t9nInput
{
inTxs
:
"invalid.rlp"
,
stFork
:
"London"
,
},
expExitCode
:
t8ntool
.
ErrorIO
,
},
}
{
args
:=
[]
string
{
"t9n"
}
...
...
This diff is collapsed.
Click to expand it.
cmd/evm/testdata/18/README.md
0 → 100644
View file @
52c02ccb
# Invalid rlp
This folder contains a sample of invalid RLP, and it's expected
that the t9n handles this properly:
```
$ go run . t9n --input.txs=./testdata/18/invalid.rlp --state.fork=London
ERROR(11): rlp: value size exceeds available input length
```
\ No newline at end of file
This diff is collapsed.
Click to expand it.
cmd/evm/testdata/18/invalid.rlp
0 → 100644
View file @
52c02ccb
"0xf852328001825208870b9331677e6ebf0a801ca098ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4aa03887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3"
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment