IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
210: A round of cleanups r=koivunej a=ljedrz
Assorted drive-by cleanups and small refactorings; individual commits describe the specific changes.
Co-authored-by: ljedrz <ljedrz@gmail.com>
unshare was required as hyper was forced to require the body stream to
be Sync due to compiler issue while it was not really needed. Latest
hyper now has this workaround built-in.
does not at all pass any tests. we need to add a root path param, which
will be a string version of the requested Cid for the http api. Also,
with this, it becomes possible to hide everything (files, symlinks)
under a single walk api.
this was a curious bug: to pass the test on interface-ipfs-core we need
to be still loading the first block and we must not be on the stream
phase. apparently the http cancellation works differently depending on
whether any response headers have been sent or not as the test fails if
the headers and cancelled error is sent.
the issue of returning either an loaded raw block or possibly projected
Ipld value was solved by introducing yet another enum Loaded. I did
consider `Either` from crate either, and `Result<Box<[u8]>, Ipld>` but
the custom enum at least allows us to write a documentation story what
the alternatives represent.
not exactly sure how critical this is, but all of the thinking which was
done for "is this Stream impl ok" was based on the assumption that the
Unshared value was Send, as it was but this was never added as a bound.
Adding list to BlockStore trait and cleanup support
Adding list functionality and tests
wip dag put
Update Cargo.toml
Co-Authored-By: Joonas Koivunen <joonas.koivunen@gmail.com>
Delete config
fix: switching back to Vecs
feat: adding list functions to repo and ipfs
feat: working endpoint
fix: more sane newline adding
fix: clippy
fix: cargo fmt
wip: block.rm
cargo fmt
Delete refs.rs
Update lib.rs
Update fs.rs
Update v0.rs
Update v0.rs
Update fs.rs
Update mod.rs
Update mem.rs
Update mem.rs
WIP
fix: removing to_owned
WIP: Got it working but need to implement unshared and then clean up
WIP: Compiling, but empty results probably due to clone
fix: cargo fmt
feat: new result enums and implementation
fix: cargo fmt
wip: 5/8 passing tests, need options and cid in errors
wip: PR comments
fix: last test passing 🎉
fix: cargo fmt
fix: clippy and fmt
chore: socializing things
fix: adding support folder
fix: redundant clone
chore: move HandledErr
chore: fmt and TODO removal
fix: clippy
fix: cargo fmt and clippy
chore: moving to block/options.rs
fix: otiginal Cid
fix: tests
fix: clippy tests
the test case expected mixed cidv0 and cidv1... I didn't see it coming,
and it's quite unfortunate that we cannot support both, but at the same
time I think the end result is ok.
A lot of code but going back and forth as well.
* fix: request logger name for good
* wip: initial broilerplate
* feat: ipfspath parsing and walking
* refactor: rewrite to walk the path before streaming
* fix: handling 0 for ipld link
* wip: get first tests to pass
still need to figure out the Send + Sync + 'static bound, issue is with
Sync, which might come from the refs used, get_block(&cid)..
this required some unsafety to be able to present the Stream as Send +
Sync + 'static as required by hyper. not 100% sure if that pin_project
is ok to do, but the only interfaces exposed are callable as futures so
it shouldn't be too bad.
* feat: format string support
* add: manual RefsOptions deserialization to have multiple `arg`
* fix: resolve multiple paths
I had not originally noticed that we need to do the walk from multiple
paths.
* add: dag-pb specific ipfspath walking
* add: make IpfsPath better debuggable
* wip: adjust logging
* add: yield ipld parsing failed err's
* add: "specialize" ipld_links for dag-pb
* feat: support visiting unique nodes
* fix: instead of stopping, filter out too deep elements
also, this should be done when expanding the nodes, not at this stage.
* refactor: reorg and document
originally it was easier to write everything to the same file, but it
gets difficult to read after 1000 lines. while reorganising stuff into
more tight modules, some direct calls were changed not to be needed,
like RefsOptions creating the EdgeFormatter; the EdgeFormatter is not
created in the refs function itself.
chopped off parts:
* RefsOptions stuff to refs/options.rs
* EdgeFormatter and the string format to refs/format.rs
* Unshared to refs/unshared.rs
* HandledErr, StreamResponse to refs/support.rs
* refactor: minor cleanup and docs
* fix: refs tests, enable unique test
* fix: use specific rust-ipld version with cbor fix
the situation is not good, as it would make sense to re-export libipld
from ipfs as parts are already re-exported but with strange names.
* refactor: allow dead_code StringError::new
* refactor: use the Edge for refs-local as well
* chore: cargo fmt and reorder tests
* doc: replace fixme with confirmed
* add: port tests for ipfspath
* fix: unignore good_but_unsupported test
* add: test cases for slash dedup per discussion
* add: walk dag-cbor tests for IpfsPath
* add: dag-pb path walking test
* add: tests for walking over a cbor link
* add: test case for dapb link listing
* fix: refs_local test, move all tests under mod test
* fix: remove unwrap from refs-local
kept the return value as a stream. it'll at least save us the trouble of
concatenating all of the values into a big vector.
Adding list to BlockStore trait and cleanup support
Adding list functionality and tests
wip dag put
Update Cargo.toml
Co-Authored-By: Joonas Koivunen <joonas.koivunen@gmail.com>
Update Cargo.toml
Delete config
rustfmt
fix: examples and unused"
fix: switching back to Vecs
feat: adding list functions to repo and ipfs
feat: working endpoint
fix: more sane newline adding
fix: clippy
fix: cargo fmt
fix: inner Result
fix: warp filter chain fixes part 1
fix: HandledErr and some cargo fmt
fix: StringError
removing HandledErr
fix: HandledErr
fix: unwrap placement
* add: pubsub http api
* add: get shoveling and subscription complications going
currently the missing piece is seeing locally sent messages in the
subscribed streams, then maybe creating a more complicated API for
subscribing which will require a single task for shoveling into the
responses.
* chore: lower timeout to pass the tests
Should probably have another drop sender here.
* fix: close stream on first error
tokio::sync::broadcast will continue after telling how many items were
lost, which seems likely with the small buffer and quickly firing more
than the buffer elements.
* fix: raise the buffer size for subscribe responses
* feat: use custom rust-libp2p to pass tests
the v0.16.2-with-floodsub-opts includes "subscribers see locally
published messages" which is needed for the conformance tests to pass.
this has been PR'd as https://github.com/libp2p/rust-libp2p/pull/1520.
* fix: pubsub test after changing the floodsub impl
in warp this means recovering from the rejections in some filter chain.
they also need to be done in the order of "detail" to general (not
found, method not allowed) in order to match the most specific first.
I was initially thinking that the `query` might need to be changed away,
but it might provide just the rejection we'd need in order to recover
and give that similar error message back.
when query parsing fails, go-ipfs returns 500 and the
v0::ResponseMessage for which this adds a builder. Perhaps we'll need a
custom query parsing filter and an Ser/Deserialize implementation for Cids,
Multiaddrs, PeerIds and whatnot, which luckily might all have FromStr
already.
the current structure in the big handler of id needs refactoring, and a
way to handle the rejections.
we cannot simply replace async aware channels with crossbeam channels,
which cannot wake us up. keeping the channel buffer size at 1 to catch
any errors.
taking on the openssl dependency is used for:
- rsa key generation
- from/to `pkcs#1` and `pkcs#8` transformations
Crate `rsa` was also considered but it does not support exporting keys
in any format at the moment and it's import code looks different from
`ring`s (this could be the case of not importing the "precomputed"
values in `rsa`).
The `pkcs#1` is (hopefully) used with go-ipfs-config/go-libp2p
compatible key storage but rust-libp2p/ring need the key in `pkcs#8` der
format. PEM parsing and PEM to DER was implemented by hand as it looked
like the existingly depended on crates are not compatible as much as
possible.
this could be moved over to rust-ipfs but I think that people will
prefer to track their own binarys version (which is tracked hopefully in
a vcs) instead of their `rust-ipfs` deps version, which will be in their
`Cargo.lock` file.
* add first draft of the http api
* chore note on the difficulties with with_graceful_shutdown
* add the second required output line by js-ipfsd-ctl
* run cargo fmt for different formatting from rls?
* chore note on (stalled) progress
* add remaining cli args boilerplate
what is missing now is using ephemeral addresses with the warp, as
js-ipfsd-ctl doesn't always to shutdown the older one, or then it just
doesn't shut down correctly.
* fix bind to ephemeral localhost port
* add env_logger initialization
* fix faked multiaddr typo
never remember its "ip4" instead of "ipv4"
* fix do GET on every method in /id
for some reason js-ipfsd-ctl will do a POST against /api/v0/id.
* chore run cargo fmt
* Adding placeholder NOT_IMPLEMENTED endpiints
* rustfmt
* Feedback from PR
* Update http/Cargo.toml
Co-Authored-By: Joonas Koivunen <joonas@equilibrium.co>
Co-authored-by: Mark Robert Henderson <henderson.mark@gmail.com>