Domino Valdano
69b4383528
eth/filters, ethereum: EIP-234 add blockHash param for eth_getLogs
2024-03-14 11:52:42 +08:00
Banana-J
bbd7d00068
fix: missing validation in unpacklog ( #416 )
...
Co-authored-by: wjrjerome <wjrjerome@babylonchain.io>
2024-02-11 20:32:44 +11:00
Banana-J
3e0deddfaa
fix: missing length validaiton after doing regex ( #415 )
...
Co-authored-by: wjrjerome <wjrjerome@babylonchain.io>
2024-02-05 21:43:04 +11:00
Wanwiset Peerapatanapokin
aaa246f60e
PDF-01 ( #397 )
...
* replace deprecated ioutil lib calls
* fix for FileInfo type required
* fix for ioutil.Discard
* fix .Discard
* fix for go-bindata generated files
2024-01-19 15:05:03 +04:00
Daniel Liu
05ad748307
change MinGasPrice in function Call
2023-10-16 11:24:47 +08:00
Liam Lai
5623ce8de0
merge from master
2023-07-30 16:50:45 +10:00
Daniel Liu
42379f530f
internal/ethapi: EstimateGas and Call handle revert error( #173 ) ( #200 )
...
hot fix for EstimateGas and Call handle revert error https://github.com/XinFinOrg/XDPoSChain/issues/173
2022-10-27 17:25:25 +08:00
Jianrong
4addb69561
generate and verify timeout message
2021-12-30 11:00:20 +11:00
Jianrong
0eb2504db3
Add 1 test for adaptor to switch from v1 to v2
2021-10-17 11:20:57 +11:00
Jianrong
ce106abffe
fix tests related to consensus
2021-10-10 22:05:32 +11:00
olumuyiwadad
cf18ceba33
Merge branch 'forking-incident-fix' of https://github.com/hash-laboratories-au/XDPoSChain into hash-laboratories-au-forking-incident-fix
2021-09-23 17:01:19 +05:30
olumuyiwadad
b5abbfed79
new EVM Upgrade
...
- Solidity Upgraded up to v0.8.0
- Fixed and Added eth_chainId
- Fix error in TransactionRecipet
- Reward halving issue fixed
2021-09-21 16:53:46 +05:30
olumuyiwadad
571c41f891
FIx Bad block error.
2021-09-17 17:59:06 +05:30
Jianrong
9efb89dffb
fix simulator functions to choose between XDC faker and eth faker
2021-08-30 14:56:14 +10:00
Jianrong
fa2b341c9a
resolving broken eth tests
2021-08-29 17:14:10 +10:00
Jianrong
7b7e34ae00
Fix XDC forking incident with tests
2021-08-29 14:20:01 +10:00
dev-vadim
dbe8c9d984
upgrade XDC.Network with v1.8.27.
2020-12-23 16:32:06 +05:30
diglspacedavid
474cc37036
upgrade codebase with ethereum:v1.8.13
2020-11-23 13:40:30 +05:30
Guillaume Ballet
115b1c38ac
accounts/abi: Add tests for reflection ahead of refactor ( #18434 )
2019-01-15 16:45:52 +01:00
Guillaume Ballet
38cce9ac33
accounts/abi: Extra slice tests ( #18424 )
...
Co-authored-by: weimumu <934657014@qq.com>
2019-01-10 16:27:54 +01:00
gary rong
7ca40306af
accounts/abi: tuple support ( #18406 )
2019-01-10 09:59:37 +01:00
Dragan Milic
27913dd226
accounts/abi/bind: add optional block number for calls ( #17942 )
2019-01-03 12:54:24 +01:00
Guillaume Ballet
9bfd0b60cc
accounts/abi: fix case of generated java functions ( #18372 )
2019-01-02 10:22:10 +01:00
AnilChinchawale
51e6d8d9f8
Fixed issue simulated & messages | File Modified
2018-12-31 23:30:03 +05:30
Matt K
a4af734328
accounts/abi: change unpacking of abi fields w/ underscores ( #16513 )
...
* accounts/abi: fix name styling when unpacking abi fields w/ underscores
ABI fields with underscores that are being unpacked
into structs expect structs with following form:
int_one -> Int_one
whereas in abigen the generated structs are camelcased
int_one -> IntOne
so updated the unpack method to expect camelcased structs as well.
2018-12-29 11:32:58 +01:00
weimumu
735343430d
fix string array unpack bug in accounts/abi ( #18364 )
2018-12-28 08:43:55 +01:00
Jeff Prestes
335760bf06
accounts/abi: Brings out the msg defined at require statement in SC function ( #17328 )
2018-12-22 11:39:08 +01:00
bas-vk
7df52e324c
accounts/abi: add support for unpacking returned bytesN arrays ( #15242 )
2018-12-22 11:26:49 +01:00
weimumu
3ad73443c7
fix slice unpack bug in accounts/abi ( #18321 )
...
* fix slice unpack bug in accounts/abi
2018-12-17 09:50:52 +01:00
tzapu
e79821cabe
accounts/abi: argument type and name were reversed ( #17947 )
...
argument type and name were reversed
2018-12-13 15:12:19 +01:00
Vedhavyas Singareddi
92639b676a
Add packing for dynamic array and slice types ( #18051 )
...
* added tests for new abi encoding features (#4 )
* added tests from bytes32[][] and string[]
* added offset to other types
* formatting
* Abi/dynamic types (#5 )
* Revert "Abi/dynamic types (#5 )" (#6 )
This reverts commit dabca31d79 .
* Abi/dynamic types (#7 )
* some cleanup
* Apply suggestions from code review
apply suggestions
Co-Authored-By: vedhavyas <vedhavyas.singareddi@gmail.com>
* added better formatting (#8 )
* review chnages
* better comments
2018-12-04 15:27:55 +01:00
parmmarrushabh
2677b33b78
new blocksigner contract
2018-10-23 11:29:46 +05:30
MestryOmkar
dceb579b68
bugfix: unexpected pre node
2018-10-21 17:18:36 +05:30
Jeremy Schlatter
5ed3960b9b
accounts/abi/bind: stop using goimports in the binding generator ( #17768 )
2018-10-05 22:24:54 +02:00
Martin Holst Swende
96fd50be10
accounts/abi: fix panic in MethodById lookup. Fixes #17797 ( #17798 )
2018-10-01 14:17:36 +02:00
CDsigma
a5aaab2f22
accounts/abi/bind/backends: fix typo ( #17749 )
2018-09-28 22:47:46 +02:00
gary rong
d6254f827b
all: protect self-mined block during reorg ( #17656 )
2018-09-20 15:09:30 +03:00
Martin Holst Swende
16bc8741bf
abi, signer: fix nil dereference in #17633 ( #17653 )
...
* abi,signer: fix nil dereference in #17633
* signer/core: tiny typo fix in test error message
2018-09-19 12:07:53 +03:00
Diep Pham
42bd67bd6f
accounts/abi: fix unpacking of negative int256 ( #17583 )
2018-09-04 17:53:28 +02:00
Wenbiao Zheng
d1aa605f1e
all: remove the duplicate 'the' in annotations ( #17509 )
2018-08-27 11:49:29 +03:00
Jeff Prestes
212bba47ff
backends: configurable gas limit to allow testing large contracts ( #17358 )
...
* backends: increase gaslimit in order to allow tests of large contracts
* backends: increase gaslimit in order to allow tests of large contracts
* backends: increase gaslimit in order to allow tests of large contracts
2018-08-15 10:15:42 +03:00
Péter Szilágyi
21c059b67e
Merge pull request #16734 from reductionista/eip234
...
eth/filters, interfaces: EIP-234 Add blockHash option to eth_getLogs
2018-07-24 12:52:16 +03:00
Roc Yu
040dd5bd5d
accounts/abi: refactor Method#Sig() to use index in range iterator directly ( #17198 )
2018-07-19 11:42:47 +03:00
Péter Szilágyi
e1f1d3085c
accounts, eth, les: blockhash based filtering on all code paths
2018-07-12 18:16:54 +03:00
Wenbiao Zheng
61a5976368
accounts: remove deadcode isSigned ( #16990 )
2018-06-20 11:46:29 +02:00
Péter Szilágyi
49719e21bc
core, eth: minor txpool event cleanups
2018-05-18 12:08:24 +03:00
rjl493456442
a2e43d28d0
all: collate new transaction events together
2018-05-18 11:46:44 +03:00
Guillaume Ballet
247b5f0369
accounts/abi: allow abi: tags when unpacking structs
...
Go code users can now tag event struct members with `abi:` to specify in what fields the event will be de-serialized.
See PR #16648 for details.
2018-05-14 14:47:31 +02:00
gary rong
7beccb29be
all: get rid of error when creating memory database ( #16716 )
...
* all: get rid of error when create mdb
* core: clean up variables definition
* all: inline mdb definition
2018-05-09 15:24:25 +03:00
Péter Szilágyi
6cf0ab38bd
core/rawdb: separate raw database access to own package ( #16666 )
2018-05-07 14:35:06 +03:00
kiel barry
c1ea527573
accounts: golint updates for this or self warning ( #16627 )
2018-05-02 11:17:52 +03:00
Ricardo Domingos
6ab9f0a19f
accounts/abi: improve test coverage ( #16044 )
2018-04-04 13:42:36 +02:00
Martin Holst Swende
933972d139
Merge pull request #16256 from epiclabs-io/unpack_one_arg_event
...
Fix issue unmarshaling single parameter events from abigen generated go code #16208
2018-03-21 10:11:37 +01:00
Martin Holst Swende
faed47b3c5
Merge pull request #15990 from markya0616/sim_backend_block_hash
...
accounts/abi, core: add AddTxWithChain in BlockGen for simulation
2018-03-19 08:29:54 +01:00
Mark
cddb529d70
accounts/abi: normalize method name to a camel-case string ( #15976 )
2018-03-07 14:34:53 +02:00
Javier Peletier
60a999f238
accounts/abi: Modified unpackAtomic to accept struct lvalues
2018-03-05 16:01:40 +01:00
Javier Peletier
13b566e06e
accounts/abi: Add one-parameter event test case from enriquefynn/unpack_one_arg_event
2018-03-05 16:00:03 +01:00
protolambda
0b814d32f8
accounts/abi: Abi binding support for nested arrays, fixes #15648 , including nested array unpack fix ( #15676 )
...
* accounts/abi/bind: support for multi-dim arrays
Also:
- reduce usage of regexes a bit.
- fix minor Java syntax problems
Fixes #15648
* accounts/abi/bind: Add some more documentation
* accounts/abi/bind: Improve code readability
* accounts/abi: bugfix for unpacking nested arrays
The code previously assumed the arrays/slices were always 1 level
deep. While the packing supports nested arrays (!!!).
The current code for unpacking doesn't return the "consumed" length, so
this fix had to work around that by calculating it (i.e. packing and
getting resulting length) after the unpacking of the array element.
It's far from ideal, but unpacking behaviour is fixed now.
* accounts/abi: Fix unpacking of nested arrays
Removed the temporary workaround of packing to calculate size, which was
incorrect for slice-like types anyway.
Full size of nested arrays is used now.
* accounts/abi: deeply nested array unpack test
Test unpacking of an array nested more than one level.
* accounts/abi: Add deeply nested array pack test
Same as the deep nested array unpack test, but the other way around.
* accounts/abi/bind: deeply nested arrays bind test
Test the usage of bindings that were generated
for methods with multi-dimensional (and not
just a single extra dimension, like foo[2][3])
array arguments and returns.
edit: trigger rebuild, CI failed to fetch linter module.
* accounts/abi/bind: improve array binding
wrapArray uses a regex now, and arrayBindingJava is improved.
* accounts/abi: Improve naming of element size func
The full step size for unpacking an array
is now retrieved with "getFullElemSize".
* accounts/abi: support nested nested array args
Previously, the code only considered the outer-size of the array,
ignoring the size of the contents. This was fine for most types,
but nested arrays are packed directly into it, and count towards
the total size. This resulted in arguments following a nested
array to replicate some of the binary contents of the array.
The fix: for arrays, calculate their complete contents size:
count the arg.Type.Elem.Size when Elem is an Array, and
repeat when their child is an array too, etc.
The count is the number of 32 byte elements, similar to how it
previously counted, but nested.
* accounts/abi: Test deep nested arr multi-arguments
Arguments with a deeply nested array should not cause the next arguments
to be read from the wrong position.
2018-03-04 23:24:17 +01:00
Péter Szilágyi
5cf1d35470
eth, les, light: filter on logs only, derive receipts on demand
2018-02-22 19:12:43 +02:00
Martin Holst Swende
61f2279bde
abi: fix missing method on go 1.7/1.8
2018-02-21 12:27:50 +01:00
Martin Holst Swende
bd6ed23899
accounts/abi: harden unpacking against malicious input
2018-02-21 12:27:50 +01:00
Martin Holst Swende
08c5d4dd27
accounts/abi: address review concerns
2018-02-21 12:27:50 +01:00
Martin Holst Swende
f0f594d045
accounts/abi: Deduplicate code in unpacker
2018-02-21 12:27:50 +01:00
Martin Holst Swende
1ede68355d
accounts/abi: add another unpack interface
2018-02-21 12:27:50 +01:00
Fynn
1e72271f57
accounts/abi: use unpackTuple to unpack event arguments
...
Events with just 1 argument fail before this change
2018-02-16 11:46:25 +01:00
Felix Lange
a5c0bbb4f4
all: update license information ( #16089 )
2018-02-14 13:49:11 +01:00
Péter Szilágyi
55599ee95d
core, trie: intermediate mempool between trie and database ( #15857 )
...
This commit reduces database I/O by not writing every state trie to disk.
2018-02-05 17:40:32 +01:00
mark.lin
c1d70ea970
accounts/abi, core: add AddTxWithChain in BlockGen for simulation
2018-01-29 18:47:08 +08:00
Péter Szilágyi
1bf508b449
accounts/abi/bind: support event filtering in abigen
2018-01-24 10:54:13 +02:00
Péter Szilágyi
6f69cdd109
all: switch gas limits from big.Int to uint64
2018-01-03 14:45:35 +02:00
Furkan KAMACI
b8caba9709
various: remove redundant parentheses ( #15793 )
2018-01-03 14:14:47 +02:00
Péter Szilágyi
b9731767af
accounts/abi: handle named ouputs prefixed with underscores ( #15766 )
...
* accounts/abi: handle named ouputs prefixed with underscores
* accounts/abi: handle collinding outputs for struct unpacks
* accounts: handle purely underscore output names
2017-12-29 23:20:02 +02:00
Martin Holst Swende
9d187f0238
Merge pull request #15731 from holiman/revamp_abi
...
accounts/abi refactor
2017-12-22 20:59:41 +01:00
Martin Holst Swende
c095c87e11
accounts/abi: merging of https://github.com/ethereum/go-ethereum/pull/15452 + lookup by id
2017-12-22 19:26:57 +01:00
Martin Holst Swende
73d4a57d47
acounts/abi: refactor abi, generalize abi pack/unpack to Arguments
2017-12-22 19:26:52 +01:00
gary rong
5f8888e116
accounts, consensus, core, eth: make chain maker consensus agnostic ( #15497 )
...
* accounts, consensus, core, eth: make chain maker consensus agnostic
* consensus, core: move CalcDifficulty to Engine interface
* consensus: add docs for calcDifficulty function
* consensus, core: minor comment fixups
2017-12-22 14:37:50 +02:00
Robert Zaremba
81d4cafb32
accounts/abi: add unpack into array test
2017-12-21 15:14:50 +01:00
Robert Zaremba
1afca33eac
accounts/abi: add Method Unpack tests
...
+ Reworked Method Unpack tests into more readable components
+ Added Method Unpack into slice test
2017-12-21 15:14:50 +01:00
Robert Zaremba
95461e8b22
accounts/abi: satisfy most of the linter warnings
...
+ adding missing comments
+ small cleanups which won't significantly change
function body.
+ unify Method receiver name
2017-12-21 15:14:50 +01:00
Robert Zaremba
0ed8b838a9
accounts/abi: fix event unpack into slice
...
+ The event slice unpacker doesn't correctly extract element from the
slice. The indexed arguments are not ignored as they should be
(the data offset should not include the indexed arguments).
+ The `Elem()` call in the slice unpack doesn't work.
The Slice related tests fails because of that.
+ the check in the loop are suboptimal and have been extracted
out of the loop.
+ extracted common code from event and method tupleUnpack
2017-12-21 15:14:50 +01:00
Robert Zaremba
9becba5540
accounts/abi: fix event tupleUnpack
...
Event.tupleUnpack doesn't handle correctly Indexed arguments,
hence it can't unpack an event with indexed arguments.
2017-12-21 15:14:50 +01:00
Robert Zaremba
3511904aad
accounts/abi: adding event unpacker tests
2017-12-21 15:14:50 +01:00
Martin Holst Swende
b0d41e386e
Merge pull request #15285 from yondonfu/abi-offset-fixed-arrays
...
accounts/abi: include fixed array size in offset for dynamic type
2017-12-21 14:42:03 +01:00
Bob Glickstein
e21aa0fda3
accounts/abi: remove check for len%32==0 when unpacking events ( #15670 )
...
This change inlines the logic of bytesAreProper at its sole
callsite, ABI.Unpack, and applies the multiple-of-32 test only in
the case of unpacking methods. Event data is not required to be a
multiple of 32 bytes long.
2017-12-21 10:59:14 +01:00
Dmitry Shulyak
da58afcea0
accounts/abi: update array length after parsing array ( #15618 )
...
Fixes #15617
2017-12-20 15:09:23 +01:00
Yondon Fu
cf7aba36c8
accounts/abi: update array type check in method.go. Add more packing tests
2017-12-18 21:16:25 -05:00
Yondon Fu
3857cdc267
Merge branch 'master' into abi-offset-fixed-arrays
2017-12-18 17:17:41 -05:00
Zach
3da1bf8ca1
all: use gometalinter.v2, fix new gosimple issues ( #15650 )
2017-12-12 19:05:47 +01:00
gary rong
984c25ac40
accounts, internal: fail if no suitable estimated gas found ( #15477 )
...
* accounts, internal: return an error if no suitable estimated gas found
* accounts, internal: minor polishes on the gas estimator
2017-11-14 18:26:31 +02:00
ferhat elmas
86f6568f66
build: enable unconvert linter ( #15456 )
...
* build: enable unconvert linter
- fixes #15453
- update code base for failing cases
* cmd/puppeth: replace syscall.Stdin with os.Stdin.Fd() for unconvert linter
2017-11-10 19:06:45 +02:00
ferhat elmas
9619a61024
all: gofmt -w -s ( #15419 )
2017-11-08 11:45:52 +01:00
Péter Szilágyi
6d6a5a9337
cmd, consensus, core, miner: instatx clique for --dev ( #15323 )
...
* cmd, consensus, core, miner: instatx clique for --dev
* cmd, consensus, clique: support configurable --dev block times
* cmd, core: allow --dev to use persistent storage too
2017-10-24 13:40:42 +03:00
RJ Catalano
dec8bba9d4
accounts/abi: improve type handling, add event support ( #14743 )
2017-10-17 13:07:08 +02:00
Yondon Fu
a5330fe0c5
accounts/abi: include fixed array size in offset for dynamic type
2017-10-12 10:58:53 -04:00
rjl493456442
94903d572b
internal, accounts, eth: utilize vm failed flag to help gas estimation
2017-10-02 15:26:40 +03:00
Dave Appleton
019dca9ba2
accounts/abi/backends: add AdjustTime ( #15077 )
2017-09-15 15:20:29 +02:00
nkbai
5ba9225fe3
accounts/abi/bind: pass non-empty directory when calling goimports ( #15070 )
2017-09-07 23:34:45 +02:00
rjl493456442
28aea46ac0
core: implement Metropolis EIP 658, receipt status byte
2017-08-22 18:35:17 +03:00
Miya Chen
bf1e263128
core, light: send chain events using event.Feed ( #14865 )
2017-08-18 12:58:36 +02:00
Leo Shklovskii
3a678a15c9
cmd/abigen: update generated go file header text ( #14845 )
...
As per https://golang.org/s/generatedcode . This will allow other tools
such as golint to properly ignore the files.
2017-07-24 14:09:03 +02:00