erigon-pulse/core
kilic 0921861edb core/vm, crypto/bls12381, params: add bls12-381 elliptic curve precompiles (#21018)
* crypto: add bls12-381 elliptic curve wrapper

* params: add bls12-381 precompile gas parameters

* core/vm: add bls12-381 precompiles

* core/vm: add bls12-381 precompile tests

* go.mod, go.sum: use latest bls12381 lib

* core/vm: move point encode/decode functions to base library

* crypto/bls12381: introduce bls12-381 library init function

* crypto/bls12381: import bls12381 elliptic curve implementation

* go.mod, go.sum: remove bls12-381 library

* remove unsued frobenious coeffs

supress warning for inp that used in asm

* add mappings tests for zero inputs

fix swu g2 minus z inverse constant

* crypto/bls12381: fix typo

* crypto/bls12381: better comments for bls12381 constants

* crypto/bls12381: swu, use single conditional for e2

* crypto/bls12381: utils, delete empty line

* crypto/bls12381: utils, use FromHex for string to big

* crypto/bls12381: g1, g2, strict length check for FromBytes

* crypto/bls12381: field_element, comparision changes

* crypto/bls12381: change swu, isogeny constants with hex values

* core/vm: fix point multiplication comments

* core/vm: fix multiexp gas calculation and lookup for g1 and g2

* core/vm: simpler imput length check for multiexp and pairing precompiles

* core/vm: rm empty multiexp result declarations

* crypto/bls12381: remove modulus type definition

* crypto/bls12381: use proper init function

* crypto/bls12381: get rid of new lines at fatal desciprtions

* crypto/bls12-381: fix no-adx assembly multiplication

* crypto/bls12-381: remove old config function

* crypto/bls12381: update multiplication backend

this commit changes mul backend to 6limb eip1962 backend

mul assign operations are dropped

* core/vm/contracts_tests: externalize test vectors for precompiles

* core/vm/contracts_test: externalize failure-cases for precompiles

* core/vm: linting

* go.mod: tiny up sum file

* core/vm: fix goimports linter issues

* crypto/bls12381: build tags for plain ASM or ADX implementation

Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
# Conflicts:
#	core/vm/contracts.go
#	core/vm/contracts_test.go
#	go.sum
2020-06-15 19:38:13 +03:00
..
asm core/asm: allow numbers in labels (#20362) 2019-12-03 13:55:30 +01:00
bloombits Apply Turbo-Geth modifications to go-ethereum codebase 2019-11-01 21:52:03 +01:00
forkid les, les/lespay: implement new server pool (#20758) 2020-06-15 19:38:12 +03:00
rawdb Optimize multi put (#657) 2020-06-12 18:59:06 +01:00
state Make GetAsOf work with partially missing history index (#648) 2020-06-11 07:19:15 +01:00
types Prevent slice make and copy in Pushes (#625) 2020-06-05 19:46:34 +03:00
vm core/vm, crypto/bls12381, params: add bls12-381 elliptic curve precompiles (#21018) 2020-06-15 19:38:13 +03:00
.gitignore Renamed chain => core 2014-12-04 10:28:02 +01:00
bench_test.go optimize codeBitmap (#626) 2020-06-06 21:49:06 +01:00
block_validator_test.go optimize codeBitmap (#626) 2020-06-06 21:49:06 +01:00
block_validator.go Small fixes for download and execute sync stages (#503) 2020-04-30 17:19:24 +01:00
blockchain_insert.go Apply Turbo-Geth modifications to go-ethereum codebase 2019-11-01 21:52:03 +01:00
blockchain_test.go all: fix typos in comments (#21118) 2020-06-15 19:38:13 +03:00
blockchain.go eth: interrupt chain insertion on shutdown (#21114) 2020-06-15 19:38:13 +03:00
blocks.go Apply Turbo-Geth modifications to go-ethereum codebase 2019-11-01 21:52:03 +01:00
chain_indexer.go core: add check in AddChildIndexer to avoid double lock (#20982) 2020-05-20 15:26:22 +03:00
chain_makers_test.go optimize codeBitmap (#626) 2020-06-06 21:49:06 +01:00
chain_makers.go optimize codeBitmap (#626) 2020-06-06 21:49:06 +01:00
dao_test.go optimize codeBitmap (#626) 2020-06-06 21:49:06 +01:00
error.go all: fix typos in comments (#21118) 2020-06-15 19:38:13 +03:00
events.go eth/filters: remove use of event.TypeMux for pending logs (#20312) 2020-01-30 13:36:30 +02:00
evm.go [GC] uint256 rather than big.Int in Transaction (#614) 2020-06-04 08:43:08 +01:00
gaspool.go miner: avoid unnecessary work (#15883) 2018-01-15 12:57:06 +02:00
gen_genesis_account.go Apply Turbo-Geth modifications to go-ethereum codebase 2019-11-01 21:52:03 +01:00
gen_genesis.go Apply Turbo-Geth modifications to go-ethereum codebase 2019-11-01 21:52:03 +01:00
generate_index_test.go [WIP] TxLookup stage (#646) 2020-06-10 23:07:14 +03:00
generate_index.go Re-enable TestUnwind test and fix issues in the stage sync (#659) 2020-06-13 13:39:04 +01:00
genesis_alloc.go geth 1.9.13 (#469) 2020-04-19 18:31:47 +01:00
genesis_test.go optimize codeBitmap (#626) 2020-06-06 21:49:06 +01:00
genesis.go Plain state index (#595) 2020-05-31 07:57:47 +01:00
headerchain.go post-rebase fixups 2020-05-20 15:26:22 +03:00
mkalloc.go Apply Turbo-Geth modifications to go-ethereum codebase 2019-11-01 21:52:03 +01:00
pruner_test.go [WIP] 459 merge storage account (#466) 2020-04-19 20:51:32 +01:00
pruner.go [WIP] New storage changeset encoding (#493) 2020-04-28 08:41:55 +01:00
rlp_test.go Lmdb and Badger tests (#630) 2020-06-06 11:29:11 +01:00
root.txt resolver: merge HashBuilder-s and ResolveSet-s, decouple from ResolveRequest-s (#540) 2020-05-11 05:46:07 +01:00
state_prefetcher.go optimize codeBitmap (#626) 2020-06-06 21:49:06 +01:00
state_processor.go Make GetAsOf work with partially missing history index (#648) 2020-06-11 07:19:15 +01:00
state_transition.go [GC] uint256 rather than big.Int in Transaction (#614) 2020-06-04 08:43:08 +01:00
tx_cacher.go Stages 6 and 7 for generating history indices (#569) 2020-05-23 10:19:56 +01:00
tx_journal.go Apply Turbo-Geth modifications to go-ethereum codebase 2019-11-01 21:52:03 +01:00
tx_list_test.go Apply Turbo-Geth modifications to go-ethereum codebase 2019-11-01 21:52:03 +01:00
tx_list.go [GC] uint256 rather than big.Int in Transaction (#614) 2020-06-04 08:43:08 +01:00
tx_noncer.go Remove Copy from IntraBlockState and use references instead of copies in other places. 2019-11-07 13:32:20 +01:00
tx_pool_test.go Prevent slice make and copy in Pushes (#625) 2020-06-05 19:46:34 +03:00
tx_pool.go core: collect NewTxsEvent items without holding reorg lock (#21145) 2020-06-15 19:38:13 +03:00
types.go optimize codeBitmap (#626) 2020-06-06 21:49:06 +01:00