Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ndn/app/testbed.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ func (a *App) verifyTestbedCert(certWire enc.Wire, fetch bool) (ndn.Data, error)
Data: certData,
DataSigCov: certSigCov,
UseDataNameFwHint: optional.Some(false), // directly available
UseSignatureTime: optional.Some(true),
Fetch: func(name enc.Name, cfg *ndn.InterestConfig, callback ndn.ExpressCallbackFunc) {
if !fetch {
cfg.Lifetime.Set(1 * time.Millisecond) // no block
Expand Down
43 changes: 23 additions & 20 deletions ndn/app/workspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,11 @@ func (a *App) GetWorkspace(groupStr string, ignoreValidity bool) (api js.Value,
// Fetch the content from the network
ch := make(chan ndn.ConsumeState)
client.ConsumeExt(ndn.ConsumeExtArgs{
Name: name,
TryStore: true,
IgnoreValidity: optional.Some(ignoreValidity),
Callback: func(state ndn.ConsumeState) { ch <- state },
Name: name,
TryStore: true,
UseSignatureTime: optional.Some(true),
IgnoreValidity: optional.Some(ignoreValidity),
Callback: func(state ndn.ConsumeState) { ch <- state },
})
state := <-ch
if err := state.Error(); err != nil {
Expand Down Expand Up @@ -387,16 +388,18 @@ func (a *App) GetWorkspace(groupStr string, ignoreValidity bool) (api js.Value,
InitialState: stateWire,

Svs: ndn_sync.SvSyncOpts{
Client: client,
GroupPrefix: svsAloGroup,
IgnoreValidity: optional.Some(ignoreValidity),
Client: client,
GroupPrefix: svsAloGroup,
UseSignatureTime: optional.Some(true),
IgnoreValidity: optional.Some(ignoreValidity),
},

Snapshot: &ndn_sync.SnapshotNodeHistory{
Client: client,
Threshold: SnapshotThreshold,
Compress: a.CompressSnapshotYjs,
IgnoreValidity: optional.Some(ignoreValidity),
Client: client,
Threshold: SnapshotThreshold,
Compress: a.CompressSnapshotYjs,
UseSignatureTime: optional.Some(true),
IgnoreValidity: optional.Some(ignoreValidity),
},

MulticastPrefix: multicastPrefix,
Expand Down Expand Up @@ -627,7 +630,7 @@ func (a *App) SvsAloJs(
RefreshPing: &tlv.RefreshPing{
RequestId: requestId,
Requester: requester,
SentAt: sentAt,
SentAt: sentAt,
},
}

Expand All @@ -638,18 +641,18 @@ func (a *App) SvsAloJs(

// Persist state
jsutil.Await(persistState.Invoke(jsutil.SliceToJsArray(state.Join())))

return js.ValueOf(name.String()), nil
}),

// pub_refresh_ack(requestId: string, requester: string, responder: string, freshness: number, sentAt: string): Promise<string>;
// pub_refresh_ack(requestId: string, requester: string, responder: string, freshness: number, sentAt: string): Promise<string>;
"pub_refresh_ack": jsutil.AsyncFunc(func(this js.Value, p []js.Value) (any, error) {
requestId := p[0].String()
requester := p[1].String()
responder := p[2].String()
Freshness := uint64(p[3].Int())
SentAt := p[4].String()

if requestId == "" || requester == "" || responder == "" {
return nil, fmt.Errorf("invalid request parameters")
}
Expand All @@ -671,17 +674,17 @@ func (a *App) SvsAloJs(

// Persist state
jsutil.Await(persistState.Invoke(jsutil.SliceToJsArray(state.Join())))

return js.ValueOf(name.String()), nil
}),

// pub_refresh_req(requestId: string, requester: string, responder: string, sentAt: string): Promise<string>;
// pub_refresh_req(requestId: string, requester: string, responder: string, sentAt: string): Promise<string>;
"pub_refresh_req": jsutil.AsyncFunc(func(this js.Value, p []js.Value) (any, error) {
requestId := p[0].String()
requester := p[1].String()
responder := p[2].String()
SentAt := p[3].String()

if requestId == "" || requester == "" || responder == "" {
return nil, fmt.Errorf("invalid request parameters")
}
Expand All @@ -702,7 +705,7 @@ func (a *App) SvsAloJs(

// Persist state
jsutil.Await(persistState.Invoke(jsutil.SliceToJsArray(state.Join())))

return js.ValueOf(name.String()), nil
}),

Expand Down Expand Up @@ -899,7 +902,7 @@ func (a *App) SvsAloJs(
// log.Warn(a, "Ignoring unknown message", "publisher", pub.Publisher)
}
}

invokeBatch := func(name string, arr js.Value) {
if arr.Get("length").Int() == 0 {
return
Expand Down
Binary file modified public/main.wasm
Binary file not shown.
3 changes: 2 additions & 1 deletion src/services/latex/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ let activeEngine: PdfTeXEngine | null = null;
// 2nd try
// let texlive_endpoint = 'https://texlive.emaily.re/';
// 3rd try
const texlive_endpoint = 'https://texlive.texlyre.org';
// const texlive_endpoint = 'https://texlive.texlyre.org';
const texlive_endpoint = 'https://bruins.cs.ucla.edu';

export async function compile(project: WorkspaceProj): Promise<Uint8Array> {
let progress: typeof Toast.Handle | undefined;
Expand Down
Loading