c5cc0ee969
run mypy locally, bump mypy to 1.10.0, fix new errors
2024-07-04 13:19:00 -06:00
a3f8db3ecd
async-exit-stack was for pre-py37, just import from contextlib now
2024-05-27 12:40:23 -06:00
d9b92635c1
drop async-service dep and copy relevant code into a local async_service
...
tool, updated for modern handling of ExceptionGroup
2024-05-27 12:14:36 -06:00
c770a05d23
rebuild protobufs adding ECC_P256 to KeyType
2024-04-27 12:17:54 -06:00
827d16b106
import asynccontextmanager from context lib and remove async_generator dep
2024-04-27 10:12:39 -06:00
8dda7b933e
turn mypy checks back on, fix some errors
2024-04-27 10:12:39 -06:00
383ffcb12c
fixed noise_state returns bytearray where we want bytes, add slow to pytest markers
2024-03-09 11:02:22 -07:00
ee4e9c4645
rename libp2p test dir and rebuild protobufs
2024-03-02 11:10:05 -07:00
94483714a3
run lint and fix errors, except mypy
2024-02-19 16:05:58 -07:00
42605c0288
merge template updates and refill vars
2024-02-19 14:49:30 -07:00
0a9f8d23a3
Update ed25519.py
...
Don't hash data passed to nacl library in Ed25519PublicKey.verify
2021-03-16 08:55:44 +01:00
080f8edc8e
Use trio.lowlevel instead of trio.hazmat
...
Since trio 0.15.0, hazmat has been deprecated.
trio-typing and mypy are bumped to support newer trio and each other.
2021-02-23 22:02:34 +07:00
36a4a9150d
Interop tests updated and fixed.
2020-08-25 15:59:22 -06:00
857cc29d27
add content-addressed message id utility
2020-02-28 08:25:03 -08:00
ef666267bd
Allow Pubsub creator to supply a custom msg_id
2020-02-28 08:25:03 -08:00
1af12ddf43
interop test: support both noise and plaintext
2020-02-28 15:50:03 +08:00
cb4e1115c6
Remove wrong encoding
2020-02-28 15:50:03 +08:00
c1f6054b3c
plaintext: update pb
2020-02-28 15:50:03 +08:00
728d9e5c9c
Noise: update pb
2020-02-28 15:50:02 +08:00
f8240bd2cb
plaintext: use varint msg read/writer
2020-02-28 15:50:02 +08:00
6016ea731b
BaseMsgReadWriter
...
- Change `BaseMsgReadWriter` to encode/decode messages with abstract
method, which can be implemented by the subclasses. This allows us to
create subclasses `FixedSizeLenMsgReadWriter` and
`VarIntLenMsgReadWriter`.
2020-02-28 15:50:01 +08:00
a9f4f285ee
Noise: clean up dup code
2020-02-28 15:50:01 +08:00
13e8f496a7
Noise: add noise option in the factories and tests
2020-02-28 15:50:01 +08:00
1d2a976597
Remove TODOs
2020-02-28 15:50:00 +08:00
48a7c1a969
Security: ensure remote pubkeys are stored
2020-02-28 15:50:00 +08:00
f0df2d189f
Plaintext: use existing msgio reader
2020-02-28 15:49:59 +08:00
3c2e835725
Security: SecureSession
...
Make security sessions(secio, noise) share the same implementation
`BaseSession` to avoid duplicate implementation of buffered read.
2020-02-28 15:49:59 +08:00
2df47a943c
Refactor
2020-02-28 15:49:59 +08:00
874c6bbca4
Refactor MsgIOReadWriter
...
- Abstract it as `MsgReadWriter`
- `MsgIOReadWriter` as a subclass of `MsgReadWriter`
2020-02-28 15:49:58 +08:00
ea645f0bd6
Copied read/write from secio
2020-02-28 15:49:58 +08:00
f8739268e2
Noise: encrypt and decrypt in NoiseConnection
...
TODO: Add a buffer to read only `n` bytes in `read(n)`
2020-02-28 15:49:58 +08:00
6ea96e9313
Add comments in pattern xx
2020-02-28 15:49:57 +08:00
d0290d2b5a
Noise: complete handshake process
...
TODO
- Figure out why `state.rs` is erased at some moment(even handshake
is not done).
- Refactor
- Add tests
2020-02-28 15:49:56 +08:00
8a4ebd4cbb
Support read/write of noise msg and payload
2020-02-28 15:49:56 +08:00
95959725db
Noise pattern: Fix flake8
2020-02-15 12:18:19 +08:00
d7fabab3e1
Noise: add compiled pb2.py
2020-02-09 13:23:12 +08:00
0324a69841
Noise: add PatternXX
2020-02-09 00:33:26 +08:00
f27db83a14
Noise: add TODO comments
2020-02-08 10:48:29 +08:00
fb53edbc04
Change async def write
...
To return `None` instead of `int. `Writer.write` *does* write all data
in all use case.
2020-02-08 10:24:37 +08:00
1152f9b703
Update libp2p/security/noise/transport.py
...
Co-Authored-By: Alex Stokes <r.alex.stokes@gmail.com >
2020-02-08 10:14:35 +08:00
897e66b7e1
Add the skeletons of noise transport and conn
2020-02-07 17:47:50 +08:00
f1dbd52d67
Merge branch 'master' into feature/trio
2020-02-06 10:39:54 +08:00
ddbedc6c15
Pubsub: handle_talk
...
- Change from async function to sync
- Change the name to `notify_subscriptions`, which is clearer.
2020-02-05 21:44:33 +08:00
5b03a7ad9f
Mplex: only close the send of new stream channel
2020-02-05 21:41:28 +08:00
b7c2ec2187
Mplex: change the reference url
...
To the commit hash, to make it more correct.
2020-02-05 21:31:04 +08:00
7f8c0f11f6
Pubsub: change channel size
...
To `32` to conform to the go implementation.
2020-02-05 21:30:26 +08:00
ba0fb8a833
Fix: use pass over ...(Ellipse)
...
Use `...`(Ellipse) only in abstract methods.
2020-02-05 20:36:42 +08:00
1fff6ad6b4
Mplex: change message channel size to 8
...
To avoid infinity sized channel, and to conform to the go
implementation.
2020-02-05 20:31:18 +08:00
64c9c48dac
Mplex: change new stream channel size
...
To `0`, i.e. no unbuffered, to avoid growing buffer size.
2020-02-05 19:48:02 +08:00
996b5cf15d
Mplex: catch exceptions from channel.send
2020-02-05 17:05:30 +08:00