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

Also mention ssb-subset-rpc as a maybe required dep #21

Open
Powersource opened this issue Jul 7, 2023 · 1 comment
Open

Also mention ssb-subset-rpc as a maybe required dep #21

Powersource opened this issue Jul 7, 2023 · 1 comment

Comments

@Powersource
Copy link
Collaborator

I was having trouble with (partial?) replication, and things started to work once I installed ssb-subset-rpc, but that's not mentioned in the readme here.

my setup before the fix

module.exports = function startSbot() {
  const stack = SecretStack({ caps: { shs } })
    .use(require("ssb-db2/core"))
    .use(require("ssb-classic"))
    .use(require("ssb-bendy-butt"))
    .use(require("ssb-meta-feeds"))
    .use(require("ssb-box2"))
    .use(require("ssb-db2/compat/feedstate"))
    .use(require("ssb-db2/compat/ebt"))
    .use(require("ssb-db2/compat/db")) // for legacy replicate
    .use(require("ssb-db2/compat/history-stream")) // for legacy replicate
    .use(require("ssb-friends"))
    .use(require("ssb-ebt"))
    .use(require("ssb-tribes2"))
    .use(require("ssb-lan"))
    //.use(require("ssb-subset-rpc")) // this (uncommented) is all i added to fix it
    .use(require("ssb-replication-scheduler"));

  const sbot = stack({
    path: dir,
    keys,
    ebt: {
      // logging: true,
    },
    db2: {
      flushDebounce: 10,
      writeTimeout: 10,
    },
    tribes2: {
      // timeoutLow: opts.timeoutLow,
      // timeoutHigh: opts.timeoutHigh,
    },
    friends: {
      hops: 1,
    },
    replicationScheduler: {
      //debouncePeriod: 1,
      partialReplication: {
        0: [{}],
        1: [{ purpose: "main" }, { purpose: "group/additions" }],
        group: [{ purpose: "$groupSecret" }],
      },
    },
  });

  sbot.name = "demo";
  sbot.ebt.registerFormat(bendyButtFormat);

  return sbot;
};
@staltz
Copy link
Member

staltz commented Jul 7, 2023

True!

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