-
Notifications
You must be signed in to change notification settings - Fork 20.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RLPx p2p crypto layer (work in progress, do not merge) #271
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- correct sizes for the blocks : sec signature 65, ecies sklen 16, keylength 32 - added allocation to Xor (should be optimized later) - no pubkey reader needed, just do with copy - restructuring now into INITIATE, RESPOND, COMPLETE -> newSession initialises the encryption/authentication layer - crypto identity can be part of client identity, some initialisation when server created
…secp256k1-go panics
- abstract the entire handshake logic in cryptoId.Run() taking session-relevant parameters - changes in peer to accomodate how the encryption layer would be switched on - modify arguments of handshake components - fixed test getting the wrong pubkey but it till crashes on DH in newSession()
- set proper public key serialisation length in pubLen = 64 - reset all sizes and offsets - rename from DER to S (we are not using DER encoding) - add remoteInitRandomPubKey as return value to respondToHandshake - add ImportPublicKey with error return to read both EC golang.elliptic style 65 byte encoding and 64 byte one - add ExportPublicKey falling back to go-ethereum/crypto.FromECDSAPub() chopping off the first byte - add Import - Export tests - all tests pass
…ince this is directly copied in the auth message
- add const length params for handshake messages - add length check to fail early - add debug logs to help interop testing (!ABSOLUTELY SHOULD BE DELETED LATER) - wrap connection read/writes in error check - add cryptoReady channel in peer to signal when secure session setup is finished - wait for cryptoReady or timeout in TestPeersHandshake
This was referenced Jan 30, 2015
Closed
This is now part of #292. |
acud
pushed a commit
to acud/go-ethereum
that referenced
this pull request
Mar 3, 2018
…e-encryption New encryption package
ngtuna
added a commit
to ngtuna/tomochain
that referenced
this pull request
Nov 12, 2018
…saction_in_queue limit max threshold nonce in queue
Zergity
added a commit
to Zergity/go-ethereum
that referenced
this pull request
Apr 28, 2020
VDF and delayer improvement
tanishqjasoria
pushed a commit
to tanishqjasoria/go-ethereum
that referenced
this pull request
Oct 31, 2023
* add l1 config in genesis config (ethereum#249) * add l1 config in genesis config * fix lint * Update params/config.go Co-authored-by: Péter Garamvölgyi <[email protected]> --------- Co-authored-by: Péter Garamvölgyi <[email protected]> * extend node configuration (ethereum#251) * extend node configuration * use block number instead of hash * accept safe, finalized and numbers for L1Confirmations * fix typos --------- Co-authored-by: Péter Garamvölgyi <[email protected]> Co-authored-by: Péter Garamvölgyi <[email protected]> * Fix/improve node config parsing (ethereum#260) * raise error on failed parsing * default value * add l1-message-type, transaction methods (ethereum#252) * add l1-message-type, transaction methods * goimports * Update core/types/transaction.go Co-authored-by: Péter Garamvölgyi <[email protected]> * txpool l1 check, pointer change, marhsal test * draft: start implementing l1message gas behavior * draft: start implementing l1message gas behavior * change to gas usage * error comment typo Co-authored-by: Haichen Shen <[email protected]> * goimports * update nonce, add hash test (fails), marshal test * goimports * target addr cant be nil * change call msg * comment out test * lint --------- Co-authored-by: Péter Garamvölgyi <[email protected]> Co-authored-by: Haichen Shen <[email protected]> * Add L1 message database (ethereum#255) * add l1-message-type, transaction methods * goimports * Update core/types/transaction.go Co-authored-by: Péter Garamvölgyi <[email protected]> * add L1 message store to rawdb * remove comments * rename to l1_message * rename variables and add comments * write l1 msgs in a batch * add more comments * update tests * allow batched and non-batched writes * rename to accessors_l1_message * handle error * add range check * fix tests * update comments * nit * support blocks with 0 l1 messages --------- Co-authored-by: Max Wolff <[email protected]> Co-authored-by: Max Wolff <[email protected]> * Fix L1Message Deep Copy, Complete Bridge Tx Hash test (ethereum#269) * deep copy value field, add tx hash test comment * typo * Rename nonce to queueindex, increment sender nonce on L1 message execution (ethereum#271) * change nonce to queueindex, increment nonce on L1 message * fix db acccessors * Update core/types/transaction_marshalling.go Co-authored-by: Péter Garamvölgyi <[email protected]> --------- Co-authored-by: Péter Garamvölgyi <[email protected]> * Fix db inspect command (ethereum#276) fix db inspect command * Add l1 sync service (ethereum#256) * extend node configuration * add l1-message-type, transaction methods * goimports * Update core/types/transaction.go Co-authored-by: Péter Garamvölgyi <[email protected]> * use block number instead of hash * accept safe, finalized and numbers for L1Confirmations * add L1 message store to rawdb * remove comments * fix typos * add L1 message sync service * use l1 contract address and chain ID * use L1DeploymentBlock * add confirmation config * move bridge client to separate file * use uint64 block number * fix bigint comparison * rename constants * add more logs * rename to l1_message * rename variables and add comments * write l1 msgs in a batch * add more comments * update tests * allow batched and non-batched writes * rename to accessors_l1_message * handle error * check if config is provided * improve sync service DB batched writes * add range check * fix tests * update comments * nit * fix flush range and improve comments * solve circular dependency * update stress tests * initialize l1 client for geth * start sync service * add more comments * check nil correctly * address comments * fix merge * fix genesis l1config deserialization * add sync progress logs * initial sync * handle leveldb not found error * use errors.Is * address comments * update DefaultPollInterval --------- Co-authored-by: Nazarii Denha <[email protected]> Co-authored-by: Max Wolff <[email protected]> Co-authored-by: Max Wolff <[email protected]> * Add L1 message validation (ethereum#272) * add L1 message validation * add comments and better error handling * handle leveldb not found error * update incorrect condition for genesis block * typo * change inclusion index logic * disable L1 message check for legacy tests * set NumL1MessagesPerBlock to 0 in tests * update default genesis config * Add L1 msg validation tests (ethereum#303) add L1 msg validation tests * Update miner include l1 messages (ethereum#265) * add l1-message-type, transaction methods * goimports * Update core/types/transaction.go Co-authored-by: Péter Garamvölgyi <[email protected]> * add L1 message store to rawdb * add L1 message sync service * remove comments * use l1 contract address and chain ID * extend node configuration * use block number instead of hash * accept safe, finalized and numbers for L1Confirmations * fix typos * use L1DeploymentBlock * add confirmation config * move bridge client to separate file * use uint64 block number * fix bigint comparison * rename constants * add more logs * Fix/improve node config parsing (ethereum#260) * raise error on failed parsing * default value * rename to l1_message * rename variables and add comments * write l1 msgs in a batch * add more comments * update tests * allow batched and non-batched writes * rename to accessors_l1_message * handle error * check if config is provided * improve sync service DB batched writes * include l1 messages in blocks: part 1 * add l1-message-type, transaction methods (ethereum#252) * add l1-message-type, transaction methods * goimports * Update core/types/transaction.go Co-authored-by: Péter Garamvölgyi <[email protected]> * txpool l1 check, pointer change, marhsal test * draft: start implementing l1message gas behavior * draft: start implementing l1message gas behavior * change to gas usage * error comment typo Co-authored-by: Haichen Shen <[email protected]> * goimports * update nonce, add hash test (fails), marshal test * goimports * target addr cant be nil * change call msg * comment out test * lint --------- Co-authored-by: Péter Garamvölgyi <[email protected]> Co-authored-by: Haichen Shen <[email protected]> * Add L1 message database (ethereum#255) * add l1-message-type, transaction methods * goimports * Update core/types/transaction.go Co-authored-by: Péter Garamvölgyi <[email protected]> * add L1 message store to rawdb * remove comments * rename to l1_message * rename variables and add comments * write l1 msgs in a batch * add more comments * update tests * allow batched and non-batched writes * rename to accessors_l1_message * handle error * add range check * fix tests * update comments * nit * support blocks with 0 l1 messages --------- Co-authored-by: Max Wolff <[email protected]> Co-authored-by: Max Wolff <[email protected]> * build(docker): auto docker push when pushing git tags (ethereum#258) * build(docker): update docker trigger tag prefix (ethereum#259) * Fix L1Message Deep Copy, Complete Bridge Tx Hash test (ethereum#269) * deep copy value field, add tx hash test comment * typo * commitl1messages * lint * Revert "add L1 message sync service" This reverts commit 5305e8a. * Revert "move bridge client to separate file" This reverts commit 0b220be. * update branch * use commitMessages for l1Txs * little fix * fix config * fix test * comment fixes * fix * fix config check --------- Co-authored-by: Max Wolff <[email protected]> Co-authored-by: Max Wolff <[email protected]> Co-authored-by: Péter Garamvölgyi <[email protected]> Co-authored-by: Péter Garamvölgyi <[email protected]> Co-authored-by: Haichen Shen <[email protected]> Co-authored-by: HAOYUatHZ <[email protected]> * Add ErrUnknownAncestor tests (ethereum#305) add ErrUnknownAncestor tests * worker test include l1 msgs (ethereum#306) * worker test include l1 msgs * move L1 message index update next to block insertion --------- Co-authored-by: Péter Garamvölgyi <[email protected]> * exclude l1 messages from transaction count limit in block (ethereum#307) * exclude l1 messages from transaction count limit in block * fix comments * trigger ci * nit --------- Co-authored-by: Péter Garamvölgyi <[email protected]> Co-authored-by: Péter Garamvölgyi <[email protected]> * Expose queueIndex on Transaction (ethereum#316) expose queueIndex on Transaction * test that l1msg doesn't count in maxTxPerBlock limit (ethereum#312) * test that l1msg doesn't count in maxTxPerBlock limit * fix, comment * retrigger ci * change order inside test --------- Co-authored-by: HAOYUatHZ <[email protected]> Co-authored-by: Péter Garamvölgyi <[email protected]> * reuse trace nonce field for queueIndex * expose scroll APIs on the geth console * add L1 message query APIs * Trigger new block on new l1 messages (ethereum#343) * trigger new block on new l1 messages * typo * initialize l1MsgCh * fix worker l1msg tests (ethereum#345) --------- Co-authored-by: Nazarii Denha <[email protected]> * test(worker): ensure that l1 messages are included in the correct order (ethereum#346) test that l1msgs added in correct order * rename enqueueIndex --> queueIndex * move QueueIndex into transaction * improve l1 db interface * formatting * bump version * print l1config * add API to query latest included message queue index * clean up tx limit logic * add clarifying comments and todos to ValidateL1Messages * improve db comments and logs * clean up L1MessageTx type handling * format * format * improve L1 message block check * fix missing L1 event handling * fix TestL1MessageValidationFailure * simplify sync height resume logic * make l1Config.l1MessageQueueAddress non-pointer * improve command line flags * remove todo * use abigen tools for log filtering * cache block L1 message count * nit: fix variable name case * improve logs * flush pending writes to DB before shutdown --------- Co-authored-by: Nazarii Denha <[email protected]> Co-authored-by: Max Wolff <[email protected]> Co-authored-by: Haichen Shen <[email protected]> Co-authored-by: Max Wolff <[email protected]> Co-authored-by: HAOYUatHZ <[email protected]> Co-authored-by: HAOYUatHZ <[email protected]>
sduchesneau
pushed a commit
to streamingfast/go-ethereum
that referenced
this pull request
Jan 4, 2024
…ject Revert "core/state: mark account as dirty when resetObject occurs"
maoueh
pushed a commit
to streamingfast/go-ethereum
that referenced
this pull request
Apr 29, 2024
…stry Update dependency on superchain-registry
luanxu-mxc
pushed a commit
to MXCzkEVM/mxc-geth
that referenced
this pull request
Sep 2, 2024
s1na
pushed a commit
to s1na/go-ethereum
that referenced
this pull request
Dec 2, 2024
* fix panic during rollback * eth/hooks: check nil stateDB to fix issue ethereum#271 * internal/ethapi: fix eth_call crash * all: check nil statedb * eth: check nil block for tracer api * internal/ethapi: check nil header and block
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
implements the RLPx devp2p crypto spec
reworked version of #262