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

Add faithful prefix-path/search-path for car files #221

Open
linuskendall opened this issue Jan 16, 2025 · 0 comments
Open

Add faithful prefix-path/search-path for car files #221

linuskendall opened this issue Jan 16, 2025 · 0 comments
Assignees

Comments

@linuskendall
Copy link
Contributor

In this way we could specify our config files without having to put the full path.

Currently:

version: 1 
epoch: 346
data:
  car:
    uri: http://168.119.199.114/346/epoch-346.car
  filecoin:
    enable: false
indexes:
  cid_to_offset_and_size:
    uri: /tank/346/epoch-346-bafyreiefkwiigddaenieszbyvw7gz4tu7pqoj3obijgs5t5mi6nrril4su-mainnet-cid-to-offset-and-size.index
  slot_to_cid:
    uri: /tank/346/epoch-346-bafyreiefkwiigddaenieszbyvw7gz4tu7pqoj3obijgs5t5mi6nrril4su-mainnet-slot-to-cid.index
  sig_to_cid:
    uri:  /tank/346/epoch-346-bafyreiefkwiigddaenieszbyvw7gz4tu7pqoj3obijgs5t5mi6nrril4su-mainnet-sig-to-cid.index
  sig_exists:
    uri: /tank/346/epoch-346-bafyreiefkwiigddaenieszbyvw7gz4tu7pqoj3obijgs5t5mi6nrril4su-mainnet-sig-exists.index
  gsfa:
    uri: /tank/346/epoch-346-bafyreiefkwiigddaenieszbyvw7gz4tu7pqoj3obijgs5t5mi6nrril4su-mainnet-gsfa.indexdir

Alternative:

version: 1 
epoch: 346
data:
  car:
    uri: http://168.119.199.114/346/epoch-346.car
  filecoin:
    enable: false
indexes:
  cid_to_offset_and_size:
    uri: 346/epoch-346-bafyreiefkwiigddaenieszbyvw7gz4tu7pqoj3obijgs5t5mi6nrril4su-mainnet-cid-to-offset-and-size.index
  slot_to_cid:
    uri: 346/epoch-346-bafyreiefkwiigddaenieszbyvw7gz4tu7pqoj3obijgs5t5mi6nrril4su-mainnet-slot-to-cid.index
  sig_to_cid:
    uri:  346/epoch-346-bafyreiefkwiigddaenieszbyvw7gz4tu7pqoj3obijgs5t5mi6nrril4su-mainnet-sig-to-cid.index
  sig_exists:
    uri: 346/epoch-346-bafyreiefkwiigddaenieszbyvw7gz4tu7pqoj3obijgs5t5mi6nrril4su-mainnet-sig-exists.index
  gsfa:
    uri: 346/epoch-346-bafyreiefkwiigddaenieszbyvw7gz4tu7pqoj3obijgs5t5mi6nrril4su-mainnet-gsfa.indexdir

So faithful when looking up a file based URI would:

  1. check absolute path
  2. check with each of the file-search-path elements prepended to the uri path
  3. if none of them are found, throw an error
--file-search-path=/tank:/tank2:/tank3
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

No branches or pull requests

2 participants