dcp-client 4.4.29 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -476,13 +476,12 @@ self.wrapScriptLoading({ scriptName: 'access-lists', ringTransition: true }, fun
476
476
  // This event is fired when the worker is initialized with job requirements,
477
477
  // apply restrictions to the environment based on the requirements.
478
478
  // Assume the scheduler gave us a nicely-shaped req object.
479
- const requirements = event.requirements;
480
- if (requirements.environment.offscreenCanvas)
479
+ if (event.offscreenCanvas)
481
480
  {
482
481
  for (let symbol of webGLSymbols)
483
482
  allowList.add(symbol);
484
483
  }
485
- if (requirements.environment.webgpu && !protectedStorage.forceDisableWebGPU)
484
+ if (event.webgpu && !protectedStorage.forceDisableWebGPU)
486
485
  {
487
486
  for (let symbol of webGPUSymbols)
488
487
  allowList.add(symbol);
@@ -105,7 +105,7 @@ self.wrapScriptLoading({ scriptName: 'bravojs-env' }, function bravojsEvn$$fn(pr
105
105
 
106
106
  ring2PostMessage({
107
107
  request: 'assigned',
108
- jobAddress: message.job.address,
108
+ jobId: message.job.id,
109
109
  });
110
110
 
111
111
  // Now that the evaluator is assigned, wrap post message for ring 3
@@ -16,13 +16,6 @@ self.wrapScriptLoading({ scriptName: 'calculate-capabilities' }, function calcul
16
16
  async function getCapabilities() {
17
17
  let offscreenCanvas = false;
18
18
  let webgpu = false;
19
- let bigTexture4096 = false;
20
- let bigTexture8192 = false;
21
- let bigTexture16384 = false;
22
- let bigTexture32768 = false;
23
- const es7 = false;
24
- const spidermonkey = false;
25
- const chrome = undefined;
26
19
  let useStrict = true;
27
20
 
28
21
  let fdlibmFlag = true;
@@ -68,28 +61,6 @@ self.wrapScriptLoading({ scriptName: 'calculate-capabilities' }, function calcul
68
61
  typeof OffscreenCanvas !== 'undefined' && new OffscreenCanvas(1, 1)
69
62
  );
70
63
 
71
- if (offscreenCanvas) {
72
- const canvas = new OffscreenCanvas(1, 1);
73
-
74
- try {
75
- const gl = canvas.getContext('webgl');
76
- const textureSize = gl.getParameter(gl.MAX_TEXTURE_SIZE);
77
-
78
- // Destroy the WebGL context, from https://www.khronos.org/registry/webgl/extensions/WEBGL_lose_context/
79
- // "This is the recommended mechanism for applications to programmatically halt their use of the WebGL API."
80
- // gl.getExtension('WEBGL_lose_context').loseContext();
81
-
82
- bigTexture4096 = textureSize >= 4096;
83
- bigTexture8192 = textureSize >= 8192;
84
- bigTexture16384 = textureSize >= 16384;
85
- bigTexture32768 = textureSize >= 32768;
86
- }catch(err){
87
- //it is possible on some machines, that offscreenCanvas is available but canvas.getContext('webgl' or 'webgl2') results in null
88
- //Any error in this using an extensions should likely result in specifications for that capability being set to false.
89
- offscreenCanvas = false;
90
- }
91
- }
92
-
93
64
  try {
94
65
  for (let i = 0; i < inputFdlibm.length; i++) {
95
66
  if (
@@ -107,27 +78,11 @@ self.wrapScriptLoading({ scriptName: 'calculate-capabilities' }, function calcul
107
78
  useStrict = false;
108
79
 
109
80
  return {
110
- engine: {
111
- es7,
112
- spidermonkey,
113
- },
114
81
  environment: {
115
82
  webgpu,
116
83
  offscreenCanvas,
117
84
  fdlibm: fdlibmFlag,
118
85
  },
119
- browser: {
120
- chrome, /* it is replaced in the supervisor based on the DCP_ENV.isBrowserPlatform */
121
- },
122
- details: {
123
- offscreenCanvas: {
124
- bigTexture4096,
125
- bigTexture8192,
126
- bigTexture16384,
127
- bigTexture32768,
128
- },
129
- },
130
- discrete: true, //allows sandbox to be in a worker that only accepts one slice of a job total
131
86
  useStrict, // strict-mode in the work function
132
87
  };
133
88
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "dcp-client",
3
- "version": "4.4.29",
3
+ "version": "5.0.0",
4
4
  "dcp": {
5
- "version": "f316a9186e1440e91bff74ea728075a692cf917e",
5
+ "version": "b685d5cdaf95defdc499a6f843c9e8641a564a14",
6
6
  "repository": "git@gitlab.com:Distributed-Compute-Protocol/dcp.git"
7
7
  },
8
8
  "description": "Core libraries for accessing DCP network",