Commit Graph

249 Commits

Author SHA1 Message Date
Jacek Sieka 6c837492aa
disambiguate new eth types 2024-09-27 17:38:17 +02:00
andri lim 0cc03e67dd
Add Prague (EIP-7685, 6110, 7002, 7251, and 7702) fields (#160)
* Add Prague (EIP-7685, 6110, 7002, 7251, and 7702) fields

* Add EIP-7702 authorizationList field to TransactionArgs
2024-09-13 11:17:30 +07:00
tersec 3ba859d8f1
align WithdrawalRequestV1 with EIP-7002 and consensus spec (#158) 2024-07-01 12:01:00 +00:00
andri lim 914b9ff5a1
Update execution_types with latest engine_api_type changes (#156) 2024-06-18 22:34:27 +07:00
tersec fc226d4511
add JSON-RPC conversion 2024-06-18 03:24:11 +00:00
tersec eb17493295
update Pectra execution API types (#155) 2024-06-17 11:28:06 +00:00
andri lim b705f81643
Replace std.Option with results.Opt (#153) 2024-06-12 06:32:06 +07:00
Yuriy Glukhov 954c23cca2
Respect chainId from TransactionArgs when signing (#152) 2024-06-10 15:14:14 +07:00
jangko ac93b9a993
Add engine_getClientVersionV1 and ClientVersionV1 2024-05-28 12:39:36 +07:00
Yuriy Glukhov 46b4b4c8bc
Fixed encoding of (multidimentional) dynamic arrays (#149)
* Fixed encoding of (multidimentional) dynamic arrays

* Added reference link
2024-05-21 09:41:15 +07:00
andri lim 3cb2a77e1b
CI do not install openssl on macos+nim devel anymore (#150) 2024-05-21 00:11:29 +07:00
tersec 9aed14a737
rename depositReceipts/exits to depositRequests/withdrawalRequests 2024-05-16 00:19:37 +00:00
tersec 5610e21dcd
rename ExitV1 to WithdrawalRequestV1 (#147) 2024-05-15 04:12:34 +03:00
Etan Kissling a00b28a0ce
Use correct type for blob transactions (#148)
`eth_sendRawTransaction` uses a `PooledTransaction` not `Transaction`.
2024-05-14 22:52:11 +03:00
Etan Kissling de87f86087
Allow multiple blobs in `eth_sendTransaction` (#146)
An individual EIP-4844 transaction can refer to multiple blobs.
2024-05-06 22:38:42 +02:00
Etan Kissling 290acb6e62
bump `execution-apis` to `v1.0.0-beta.4` (#145)
- https://github.com/ethereum/execution-apis/releases/tag/v1.0.0-beta.4

This was already partially applied, the following commits were missing:

- update the doc of eth_getBalance to put block as required parameters
- schemas/filter: fixup some bugs in null filter topics and address
- tests: regenerate tests with new rpctestgen chain
- tests: add forkenv.json for hive
- tests: add headfcu.json
- tests: add comments in tests
- Specify Client Versions on Engine API
- Add eth_blobBaseFee; add blobs to eth_feeHistory
- Added engine_getPayloadV4 and engine_newPayloadV4 for Prague
- Update receipt.yaml to title instead of name
- Move EIP-6110 to Prague
- Add EIP-7251 to Prague
- engine: rename for 7002 partial withdrawals and 7685 requests
2024-04-25 18:38:51 +00:00
jangko 9620fee53f
Change some FeeHistoryResult field types from Quantity to UInt256 2024-04-15 17:20:33 +07:00
andri lim a31bc63448
Add baseFeePerBlobGas and blobGasUsedRatio fields to FeeHistoryResult (#143)
Also add eth_blobBaseFee call signature
2024-04-03 21:04:36 +07:00
andri lim 9e370474fb
Add newPayload4 and getPayload4 convenience API (#142) 2024-03-28 07:13:52 +07:00
andri lim e049d14855
Add ExecutionPayloadV4 and GetPayloadV4Response to execution_types functions (#141) 2024-03-27 22:59:33 +07:00
tersec 85e34e8ab2
add Prague engine API support types (#140) 2024-03-27 04:24:31 +00:00
andri lim 4d80530dd5
Fix execution types conversion functions (#139) 2024-03-26 07:08:04 +07:00
andri lim 285d97c2b0
Unify EthCall/EthSend into TransactionArgs (#138)
* Unify EthCall/EthSend into TransactionArgs

* Add isEIP4844 of TransactionArgs
2024-03-20 11:12:59 +07:00
Etan Kissling 80c7aa6de2
make `BlockNumber` `distinct` (#137)
The `writeValue` added for `BlockNumber` in #136 interferes with other
`uint64` because `BlockNumber` is not `distinct`. Marking it `distinct`
avoids polluting global serialization logic.
2024-03-17 00:04:38 +01:00
Kim De Mey 428c46c94f
Add writeValue for BlockNumber (#136)
As it is also possible to use directly BlockNumber instead of the
RtBlockIdentifier in the eth_api.
2024-03-15 09:05:24 +01:00
jangko 747001250a
Add optional yParity field to TransactionObject
The test is already included in previous commit of
test_execution_api fix. I separate the commit to let
users of this library aware of this changes.

This changes is also needed in eth hive test of rpc compat simulator.
2024-02-29 17:51:43 +07:00
jangko c016e58488
Remove error field from AccessListResult 2024-02-29 17:51:42 +07:00
tersec 15325bd844
test refc in CI in Nim 2.0 and later (#134) 2024-02-17 02:09:58 +00:00
tersec d0d9a0c286
use non-EOL macOS version and fix spelling (#133) 2024-02-16 04:10:23 +00:00
andri lim 10538c667a
Replace eth_getBlockReceipts return type with Opt[T] instead of Optio… (#131)
* Replace eth_getBlockReceipts return type with Opt[T] instead of Option[T]

reason:
Option[T] failed to compile when using nim v2
it is related to ref object. But also hard to reproduce outside
combination of nim-json-serialization + nim-json-rpc + something

* Add note about nim v2 regression

* Add test case of eth_getBlockReceipts usage
2024-02-14 18:40:57 +07:00
Etan Kissling a67213af4f
re-add support for `fromBlock`, `toBlock`, `blockHash` in `eth_getLogs` (#130)
In #108 a regression got introduced, resulting in `fromBlock`, `toBlock`
and `blockHash` no longer being sent when a client calls `eth_getLogs`.
This may break the deposits import process in `nimbus-eth2`, resulting
in messages such as:

```
ERR 2024-02-06 19:52:34.474+01:00 The Eth1 chain is not synced               ourDepositsCount=0 targetDepositsCount=403
```

Fixing the regression restores successful import messages:

```
INF 2024-02-06 22:12:14.863+01:00 Eth1 sync progress                         topics="elmon" blockNumber=1349452 depositsProcessed=3
```
2024-02-06 21:26:20 +00:00
jangko d3dbcabc52
v0.3.2 2024-02-04 14:50:47 +07:00
jangko 3f121fe98d
Upgrade github actions to v4 2024-01-27 17:03:20 +07:00
andri lim baff215937
Reduce compiler warnings (#127)
* Reduce compiler warnings

* Fix test_null_conversion

* Fix regression because of json-rpc too smart when handling null value
2024-01-24 14:37:32 +07:00
Etan Kissling ce47cde31c
Synchronize order of `blobGasUsed` / `excessBlobGas` in test (#126)
`blobGasUsed` is listed before `excessBlobGas`. Adjusting the test to
use the same field order to make it easier to review (consistency).
No semantic changes.
2024-01-16 22:02:15 +01:00
jangko c595e0d6c8
Fix Quantity reader and writer 2024-01-14 15:11:31 +07:00
jangko 4ab592bddb
Fix SingleOrList parser 2024-01-13 22:21:54 +07:00
jangko 744b4e2dc3
Fix RtBlockIdentifier parser 2024-01-13 19:06:07 +07:00
jangko dffeb1244a
Use correct return type for eth_syncing 2024-01-13 15:39:07 +07:00
jangko bf1ce869b5
v0.3.0 2024-01-11 21:22:31 +07:00
Will 85b3567d94
Feature/execution api spec (#69)
* Fix problem with contract out of assets

* Add nully value json test

* Fix bug with passing null to a few functions

* Typesafe U256 parsing

* Update readme for the web3 to include runner info

* Cleanup commits

Strip out unused JSON

Update comment

Remove echo

Added DynamicBytes test

More correct naming

Remove one extra double check

* Add specific object tests

* Ensure we cover different status types

* Add header comments

* Cleanup

* Add more tests

* Cleanup

* Revert docs

* Nimpretty file

* Fix issue in base stew

* Add tests

* Sorting

* Work on tests

* Move items to the correct location

* Add TODO

* Add all test executables

* Work on generating tests

* Push latest execution API changes

* Work on eth_call test

* Fix source type

* Latest

* Add many more tests

* Add more tests

* Revert "from" to "source"

* Try fix types

* Split to types which fail and those which dont

* Cleanup

* Remove whispher types again

* re-remove whisper

* Add more eth_api signature

* Readding executions-apis submodule

* Disable test_execution_api

* Nitpick

* add handlers

* Add last line to handler

* Some handler pass

* Finally all tests pass

* Add the test to all_tests

* Consisten style

* Turn on submodule downloading in CI

* Temporary workaround of get eth_getBlockReceipts for nim 2.0

---------

Co-authored-by: jangko <jangko128@gmail.com>
2024-01-11 21:02:42 +07:00
jangko 6c27c9744e
Simplify generic constraint of rpc and chronicles encoders 2024-01-11 16:58:50 +07:00
andri lim 5cf54d98b3
Share encoder between json-rpc and chronicles (#119) 2024-01-11 06:15:48 +07:00
Yuriy Glukhov eea0344679 More flexibility to contract DSL, Async contract caller 2024-01-09 14:57:29 +01:00
Yuriy Glukhov be20b57dc0 Fixed source->from field of EthCall 2024-01-08 20:11:20 +01:00
Yuriy Glukhov edf785d424 Added string encoding 2024-01-08 14:58:29 +01:00
Yuriy Glukhov 98fb3aa2a1 Fixed compilation error in exec function 2024-01-08 14:58:18 +01:00
Yuriy Glukhov 09ce974cab Contract constructor support 2024-01-08 14:57:09 +01:00
jangko 36ff4bbca3
Event handler passing around JsonString instead of JsonNode 2024-01-08 13:09:23 +07:00
jangko a0cdfcede6
Resolve contract_dsl ambiguity 2024-01-08 10:38:10 +07:00