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

Update Stable Cadence feature branch #5429

Merged
merged 130 commits into from
Feb 21, 2024
Merged
Changes from 1 commit
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
30ae3bd
add self destruct test
Jan 23, 2024
4132476
add self destruct test
Jan 23, 2024
846d486
check nonce
Jan 23, 2024
83b5e3c
update the test according to eip6780
Jan 25, 2024
717ef6c
Merge branch 'master' into gregor/evm/selfdestruct-test
devbugging Jan 25, 2024
2e408ca
Merge remote-tracking branch 'origin/gregor/evm/selfdestruct-test' in…
Jan 29, 2024
89ae02e
Update validation_inspector_test.go
kc1116 Jan 30, 2024
6b45719
Update bitswap
peterargue Feb 1, 2024
3e9473a
upgrade libp2p/go-libp2p-kad-dht to v0.25.2
peterargue Feb 1, 2024
737aad1
Merge branch 'master' into gregor/evm/selfdestruct-test
devbugging Feb 6, 2024
d1547ec
Merge branch 'master' into khalil/1908-fix-gossipsub-integration-test
kc1116 Feb 6, 2024
82359ca
Update validation_inspector_test.go
kc1116 Feb 7, 2024
110d772
add direct call transaction
Feb 9, 2024
b7e4662
modify hash calculation
Feb 9, 2024
78cd5d3
fix comment
Feb 9, 2024
ea8b59f
add tests for hash and tx
Feb 9, 2024
0c44322
Merge branch 'master' into gregor/evm/direct-call
devbugging Feb 9, 2024
b5d4c59
set nonce for direct calls
ramtinms Feb 10, 2024
cc432b9
add docs
ramtinms Feb 12, 2024
1f21cbd
Merge pull request #5373 from onflow/ramtin/set-nonce-for-direct-calls
ramtinms Feb 12, 2024
3ccab4f
update contract
ramtinms Feb 12, 2024
49f01ca
Merge branch 'master' into ramtin/5197-part4-improvemetns-to-COA-proo…
ramtinms Feb 13, 2024
b74caa9
Merge branch 'master' into gregor/evm/direct-call
ramtinms Feb 13, 2024
4dbe325
add checkpoint file size metrics
zhangchiqing Feb 14, 2024
e2a0dbb
update mock
zhangchiqing Feb 14, 2024
29acb91
add control over exec outcome
ramtinms Feb 15, 2024
f93dd53
bug fix
ramtinms Feb 15, 2024
5f0d25e
bug fix
ramtinms Feb 15, 2024
b39bd34
Merge branch 'master' into ramtin/5197-part4-improvemetns-to-COA-proo…
ramtinms Feb 15, 2024
5da4aa9
minor improvements
ramtinms Feb 15, 2024
681d2b7
Merge branch 'ramtin/5197-part4-improvemetns-to-COA-proof-verificatio…
ramtinms Feb 15, 2024
0465324
handle fatal errors
ramtinms Feb 15, 2024
894fb1f
.
ramtinms Feb 15, 2024
cac590e
clean up
ramtinms Feb 15, 2024
4d95664
clean up
ramtinms Feb 15, 2024
9a4b6ca
add todo
ramtinms Feb 15, 2024
717f7d0
update tests
ramtinms Feb 15, 2024
6794c1d
[Access] Refactor access connection cache
peterargue Feb 1, 2024
0146350
switch to rw lock
peterargue Feb 1, 2024
69b0d0b
Add rapid connection disconnection test
peterargue Feb 1, 2024
eb51f0f
Update existing rapid tests to new version
peterargue Feb 1, 2024
5b1060c
fix rapid test concurrent Draw
peterargue Feb 15, 2024
3f62a06
update result enum type
ramtinms Feb 15, 2024
b62b644
add mustRun
ramtinms Feb 15, 2024
1d3c56f
clean up
ramtinms Feb 15, 2024
1e820a8
clean up
ramtinms Feb 15, 2024
f19b957
clean up
ramtinms Feb 15, 2024
b4c162b
Apply suggestions from code review
zhangchiqing Feb 15, 2024
ee0a058
fix types
zhangchiqing Feb 15, 2024
516f769
fix type
zhangchiqing Feb 15, 2024
5aac71f
init metrics
zhangchiqing Feb 15, 2024
363ea37
add utility for testing
ramtinms Feb 15, 2024
0410a36
Merge branch 'master' into khalil/1908-fix-gossipsub-integration-test
kc1116 Feb 16, 2024
509c776
Merge branch 'master' into gregor/evm/direct-call
devbugging Feb 16, 2024
699ec35
Merge branch 'master' into gregor/evm/selfdestruct-test
devbugging Feb 16, 2024
45b42ef
update test contract with destroy
Feb 16, 2024
c564f7d
remove unneeded contract
Feb 16, 2024
09140a7
update test
Feb 16, 2024
88adf05
update doc
zhangchiqing Feb 16, 2024
631d5b4
Merge branch 'master' into gregor/evm/selfdestruct-test
franklywatson Feb 16, 2024
63215f0
Merge branch 'master' into petera/refactor-access-connection-cache
franklywatson Feb 17, 2024
951658c
Merge branch 'master' into gregor/evm/selfdestruct-test
franklywatson Feb 17, 2024
d235884
Merge branch 'master' into gregor/evm/selfdestruct-test
franklywatson Feb 17, 2024
753a377
Merge branch 'master' into gregor/evm/selfdestruct-test
franklywatson Feb 18, 2024
36e80b5
Merge branch 'master' into ramtin/5268-add-control-over-outcome-of-ex…
ramtinms Feb 18, 2024
fad07b8
small fixes
ramtinms Feb 19, 2024
b8194f9
updates go mod
thep2p Feb 20, 2024
d4ccbac
tidy
thep2p Feb 20, 2024
7f99493
lint fix
thep2p Feb 20, 2024
4aeb4a5
Merge branch 'master' into ramtin/5197-part4-improvemetns-to-COA-proo…
ramtinms Feb 20, 2024
35b625b
panic on backend error
ramtinms Feb 20, 2024
cf4b8fd
Merge branch 'master' into petera/refactor-access-connection-cache
peterargue Feb 20, 2024
cda4b92
Merge remote-tracking branch 'origin/master' into yahya/upgrades-libp…
thep2p Feb 20, 2024
ce4a46f
tidy
thep2p Feb 20, 2024
2ecdea7
tidy
thep2p Feb 20, 2024
1a7122d
improve contract and add comments
turbolent Feb 20, 2024
8802a6a
upgrades insecure libp2p
thep2p Feb 20, 2024
18c07de
tidy
thep2p Feb 20, 2024
031e165
improve variable kind and naming
turbolent Feb 20, 2024
0c29411
Merge branch 'master' into gregor/evm/direct-call
ramtinms Feb 20, 2024
47f0f6e
hot fix
ramtinms Feb 20, 2024
6a37c5d
remvoes bitswap
thep2p Feb 20, 2024
5ccc2ca
replaces go-bitswap
thep2p Feb 20, 2024
98c9518
tidy
thep2p Feb 20, 2024
48df683
update tests
ramtinms Feb 20, 2024
45c8289
Apply suggestions from code review
ramtinms Feb 20, 2024
33fae92
fix test
ramtinms Feb 20, 2024
53ff9d6
overrides libp2p
thep2p Feb 20, 2024
2ff69ae
Merge pull request #5334 from onflow/petera/refactor-access-connectio…
peterargue Feb 20, 2024
a260653
Merge pull request #5395 from onflow/leo/add-checkpoint-size-metrics
zhangchiqing Feb 20, 2024
a28c9b2
skips test
thep2p Feb 20, 2024
f4e2214
Merge branch 'master' into yahya/upgrades-libp2p-v0.32
thep2p Feb 20, 2024
5340029
Merge branch 'master' into gregor/evm/direct-call
ramtinms Feb 20, 2024
abafbf3
Merge branch 'master' into ramtin/5268-add-control-over-outcome-of-ex…
ramtinms Feb 20, 2024
eba8055
Merge branch 'master' into ramtin/5197-part4-improvemetns-to-COA-proo…
ramtinms Feb 20, 2024
53dc73e
Merge pull request #5369 from onflow/gregor/evm/direct-call
ramtinms Feb 20, 2024
146f909
Merge branch 'master' into gregor/evm/selfdestruct-test
ramtinms Feb 20, 2024
8260fa6
update chain IDs
ramtinms Feb 20, 2024
dbad6e7
fix test
ramtinms Feb 20, 2024
163716d
update chain IDs
ramtinms Feb 20, 2024
d0ce88a
Merge branch 'master' into gregor/evm/selfdestruct-test
ramtinms Feb 20, 2024
fe5935a
Merge branch 'master' into ramtin/5197-part4-improvemetns-to-COA-proo…
ramtinms Feb 20, 2024
62edc2a
Merge branch 'master' into ramtin/5268-add-control-over-outcome-of-ex…
ramtinms Feb 20, 2024
c323118
update tests
ramtinms Feb 20, 2024
c760cb7
Update network/p2p/node/resourceManager_test.go
thep2p Feb 21, 2024
1b4a686
Merge branch 'master' into yahya/upgrades-libp2p-v0.32
thep2p Feb 21, 2024
fce3336
Merge pull request #5273 from onflow/gregor/evm/selfdestruct-test
ramtinms Feb 21, 2024
fa7d1ca
Merge branch 'master' into yahya/upgrades-libp2p-v0.32
thep2p Feb 21, 2024
2c04908
Merge branch 'master' into ramtin/5197-part4-improvemetns-to-COA-proo…
ramtinms Feb 21, 2024
2cd0f2f
Merge branch 'master' into ramtin/5268-add-control-over-outcome-of-ex…
ramtinms Feb 21, 2024
785bb74
Merge branch 'master' into ramtin/flow-evm-update-chain-ids
ramtinms Feb 21, 2024
c461c92
Merge branch 'master' into khalil/1908-fix-gossipsub-integration-test
kc1116 Feb 21, 2024
e13a684
Update scoring_test.go
kc1116 Feb 21, 2024
57b5376
Merge pull request #5323 from onflow/khalil/1908-fix-gossipsub-integr…
kc1116 Feb 21, 2024
29d9f60
Merge branch 'master' into ramtin/5268-add-control-over-outcome-of-ex…
franklywatson Feb 21, 2024
6dd7e81
Merge branch 'master' into ramtin/5197-part4-improvemetns-to-COA-proo…
ramtinms Feb 21, 2024
f5341d5
Merge branch 'master' into ramtin/flow-evm-update-chain-ids
ramtinms Feb 21, 2024
66eef9f
Merge pull request #5417 from onflow/yahya/upgrades-libp2p-v0.32
thep2p Feb 21, 2024
8b5e92e
Merge branch 'master' into ramtin/5197-part4-improvemetns-to-COA-proo…
ramtinms Feb 21, 2024
a838f69
Merge branch 'master' into ramtin/5268-add-control-over-outcome-of-ex…
ramtinms Feb 21, 2024
b687021
Merge branch 'master' into ramtin/flow-evm-update-chain-ids
ramtinms Feb 21, 2024
aa7161b
Merge pull request #5379 from onflow/ramtin/5197-part4-improvemetns-t…
ramtinms Feb 21, 2024
3522174
Merge branch 'master' into ramtin/update-stable-cadence-12
ramtinms Feb 21, 2024
b0185cd
Merge branch 'master' into ramtin/flow-evm-update-chain-ids
ramtinms Feb 21, 2024
f6e3e16
Merge branch 'master' into ramtin/5268-add-control-over-outcome-of-ex…
ramtinms Feb 21, 2024
84e22a4
Merge pull request #5397 from onflow/ramtin/5268-add-control-over-out…
ramtinms Feb 21, 2024
8afb152
Merge branch 'master' into ramtin/flow-evm-update-chain-ids
ramtinms Feb 21, 2024
27793f4
Merge pull request #5421 from onflow/ramtin/flow-evm-update-chain-ids
ramtinms Feb 21, 2024
3d0b84f
Merge branch 'master' into ramtin/update-stable-cadence-12
ramtinms Feb 21, 2024
b57bd2e
Merge branch 'feature/stable-cadence' into ramtin/update-stable-caden…
ramtinms Feb 21, 2024
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
add tests for hash and tx
  • Loading branch information
Gregor Gololicic committed Feb 9, 2024
commit ea8b59f10e2f85f4a0943386054600e7aae2ddc3
40 changes: 31 additions & 9 deletions fvm/evm/types/call_test.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,39 @@
package types

import "testing"
import (
"math/big"
"testing"

func TestDirectCall_Hash(t *testing.T) {
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

func TestDirectCall(t *testing.T) {
dc := &DirectCall{
Type: 0,
SubType: 0,
From: Address{},
To: Address{},
Data: nil,
Value: nil,
GasLimit: 0,
Type: DirectCallTxType,
SubType: DepositCallSubType,
From: Address{0x1, 0x2},
To: Address{0x3, 0x4},
Data: []byte{0xf, 0xa, 0xb},
Value: big.NewInt(5),
GasLimit: 100,
}

t.Run("calculate hash", func(t *testing.T) {
h, err := dc.Hash()
require.NoError(t, err)
assert.Equal(t, "0xe28ff08eca95608646d765e3007b3710f7f2a8ac5e297431da1962c33487e7b6", h.Hex())
})

t.Run("construct transaction", func(t *testing.T) {
tx := dc.Transaction()
h, err := dc.Hash()
require.NoError(t, err)
assert.Equal(t, dc.Value, tx.Value())
assert.Equal(t, dc.To.ToCommon(), *tx.To())
assert.Equal(t, h, tx.Hash())
assert.Equal(t, dc.GasLimit, tx.Gas())
assert.Equal(t, dc.Data, tx.Data())
assert.Equal(t, uint64(0), tx.Nonce()) // no nonce exists for direct call
})
}
Loading