Commit Graph

4204 Commits

Author SHA1 Message Date
draoi
1dcd31ee3a chore: update hosts.rs TODOs 2024-04-13 13:46:55 +02:00
draoi
efe2d57c4e net-test: add assert 2024-04-13 13:46:55 +02:00
draoi
e3c69b0fcc chore: delete unused code comment from message_subscriber.rs 2024-04-13 13:46:55 +02:00
draoi
9aea678125 outbound_session: replace TODO with NOTE 2024-04-13 13:46:55 +02:00
draoi
c0f9920d0a doc: remove deceptive comment on session/mod.rs 2024-04-13 13:46:55 +02:00
draoi
92cbca047e outbound_session: just do seed next time if peer discovery waiting for addrs times out 2024-04-13 13:46:55 +02:00
draoi
740a539bfd channel+protocol_version: add Option<VersionMessage> into Channel
When we receive a version message from a node we are connected
to, update to Some(VersionMessage).
2024-04-13 13:46:55 +02:00
draoi
61e51b33d0 lilith+net: move whitelist_refinery back into lilith + create new public functions
we expose some methods that allow uses of the P2P interface, such as
lilith, to interact with the hostlist in a safe way.
2024-04-11 11:30:42 +02:00
draoi
7ad0792976 net: make self_handshake_interval a configurable Setting 2024-04-11 11:30:42 +02:00
draoi
2055820a9a hosts: fix visibility
Our new visibility policy is as follows:

1. All methods that write to the hostlist or otherwise modify states
   are restricted to the net crate, or are completely private to hosts
   when possible.

2. Read methods that do not modify the hostlist and associated states
   are public, unless it's an internal function that will never be used
   by apps.
2024-04-10 12:11:20 +02:00
draoi
5b02abf032 lilith: move whitelist_refinery() into session::refine_sesssion()
This allows us to avoid making a lot of Hosts functions public that
should rather be private to the net module.
2024-04-10 12:11:20 +02:00
draoi
38dcac45b5 p2p: remove more unused artifacts 2024-04-10 12:11:20 +02:00
draoi
2b46488e09 doc: add missing docstrings to net/outbound_session 2024-04-10 12:11:20 +02:00
draoi
06c64b06aa doc: upgrade some NOTE comments to docstrings 2024-04-10 12:11:20 +02:00
draoi
3998b80d8f p2p: delete unused peer_discovery_running variable 2024-04-10 12:11:20 +02:00
draoi
a4c9ddcfed outbound_session: make SlotPreference enum 2024-04-10 12:11:20 +02:00
draoi
7e95c56d61 session: fix bitflags on mod.rs 2024-04-10 12:11:20 +02:00
zero
2d9f5af6b5 test-harness: update pks/vks hashes 2024-04-10 11:00:51 +02:00
zero
441150bbad contracts: adjust k values to smallest possible 2024-04-10 10:37:02 +02:00
zero
e1b259c019 zkrunner: regenerate all proof witness json files 2024-04-10 10:04:29 +02:00
parazyd
f011b02336 drk: Introduce SQL schema for Deployooor contract 2024-04-09 09:53:57 +02:00
skoupidi
4f9c104206 blockchain: replaced header tree with just its root 2024-04-08 16:36:22 +03:00
skoupidi
9f5e6aafc4 blockchain: changed block height from u64 to u32 2024-04-08 15:17:01 +03:00
skoupidi
0318720cd3 blockchain/tx_store: changed location tx_index from u64 to u16 2024-04-08 12:26:46 +03:00
skoupidi
1a0f997f28 contracts: simplyfied call index usize usage 2024-04-08 12:10:22 +03:00
parazyd
509d9bf0d4 net: Fix bitflags 2024-04-08 10:51:42 +02:00
skoupidi
d9304c15cd runtime: changed call_index from u32 to u8 2024-04-08 11:40:16 +03:00
zero
425df4c8cb hosts: fix macro calls formatting 2024-04-08 10:17:36 +02:00
zero
c2c967a673 net: p2p.stop() calls channel.stop() on all channels 2024-04-08 09:17:59 +02:00
zero
af8f1e9d20 net: remove public visibility from outbound_session::Slot, and correct broken docstring 2024-04-08 07:53:09 +02:00
draoi
225e9bbd72 chore: make clippy 2024-04-07 16:45:56 +02:00
draoi
fe0801bcf1 outbound_session: fix bug causing nodes to get stuck in peer discovery
ie. if we have gold or white connections we should try to connect to them.
2024-04-07 16:43:31 +02:00
draoi
7870d006d2 chore: cargo fmt 2024-04-07 14:36:10 +02:00
draoi
69470ff9b2 doc: fix incomplete debug statements on hosts.rs 2024-04-07 14:35:06 +02:00
draoi
182efa4b46 p2p_test: slightly more expansive testing 2024-04-07 14:35:06 +02:00
draoi
ec688f485a p2p: start refine_sesssion() before outbound_session()
we should perform self handshake as a priority since we will be sending
our addr in protocol addr
2024-04-07 14:35:06 +02:00
draoi
8a413d1c3d refine_session: reorder start(), shutdown sequence
We should start the self-handshake before the refinery, since it is
higher priority on start(). Also we should first stop the refinery
before saving the hostlist on stop().
2024-04-07 14:35:06 +02:00
draoi
b631a10629 channel: only print disconnect errors when we're on SESSION_NET
SESSION_REFINE disconnections will pass silently since they are expected
behavior.
2024-04-07 14:35:06 +02:00
dasman
214458322a add deg2 (dag_browser) code 2024-04-07 04:40:18 +03:00
draoi
2b18e5307b session: cleanup SessionBitFlags
Add an additional byte to SessionBitFlags to accommodate SESSION_REFINE
and reduce the risk of logic errors.

Additionally:

* `!SESSION_SEED & !SESSION_REFINE` is now referred to as `SESSION_DEFAULT`
* `!SESSION_REFINE` is refered to as `SESSION_NET`.
* `SESSION_ALL` has been deleted since it was conceptually out-dated
* Binaries have been updated.
2024-04-06 11:40:07 +02:00
skoupidi
9d64403407 zk/debug: properly structure feature imports 2024-04-05 15:40:47 +03:00
zero
1a1a26e396 Revert "sdk: move find_subslice() and NextTupleN from zkas into SDK util.rs"
This reverts commit dcf419b0ca.
2024-04-05 12:39:42 +02:00
skoupidi
930a511309 blockchain: major hashes cleanup 2024-04-04 22:00:51 +03:00
draoi
6b29e8c659 net: make blacklist settings more configurable + other fixes
1. Settings blacklist is now a Vec<(Url, Vec<u16>)> and if ports are left empty,
   we block all the ports of the given host.

2. We read from the settings blacklist on RefineSession::start(), and
   also move other save() and load() host functions into refine session
   since it's more logical than doing in GreylistRefinery.

3. Last but not least, we fix a really BAD BUG which would send blacklist peers to the Gold list instead of Black list when blacklisting peers in move_host() !!!
2024-04-04 13:45:39 +02:00
draoi
498a88e3b9 p2p: reorder shutdown sequence to reduce lag on CTRL-C 2024-04-04 13:45:39 +02:00
zero
dd341c156a smt: add docstrings for runtime/SDK fns 2024-04-03 19:07:40 +02:00
zero
56d5281f6c runtime: remove unused put_object_bytes() 2024-04-03 18:59:06 +02:00
zero
b42cb611c5 runtime: review and update ACL perms for fns 2024-04-03 18:57:40 +02:00
zero
cb4ef9b1fe money: fix FIXME, add (tx_hash, call_idx) now the calls exist 2024-04-03 18:20:24 +02:00
zero
e0932c5c50 deployooor: fix instruction deserialization 2024-04-03 13:53:20 +02:00