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
19824372
Unverified
Commit
19824372
authored
May 12, 2023
by
Péter Szilágyi
Committed by
GitHub
May 12, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core/types: un-ssz blob txs, add json marshalling and tweaks (#27256)
parent
dffd804c
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
138 additions
and
62 deletions
+138
-62
gen_access_tuple.go
core/types/gen_access_tuple.go
+4
-4
transaction.go
core/types/transaction.go
+2
-6
transaction_marshalling.go
core/types/transaction_marshalling.go
+129
-49
tx_access_list.go
core/types/tx_access_list.go
+2
-2
tx_blob.go
core/types/tx_blob.go
+1
-1
No files found.
core/types/gen_access_tuple.go
View file @
19824372
core/types/transaction.go
View file @
19824372
...
@@ -198,7 +198,7 @@ func (tx *Transaction) decodeTyped(b []byte) (TxData, error) {
...
@@ -198,7 +198,7 @@ func (tx *Transaction) decodeTyped(b []byte) (TxData, error) {
return
&
inner
,
err
return
&
inner
,
err
case
BlobTxType
:
case
BlobTxType
:
var
inner
BlobTx
var
inner
BlobTx
err
:=
rlp
.
DecodeBytes
(
b
[
1
:
],
&
inner
)
// TODO(karalabe): This needs to be ssz
err
:=
rlp
.
DecodeBytes
(
b
[
1
:
],
&
inner
)
return
&
inner
,
err
return
&
inner
,
err
default
:
default
:
return
nil
,
ErrTxTypeNotSupported
return
nil
,
ErrTxTypeNotSupported
...
@@ -417,11 +417,7 @@ func (tx *Transaction) Size() uint64 {
...
@@ -417,11 +417,7 @@ func (tx *Transaction) Size() uint64 {
return
size
.
(
uint64
)
return
size
.
(
uint64
)
}
}
c
:=
writeCounter
(
0
)
c
:=
writeCounter
(
0
)
if
tx
.
Type
()
==
BlobTxType
{
rlp
.
Encode
(
&
c
,
&
tx
.
inner
)
// TODO(karalabe): Replace with SSZ encoding
}
else
{
rlp
.
Encode
(
&
c
,
&
tx
.
inner
)
rlp
.
Encode
(
&
c
,
&
tx
.
inner
)
}
size
:=
uint64
(
c
)
size
:=
uint64
(
c
)
if
tx
.
Type
()
!=
LegacyTxType
{
if
tx
.
Type
()
!=
LegacyTxType
{
...
...
core/types/transaction_marshalling.go
View file @
19824372
This diff is collapsed.
Click to expand it.
core/types/tx_access_list.go
View file @
19824372
core/types/tx_blob.go
View file @
19824372
...
@@ -31,7 +31,7 @@ type BlobTx struct {
...
@@ -31,7 +31,7 @@ type BlobTx struct {
GasTipCap
*
uint256
.
Int
// a.k.a. maxPriorityFeePerGas
GasTipCap
*
uint256
.
Int
// a.k.a. maxPriorityFeePerGas
GasFeeCap
*
uint256
.
Int
// a.k.a. maxFeePerGas
GasFeeCap
*
uint256
.
Int
// a.k.a. maxFeePerGas
Gas
uint64
Gas
uint64
To
*
common
.
Address
//
`rlp:"nil"` // nil means contract creation
To
*
common
.
Address
`rlp:"nil"`
// nil means contract creation
Value
*
uint256
.
Int
Value
*
uint256
.
Int
Data
[]
byte
Data
[]
byte
AccessList
AccessList
AccessList
AccessList
...
...
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