Commit graph

222 commits

Author SHA1 Message Date
Daniel Liu
95f8abb765 crypto/bn256: fix staticcheck warning SA9009: ineffectual compiler directive 2024-10-30 21:10:45 +08:00
Daniel Liu
c6e4e880ea all: fix staticcheck warning SA4006: never used value 2024-10-24 17:37:19 +08:00
JukLee0ira
47d27fed3b all: replace uses of ioutil with io and os (#24869) 2024-09-27 15:14:17 +08:00
Daniel Liu
4f9501f12c common, crypto: move fuzzers out of core (#22029) 2024-09-22 19:25:37 +08:00
JukLee0ira
2d89951e5b all: use errrors.New instead of empty fmt.Errorf 2024-06-14 19:19:21 +08:00
Daniel Liu
01e1728a94 all: add support for EIP-2718, EIP-2930 transactions (#21502) 2024-05-14 23:15:35 +08:00
Daniel Liu
48f9bbed50 core: types: less allocations when hashing and tx handling (#21265) 2024-05-13 22:07:03 +08:00
JukLee0ira
d6737b69e6 rpc:remove package ethereum/go-ethereum 2024-05-13 19:51:50 +08:00
Wanwiset Peerapatanapokin
30581274a1
RIN-08 RIN-10 RIN-11 Fix curve issues (#425)
* update secp256k1 library from go-eth code

* cast deprecated functions to use new BitCurve type

* add IsOnCurve checks and tests

* add test outcome check
2024-02-11 01:51:11 +04:00
Liam
513114dacf
Merge pull request #398 from XinFinOrg/XDC-01
XDC-01 | Potential Missed Fixings in `crypto` Module
2024-01-22 14:53:49 +08: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
uji
d4b98063e8 crypto/bn256/cloudflare: fix asm for dynamic linking (#24476)
When using -buildmode=shared, R15 is clobbered by a global variable
access; use a different register instead.

Fixes: #24439
2024-01-18 21:59:02 +08:00
Guillaume Ballet
af8c4d4e85 crypto/cloudflare/bn256: fix in-place addition and unmarshalling (#23419) 2024-01-18 21:58:12 +08:00
Martin Holst Swende
3a6e26b844 crypto/bn256: improve bn256 fuzzer (#21815)
* crypto/cloudflare: fix nil deref in random G1/G2 reading

* crypto/bn256: improve fuzzer

* crypto/bn256: fix some flaws in fuzzer
2024-01-18 21:57:31 +08:00
Antoine Rondelet
c48e9873f3 crypto/bn256/cloudflare: checks for nil pointers in Marshal functions (#19609)
* Added checks for nil pointers in Marshal functions

* Set nil pointer to identity in GT before marshaling
2024-01-18 21:57:04 +08:00
Abd ar-Rahman Hamidi
3d635c544e crypto/secp256k1: add checking z sign in affineFromJacobian (#18419)
The z == 0 check is hit whenever we Add two points with the same x1/x2
coordinate. crypto/elliptic uses the same check in their affineFromJacobian
function. This change does not affect block processing or tx signature verification
in any way, because it does not use the Add or Double methods.
2024-01-18 21:56:28 +08:00
Wanwiset Peerapatanapokin
060d9ce26f
mac arm build fix ref: https://github.com/cloudflare/bn256/pull/4 (#278)
Co-authored-by: Wanwiset Peerapatanapokin <wanwiset25@gmail.com>
2023-06-12 23:46:55 +10:00
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
2d92ccb59b fix all XDC&ETH tests and enable it in CI 2021-08-25 23:51:42 +10:00
Jianrong
0fdab2027c add linting as the first CI task 2021-08-07 14:27:08 +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
AnilChinchawale
a638d2adc0 Minor error fixed. 2019-03-16 16:02:10 +05:30
AnilChinchawale
153c8ef49d File Updated | transaction & constants 2019-03-14 15:58:42 +05:30
AnilChinchawale
6d1685646f Updated secp256k1 2019-03-12 15:55:49 +05:30
AnilChinchawale
d2722ff048 Swarm MakeFile updated 2019-02-12 04:53:39 +05:30
AnilChinchawale
29cb1de084 backend added with latest code 2019-01-28 04:50:18 +05:30
AnilChinchawale
1b725d89f5 docker file pdated for bootnode 2019-01-23 04:43:21 +05:30
AnilChinchawale
069d42a1c1 Changes updated 2019-01-19 04:43:29 +05:30
AnilChinchawale
1694577888 Test added for secp256k1 2019-01-19 04:42:06 +05:30
AnilChinchawale
e3bd171e0d lib added for cloudflare 2019-01-19 04:41:44 +05:30
AnilChinchawale
58141d1edb Added latest crypto_google 2019-01-19 04:41:18 +05:30
Dave McGregor
33d233d3e1
vendor, crypto, swarm: switch over to upstream sha3 package 2019-01-04 09:26:07 +02:00
Shuai Qi
e57e4571d3 crypto/secp256k1: Fix invalid document link (#18297) 2018-12-13 10:25:13 +01:00
parmarrushabh
dd0f27ebeb add go1.11, remove go1.9 2018-11-06 12:33:45 +05:30
Martin Holst Swende
89a32451ae core/vm: faster create/create2 (#17806)
* core/vm/runtim: benchmark create/create2

* core/vm: do less hashing in CREATE2

* core/vm: avoid storing jumpdest analysis for initcode

* core/vm: avoid unneccesary lookups, remove unused fields

* core/vm: go formatting tests

* core/vm: save jumpdest analysis locally

* core/vm: use common.Hash instead of nil, fix review comments

* core/vm: removed type destinations

* core/vm: correct check for empty hash

* eth: more elegant api_tracer

* core/vm: address review concerns
2018-10-04 18:15:37 +03:00
Liang ZOU
6663e5da10 all: fix various comment typos (#17748) 2018-09-25 12:26:35 +02:00
Payne
1d9d3815e5 crypto/secp256k1: remove useless code (#17728)
`(void)data;` may cause link error on Windows.
2018-09-21 21:42:02 +02:00
Wenbiao Zheng
d1aa605f1e all: remove the duplicate 'the' in annotations (#17509) 2018-08-27 11:49:29 +03:00
Péter Szilágyi
a6d45a5d00
crypto/bn256: add missing license file, release wrapper in BSD-3 2018-08-20 18:05:06 +03:00
Péter Szilágyi
3e21adc648
crypto/bn256: fix issues caused by Go 1.11 2018-08-16 11:02:16 +03:00
gary rong
e0e0e53401 crypto: change formula for create2 (#17393) 2018-08-14 18:30:42 +03:00
Péter Szilágyi
d9575e92fc crypto/secp256k1: remove external LGPL dependencies (#17239) 2018-07-26 13:33:13 +02:00
gary rong
cab1cff11c core, crypto, params: implement CREATE2 evm instrction (#17196)
* core, crypto, params: implement CREATE2 evm instrction

* core/vm: add opcode to string mapping

* core: remove past fork checking

* core, crypto: use option2 to generate new address
2018-07-24 17:22:03 +03:00
Péter Szilágyi
afd8b84706 crypto/secp256k1: unify the package license to 3-Clause BSD (#17225)
Our original wrapper code had two parts. One taken from a third
party repository (who took it from upstream Go) licensed under
BSD-3. The second written by Jeff, Felix and Gustav, licensed
under LGPL. This made this package problematic to use from the
outside.

With the agreement of the original copyright holders, this commit
changes the license of the LGPL portions of the code to BSD-3:

---
I agree changing from LGPL to a BSD style license.

Jeff
---
Hey guys,

My preference would be to relicense to GNUBL, but I'm also OK with BSD.

Cheers,
Gustav
---
Felix Lange (fjl):
I would approve anything that makes our licensing less complicated
---
2018-07-24 02:47:47 +02:00
Felix Lange
0255951587 crypto: replace ToECDSAPub with error-checking func UnmarshalPubkey (#16932)
ToECDSAPub was unsafe because it returned a non-nil key with nil X, Y in
case of invalid input. This change replaces ToECDSAPub with
UnmarshalPubkey across the codebase.
2018-06-12 15:26:08 +02:00
kiel barry
ba975dc093 crypto: fix golint warnings (#16710) 2018-05-09 01:17:09 +02:00
thomasmodeneis
ba1030b6b8 build: enable goimports and varcheck linters (#16446) 2018-04-18 00:53:50 +02:00
David Huie
d1af4e1a9e crypto/secp256k1: catch curve parameter parse errors (#16392) 2018-04-03 17:12:00 +02:00