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

Separate WS limit from HTTP message limit and set WS pong deadline timeout #405

Closed
wants to merge 151 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
8253211
implements RLP encoding/decoding processing for structs
trinhdn97 Jun 16, 2023
fa67be8
Update RLP lib
trinhdn97 Jun 16, 2023
9b5dadb
Implement RLP encoder code generation tool
trinhdn97 Jun 16, 2023
ddf35f8
Update unit tests and benchmark
trinhdn97 Jun 16, 2023
17e4876
Include RLPgen tool to CI
trinhdn97 Jun 20, 2023
aa7c4b4
Add benchmarks for types RLP encoding/decoding
trinhdn97 Jun 21, 2023
ac89cd3
Generate RLP encoder for some structs
trinhdn97 Jun 21, 2023
060f4ce
Convert status of receipts from uint to uint64
trinhdn97 Jun 21, 2023
788eef5
cmd/tomo: added counters to the geth inspect report
endadinh Jul 13, 2023
81be749
Change handling of dirty objects in state
endadinh Jul 13, 2023
2eb2792
feat: define ExecutionResult
imterryyy Jul 14, 2023
a88ee1c
apply new return type
imterryyy Jul 14, 2023
25f4168
handle for simulate
imterryyy Jul 14, 2023
5e52c84
return data in json
imterryyy Jul 14, 2023
8843c93
Move Message struct from package types to core
trinhdn97 Jul 14, 2023
4148d3f
Calculate TRC21GasPrice when convert a transaction to a core.Message
trinhdn97 Jul 14, 2023
47b9f53
Update unit tests
trinhdn97 Jul 14, 2023
3b6e3f3
Add more information fields to transaction receipts and regen codec/RLP
trinhdn97 Jul 14, 2023
0c7da38
Add database accessor methods for receipts/logs
trinhdn97 Jul 14, 2023
e1226ec
Add chain configs as a requirement for receipts/logs retrieving
trinhdn97 Jul 14, 2023
0eb25b2
[WIP] Fix unit tests
trinhdn97 Jul 14, 2023
8fdaf68
Unify multiple keccak interface into one inside crypto package
trinhdn97 Jul 16, 2023
c7be6cc
Merge branch 'refactor/keccak-state' into ft/stacktrie
trinhdn97 Jul 16, 2023
340bf2b
Add encode method to Node interface
trinhdn97 Jul 16, 2023
33149c9
Implement stacktrie
trinhdn97 Jul 16, 2023
2e9abc4
Add encode method for rawShortNode and rawFullNode
trinhdn97 Jul 16, 2023
008274f
Fix import cycle
trinhdn97 Jul 16, 2023
f88dba4
Fix stacktrie unit tests
trinhdn97 Jul 16, 2023
af788c6
Convert status of receipts from uint to uint64
trinhdn97 Jul 16, 2023
51df1b9
Merge branch 'update/rlp-lib' into optimize/receipt-storing
trinhdn97 Jul 16, 2023
b440640
Fix unit tests
trinhdn97 Jul 16, 2023
e0f71f5
Fix unit tests
trinhdn97 Jul 16, 2023
986a3c4
Remove irrelevant code and fix unit tests
trinhdn97 Jul 17, 2023
327c90d
Remove rlpLog RLP encoder
trinhdn97 Jul 17, 2023
4d22f8d
Fix unit tests
trinhdn97 Jul 18, 2023
5f1e2b4
Minor fix after reviewing
trinhdn97 Jul 18, 2023
c37affb
Move statedb.Account struct to types.StateAccount
trinhdn97 Jul 20, 2023
e0776fb
Move database_util.go to rawdb package
trinhdn97 Jul 20, 2023
5ce901b
Move db keys to schema.go
trinhdn97 Jul 20, 2023
36373e7
Refine db keys
trinhdn97 Jul 20, 2023
6392afd
Rename
trinhdn97 Jul 20, 2023
cf62b98
Split into sub accessor files
trinhdn97 Jul 20, 2023
97a62ca
Re-enable VM tests
trinhdn97 Jul 21, 2023
024181b
chore: remove intPool
c98tristan Jul 17, 2023
c384646
Feat: Update derive SHA for stacktrie
c98tristan Jul 19, 2023
b8421e5
Chore: Add benchmark for Stacktrie
c98tristan Jul 19, 2023
6099609
Chore: Fix Update function missing return type
c98tristan Jul 19, 2023
ae6ca82
Chore: Change GetRlp to EncodeIndex in LendingTransaction and OrderTr…
c98tristan Jul 24, 2023
515a614
Update DeriveSha with new Hasher and DerivableList interface
trinhdn97 Jul 19, 2023
44d2c54
Chore: Add intPool in interpreter.go
c98tristan Jul 24, 2023
5fae822
Merge branch 'refactor/state-account' into refactor/rawdb
trinhdn97 Jul 24, 2023
72ca227
Chore: Change parameter of NewBlock function from Trie to Stacktrie
c98tristan Jul 25, 2023
530cbb1
Chore: Sorting imported library
c98tristan Jul 25, 2023
260f47e
Chore: Sorting imported library
c98tristan Jul 25, 2023
a6098a1
Merge remote-tracking branch 'c98tristan/feat/update-trie-to-stacktri…
trinhdn97 Jul 25, 2023
b1cb0fc
Resolve conflicts after merged
trinhdn97 Jul 25, 2023
5e8bde3
Refactor some rawdb methods
trinhdn97 Jul 31, 2023
cb81493
[WIP] Implement new trie interface and separate preimageStore
trinhdn97 Jul 31, 2023
a409636
Refactor NewDatabaseWithConfig
trinhdn97 Jul 31, 2023
4e70b3e
Include configs when init trie databases
trinhdn97 Jul 31, 2023
1b9882d
Nitpick
trinhdn97 Jul 31, 2023
f7bb2d3
Merge pull request #2 from trinhdn2/update/rlp-lib
trinhdn2 Jul 31, 2023
2215526
Merge branch 'develop' into refactor/message-struct
trinhdn2 Jul 31, 2023
6d8f113
Merge pull request #3 from trinhdn2/refactor/message-struct
trinhdn2 Jul 31, 2023
e29a6fe
Merge pull request #4 from trinhdn2/refactor/keccak-state
trinhdn2 Jul 31, 2023
91bc3f9
Merge branch 'develop' into optimize/receipt-storing
trinhdn2 Jul 31, 2023
4056a32
Merge pull request #5 from trinhdn2/optimize/receipt-storing
trinhdn2 Jul 31, 2023
bdec0ee
Merge branch 'develop' into ft/stacktrie
trinhdn2 Jul 31, 2023
7cb8b5e
Merge pull request #6 from trinhdn2/ft/stacktrie
trinhdn2 Jul 31, 2023
a5ca630
Merge branch 'develop' into refactor/state-account
trinhdn2 Jul 31, 2023
6a5f547
Merge pull request #7 from trinhdn2/refactor/state-account
trinhdn2 Jul 31, 2023
74ba391
Merge branch 'develop' into refactor/rawdb
trinhdn97 Aug 1, 2023
f47664c
Merge pull request #8 from trinhdn2/refactor/rawdb
trinhdn2 Aug 1, 2023
475b70a
Merge pull request #9 from c98tristan:feat/update-trie-to-stacktrie
trinhdn97 Aug 1, 2023
25f9c44
Merge branch 'develop' into feat/update-trie-to-stacktrie
trinhdn97 Aug 1, 2023
b624700
Merge pull request #9 from c98tristan/feat/update-trie-to-stacktrie
trinhdn2 Aug 1, 2023
62f26cf
Minor fix
trinhdn97 Aug 1, 2023
097326c
Bump client version to 2.4.0
trinhdn2 Aug 2, 2023
1c0d050
Merge pull request #10 from nguyenbatam/fix_api_traceblock
trinhdn2 Aug 2, 2023
943f500
Fix UpdateStorage in trie
trinhdn97 Aug 3, 2023
be70268
Fix trie unit tests
trinhdn97 Aug 3, 2023
bf41851
Fix GetCommittedState and GetState
trinhdn97 Aug 3, 2023
12d08d0
Fix state test
trinhdn97 Aug 4, 2023
fadcdab
Merge branch 'refactor/trie-interface-2' into develop
trinhdn97 Aug 4, 2023
47e5d54
Implement AddUncheckedTx in chain maker
trinhdn97 Aug 4, 2023
b4e8864
Merge branch 'optimize/receipt-storing' into develop
trinhdn97 Aug 4, 2023
40d1d00
Merge remote-tracking branch 'endale98/remove_dirty' into develop
trinhdn97 Aug 4, 2023
0d0b124
Dynamic state snapshots
endadinh Jul 14, 2023
a3c9a57
Fix after rebase
trinhdn97 Jul 17, 2023
2ad92f6
fix unit tests
endadinh Jul 17, 2023
a0d9474
Remove duplicate accessor methods
trinhdn97 Jul 17, 2023
995f139
Record prevdestruct in journal
trinhdn97 Aug 7, 2023
8d08325
Use types.SlimAccount instead of snapshot.Account
trinhdn97 Aug 7, 2023
781ac07
Rename receivers and implement pendingStorage
trinhdn97 Aug 7, 2023
d3a156f
Update statedb.go
trinhdn97 Aug 7, 2023
3659a0d
Revert
trinhdn97 Aug 10, 2023
420d343
Fix commit and copy state
trinhdn97 Aug 14, 2023
bcae7d2
Record blockWriteTimer metric
trinhdn97 Aug 18, 2023
2bacd4f
Merge pull request #13 from trinhdn2/ft/dynamic_state_snapshot
trinhdn2 Aug 18, 2023
271fdaf
Merge remote-tracking branch 'terryyyz-coin98/fix/return-revert-for-e…
trinhdn97 Aug 25, 2023
25b8733
Format code
trinhdn97 Sep 8, 2023
156f1ce
Merge pull request #16 from trinhdn2/ft/revert_errors
trinhdn2 Sep 8, 2023
35e30f6
Run gofmt and fix unit tests
trinhdn97 Sep 20, 2023
653e72e
Add packing for dynamic array and slice types
trinhdn97 Sep 29, 2023
4e8214c
Tuple support
trinhdn97 Sep 29, 2023
a9cbf32
Add unit tests
trinhdn97 Sep 29, 2023
8dfd14b
Merge remote-tracking branch 'terryyyz-coin98/fix/return-revert-for-e…
trinhdn97 Oct 5, 2023
c746706
[WIP] Split Unpack and UnpackIntoInterface
trinhdn97 Oct 6, 2023
f545faf
Fix unpack tuple unit test
trinhdn97 Oct 8, 2023
9394238
Use UnpackIntoInterface instead of the general Unpack
trinhdn97 Oct 8, 2023
d2ac293
Parse ABI only once, create metadata struct
trinhdn97 Oct 8, 2023
80996ea
[WIP] Optimize EstimateGas API
trinhdn97 Oct 9, 2023
97284ef
Use same state for each invocation within EstimateGas
trinhdn97 Oct 10, 2023
9838222
Restore error functionality
trinhdn97 Oct 10, 2023
25bc7bc
Merge branch 'devnet' into optimize/estimate_gas
trinhdn2 Oct 10, 2023
450edd6
Merge pull request #17 from trinhdn2/optimize/estimate_gas
trinhdn2 Oct 10, 2023
6a3639b
Merge branch 'devnet' into ft/parse_ABI_once
trinhdn2 Oct 10, 2023
2a4e869
Merge pull request #18 from trinhdn2/ft/parse_ABI_once
trinhdn2 Oct 10, 2023
021856f
Fix merge conflicts
trinhdn97 Oct 10, 2023
1d81da4
Add devnet profile and reduce blocks per epoch
trinhdn97 Oct 11, 2023
a8106e2
Handle solidity panic revert
trinhdn97 Oct 26, 2023
93f0cad
Merge branch 'ft/handle_solidity_panic' into devnet
trinhdn97 Oct 26, 2023
6b84f76
Fix imports
trinhdn97 Oct 31, 2023
b0cf428
Implement IP tracker
trinhdn97 Oct 27, 2023
67a1980
Update Ethereum node record
trinhdn97 Oct 27, 2023
7c5781c
Implement new P2P node representation
trinhdn97 Oct 27, 2023
331c4d9
Port p2p/discover to p2p/enode
trinhdn97 Oct 30, 2023
47ad2d3
Port p2p to p2p/enode
trinhdn97 Oct 30, 2023
1fbef4c
Port p2p/simulations and testing to p2p/enode
trinhdn97 Oct 30, 2023
70f4faf
cmd, swarm: port to p2p/enode
trinhdn97 Oct 30, 2023
d2a975d
[WIP] Fix p2e/enode porting unit tests
trinhdn97 Oct 30, 2023
3c18913
[WIP] Fix enode unit tests
trinhdn97 Oct 31, 2023
7c3dbe0
[WIP] Fix swarm unit tests
trinhdn97 Oct 31, 2023
f562dea
Fix downloader and p2p/peer unit tests
trinhdn97 Oct 31, 2023
a73dfa8
Fix swarm upload unit test
trinhdn97 Oct 31, 2023
301300c
Implement bi-directional communication
trinhdn97 Nov 30, 2023
4ddc12c
Add HTTP timeout and cleanup
trinhdn97 Nov 30, 2023
6af9da7
Add rpc unit tests
trinhdn97 Nov 30, 2023
9fbea60
Fix protocol unit tests
trinhdn97 Dec 4, 2023
ba6b0db
Use gorilla websocket instead of native lib
trinhdn97 Dec 4, 2023
772a53b
Increase HTTP/Websocket request size limit to 5MB
trinhdn97 Dec 4, 2023
ca97f69
Update ETHstats
trinhdn97 Dec 4, 2023
89d2fce
Merge branch 'ft/p2p-enode' into ft/use_gorilla_websocket
trinhdn97 Dec 5, 2023
c3bb18b
Improve codec abstraction and use gorilla/websocket
trinhdn97 Dec 5, 2023
d7cb1cb
Use gorilla websocket in p2p/simulations
trinhdn97 Dec 5, 2023
c283f8a
Fix unit tests
trinhdn97 Dec 5, 2023
a62b058
Use gorilla websocket for cmd/faucet
trinhdn97 Dec 5, 2023
3952c1e
Send websocket ping when connection is idle
trinhdn97 Dec 5, 2023
09ad227
Re-add NewWSServer for compatibility
trinhdn97 Dec 7, 2023
94663c6
Separate and increase wsMessageSizeLimit to 32 MB
trinhdn97 Dec 7, 2023
1c3d200
Set websocket pong deadline timeout
trinhdn97 Dec 7, 2023
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
Prev Previous commit
Next Next commit
Fix unpack tuple unit test
  • Loading branch information
trinhdn97 committed Oct 8, 2023
commit f545fafedbee0140a0e5c4d0d66681fd72cb17e4
18 changes: 11 additions & 7 deletions accounts/abi/unpack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -763,20 +763,24 @@ func TestUnpackTuple(t *testing.T) {
buff.Write(common.Hex2Bytes("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")) // ret[b] = -1

// If the result is single tuple, use struct as return value container directly.
v := struct {
type v struct {
A *big.Int
B *big.Int
}{new(big.Int), new(big.Int)}
}
type r struct {
Result v
}
var ret0 = new(r)
err = abi.UnpackIntoInterface(ret0, "tuple", buff.Bytes())

err = abi.UnpackIntoInterface(&v, "tuple", buff.Bytes())
if err != nil {
t.Error(err)
} else {
if v.A.Cmp(big.NewInt(1)) != 0 {
t.Errorf("unexpected value unpacked: want %x, got %x", 1, v.A)
if ret0.Result.A.Cmp(big.NewInt(1)) != 0 {
t.Errorf("unexpected value unpacked: want %x, got %x", 1, ret0.Result.A)
}
if v.B.Cmp(big.NewInt(-1)) != 0 {
t.Errorf("unexpected value unpacked: want %x, got %x", -1, v.B)
if ret0.Result.B.Cmp(big.NewInt(-1)) != 0 {
t.Errorf("unexpected value unpacked: want %x, got %x", -1, ret0.Result.B)
}
}

Expand Down