Skip to content
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

PoC8 Networking Integration #292

Merged
merged 53 commits into from
Feb 13, 2015
Merged

Conversation

fjl
Copy link
Contributor

@fjl fjl commented Feb 5, 2015

This integrates #275 (Discovery Protocol) and #271 (P2P Crypto) with the p2p stack.
This is still being worked on, submitting for feedback.

@fjl
Copy link
Contributor Author

fjl commented Feb 5, 2015

Rebased to develop.

@obscuren obscuren changed the title [WIP] PoC8 Networking Integration PoC8 Networking Integration Feb 5, 2015
zelig added 22 commits February 6, 2015 00:00
- 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
- add session token check and fallback to shared secret in responder call too
- use explicit length for the types of new messages
- fix typo resp[resLen-1] = tokenFlag
- 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
fjl added 4 commits February 13, 2015 11:39
I have verified that UPnP and NAT-PMP work against an older version of
the MiniUPnP daemon running on pfSense. This code is kind of hard to
test automatically.
This deletes the old NAT implementation.
@fjl
Copy link
Contributor Author

fjl commented Feb 13, 2015

NAT integration has landed. @obscuren please test this with your UPnP-enabled router.

fjl added 7 commits February 13, 2015 14:44
There are now two deadlines, frameReadTimeout and payloadReadTimeout.

The frame timeout is longer and allows for connections that are idle.
The message timeout is still short and ensures that we don't get stuck
in the middle of a message.
The deflect logic called Disconnect on the peer, but the peer never ran
and wouldn't process the disconnect request.
addPeer doesn't allow self connects, but we can avoid opening
connections in the first place.
udp.Table was assigned after the readLoop started, so
packets could arrive and be processed before the Table was there.
For compatibility with cpp-ethereum
@obscuren obscuren merged commit 32a9c0c into ethereum:develop Feb 13, 2015
@fjl fjl deleted the poc8-net-integration branch May 29, 2015 23:40
ngtuna pushed a commit to ngtuna/tomochain that referenced this pull request Nov 21, 2018
…ify_header_when_insert_block_from_fetcher

reduce duplicate verify Header when insert block from fetcher
Zergity added a commit to Zergity/go-ethereum that referenced this pull request Apr 28, 2020
Config and params for the next hardfork
maoueh pushed a commit to streamingfast/go-ethereum that referenced this pull request Aug 13, 2021
…oEstimateGas from geth (ethereum#276)

* fix: add nil check when estimating gas to avoid panic during contract creation

* fix: revert DoEstimateGas changes introduced as a temp fix in ethereum#22

* Tweak fudge factor for Geth gas estimation (ethereum#292)

* experimenting with gas fudge factor

* fix formatting

* try using 1m gas constant

* Add log statement for the gas estimate

* Add more detail to gas estimate log

* one more log edit

* Try new formula

* Bump base gas

* Even more base gas

* even more

* Just 1m?

* one more time

* Final cleanup

* Minor fix

* Update internal/ethapi/api.go

* don't use cap-1

* Make sure data is not nil

Co-authored-by: Karl Floersch <karl@karlfloersch.com>

Co-authored-by: Ben Jones <ben@pseudonym.party>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: Karl Floersch <karl@karlfloersch.com>
weiihann pushed a commit to weiihann/go-ethereum that referenced this pull request Nov 30, 2023
maoueh pushed a commit to streamingfast/go-ethereum that referenced this pull request Mar 29, 2024
Postfix duplicate solidity function bindings with 4 byte signature
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
add standbynodes in GetMasternodesByNumber similar way to subnet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants