Commit Graph

238 Commits

Author SHA1 Message Date
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
Etan Kissling ab6455321c
keep the internal count helper 2024-01-08 09:24:04 +07:00
Etan Kissling b40a8aaa69
remove unused `skip0xPrefix`
`skip0xPrefix` is no longer used since #108 where its usage was replaced
with `stew/byteutils`' hexToSeqByte`.
2024-01-08 09:24:04 +07:00
jangko 23b333eb51
Add tests of json rpc marshalled types 2024-01-07 22:02:45 +07:00
jangko ef317bc846
Migrate to json-serialization 2024-01-07 17:23:00 +07:00
jangko be1bb307dc
Reduce compiler warnings when using Nim v2 2024-01-02 09:33:15 +07:00
Will 23c06ca6d2
Bugfix/nully values (#61)
* 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

* v0.2.4

* Fix test

---------

Co-authored-by: jangko <jangko128@gmail.com>
2023-12-14 06:56:54 +07:00
Eugene Kabanov 195c8c60b4
Fix send() transaction to be working again with EIP-155. (#105)
* Fix send() transaction to be working again with EIP-155.
Add tests.
---------

Co-authored-by: jangko <jangko128@gmail.com>
2023-12-13 13:23:31 +07:00
Yuriy Glukhov 45d09b29d2
Refactoring, contract dsl wasm compatibility, encode/decode fixes. (#108)
* Refactoring, contract dsl wasm compatibility, fixes in encoding/decoding.

* Tests

* Fixed Nim 1.* compatibility

* Some backward compatibility

* Minor tweaks, and a safety check

* Update web3/encoding.nim

Co-authored-by: Jacek Sieka <arnetheduck@gmail.com>

* Update web3.nim

Co-authored-by: Jacek Sieka <arnetheduck@gmail.com>

* Use stew.assign instead of reinventing the wheel

* Fixed string decoder. Removed extra allocations.

* Added test for string decoder

* v0.2.2

---------

Co-authored-by: Jacek Sieka <arnetheduck@gmail.com>
Co-authored-by: jangko <jangko128@gmail.com>
2023-12-13 12:26:04 +07:00
jangko df0af1aca6
Fix versionedHashes to blobVersionedHashes of TxObj 2023-12-12 18:15:47 +07:00
jangko dcabb8f29e
v0.2.0: Revamp data types 2023-12-12 12:15:34 +07:00
tersec 428b931e7c
rm web3_consensus_const_preset (#107) 2023-10-19 05:40:19 +00:00