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

fix(prometheus): metrics.ts leaks to global registry #1202

Closed
petermetz opened this issue Aug 10, 2021 · 0 comments · Fixed by #1203
Closed

fix(prometheus): metrics.ts leaks to global registry #1202

petermetz opened this issue Aug 10, 2021 · 0 comments · Fixed by #1203
Assignees
Labels
API_Server bug Something isn't working dependencies Pull requests that update a dependency file
Milestone

Comments

@petermetz
Copy link
Member

Describe the bug

The metrics.ts file that we have for all the plugin's metrics constructs a new Metrics object at import time which then defaults to registering the metric in the global registry of prom-client by default.

This causes crashes when separate versions of the same metrics.ts file are imported in a scenario were the API server imports plugins from a different directory (this issue is coming from the branch where I'm working on plugin sandboxing via the live-plugin-manager).

To Reproduce

Run this test: packages/cactus-cmd-api-server/src/test/typescript/integration/remote-plugin-imports.test.ts
With different plugin versions being present and then watch it crash with prom-client complaining that you are duplicating the metrics in the global scope.

Expected behavior

No crash.

Logs/Stack traces

N/A

Screenshots

NA

Cloud provider or hardware configuration:

Dev machine

Operating system name, version, build:

NA

Hyperledger Cactus release version or commit (git rev-parse --short HEAD):

0.7.0

Hyperledger Cactus Plugins/Connectors Used

None, just the keychain vault plugin.

Additional context

NA

@petermetz petermetz added bug Something isn't working API_Server dependencies Pull requests that update a dependency file labels Aug 10, 2021
@petermetz petermetz added this to the v0.8.0 milestone Aug 10, 2021
@petermetz petermetz self-assigned this Aug 10, 2021
petermetz added a commit to petermetz/cacti that referenced this issue Aug 10, 2021
1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz added a commit to petermetz/cacti that referenced this issue Aug 10, 2021
1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz added a commit to petermetz/cacti that referenced this issue Aug 10, 2021
1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz added a commit that referenced this issue Aug 12, 2021
1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes #1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
hanxu12 pushed a commit to hanxu12/cactus that referenced this issue Aug 14, 2021
1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: hxlaf <xuhan@lafayette.edu>
maramih pushed a commit to maramih/cactus that referenced this issue Aug 17, 2021
1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
maramih pushed a commit to maramih/cactus that referenced this issue Aug 17, 2021
1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
maramih pushed a commit to maramih/cactus that referenced this issue Sep 13, 2021
1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
maramih pushed a commit to maramih/cactus that referenced this issue Sep 19, 2021
1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
maramih pushed a commit to maramih/cactus that referenced this issue Sep 22, 2021
1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
maramih pushed a commit to maramih/cactus that referenced this issue Sep 27, 2021
1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
maramih pushed a commit to maramih/cactus that referenced this issue Oct 5, 2021
1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
maramih pushed a commit to maramih/cactus that referenced this issue Oct 7, 2021
1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
maramih pushed a commit to maramih/cactus that referenced this issue Oct 17, 2021
1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
RafaelAPB pushed a commit to RafaelAPB/blockchain-integration-framework that referenced this issue Mar 9, 2022
1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
RafaelAPB pushed a commit to RafaelAPB/blockchain-integration-framework that referenced this issue Mar 9, 2022
1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
RafaelAPB pushed a commit to RafaelAPB/blockchain-integration-framework that referenced this issue Mar 11, 2022
1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
RafaelAPB pushed a commit to RafaelAPB/blockchain-integration-framework that referenced this issue Apr 6, 2022
1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
RafaelAPB pushed a commit to RafaelAPB/blockchain-integration-framework that referenced this issue May 10, 2022
1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
RafaelAPB pushed a commit to RafaelAPB/blockchain-integration-framework that referenced this issue May 17, 2022
1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz added a commit to RafaelAPB/blockchain-integration-framework that referenced this issue Jul 1, 2022
1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
RafaelAPB pushed a commit to RafaelAPB/blockchain-integration-framework that referenced this issue Jul 19, 2022
Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>
Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
Signed-off-by: Peter Somogyvari

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

fix(prometheus): metrics.ts leaks to global registry hyperledger#1202

1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): added test for multiple prometheus metrics on fabric

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): added croschainEventLog models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(fabric): added endpoint for list of transaction receipts

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(test-tooling): add RabbitMQ test server

feat(cc-tx-viz): add RabbitMQ support; update model

feat(cc-tx-viz): add preliminary support to Fabric and Besu

build(deps): upgrade axios to latest to fix CVE

Details
CVE-2021-3749
high severity
Vulnerable versions: <= 0.21.1
Patched version: 0.21.2
axios is vulnerable to Inefficient Regular Expression Complexity

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

xfix(cc-tx-viz): error implementation of IsVisualizable

feat(cc-tx-viz): add methods to fabric and besu; update models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): update cross chain events log for fabric transactions

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cctxviz): fix fabric prometheus

feat(cctxviz): fix besu prometheus

feat(cctxviz): fix fabric test

feat(cctxviz): update tx receipt

feat(cctxviz): add test script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add test receipts

feat(cctxviz): refactor CrossChainEventLog

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): refactor tests

feat(cc-tx-viz): update model, add tests

chore(cc-tx-viz): update dependencies

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): persist logs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cc-tx-viz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): update strinfify to csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): add csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): move csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add test

feat(cctxviz): add csv file, process mining script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): proof of concept v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): update csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

docs(cctxviz): update readme

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add carbon footprint

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(fabric-connector): update default queue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): fabric test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add parameters to fabric calls

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support besu

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update metrics

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxvi): update fabric and besu tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): besu and fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support call transactions on fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add aggregation basis

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): aggregate cctx

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): containerize draft

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add revenue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add dummy use case playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update persist test and dummy uc

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): workload test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add more timers

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer to map on connectors

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): vis plot wip

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): evaluate baseline

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update plots

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test files

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): time-efficient polling receipts

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): add test chaincode

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): use case v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

build(cc-tx-visualization): added missing fabric-contract-api

This will fix one compilation error.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

chore(deps): updated yarn.lock after rebase onto upstream/main

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

build(cc-tx-visualization): deleted redundant test fixtures

Also added the test-tooling package as a dev dependency which
should fix a few of the compiler errors we were getting on account
of missing dependencies.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

fix: resolved build errors for cctxviz branch

- test-tooling package changed that needs to be reverted before commmit to main branch
- added import statement for test data generationt

xfix(cc-tx-viz): error implementation of IsVisualizable

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add graphs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

fix(cctxviz): fix bug

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add process conformance

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
RafaelAPB pushed a commit to RafaelAPB/blockchain-integration-framework that referenced this issue Jul 19, 2022
Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>
Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
Signed-off-by: Peter Somogyvari

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

fix(prometheus): metrics.ts leaks to global registry hyperledger#1202

1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): added test for multiple prometheus metrics on fabric

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): added croschainEventLog models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(fabric): added endpoint for list of transaction receipts

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(test-tooling): add RabbitMQ test server

feat(cc-tx-viz): add RabbitMQ support; update model

feat(cc-tx-viz): add preliminary support to Fabric and Besu

build(deps): upgrade axios to latest to fix CVE

Details
CVE-2021-3749
high severity
Vulnerable versions: <= 0.21.1
Patched version: 0.21.2
axios is vulnerable to Inefficient Regular Expression Complexity

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

xfix(cc-tx-viz): error implementation of IsVisualizable

feat(cc-tx-viz): add methods to fabric and besu; update models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): update cross chain events log for fabric transactions

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cctxviz): fix fabric prometheus

feat(cctxviz): fix besu prometheus

feat(cctxviz): fix fabric test

feat(cctxviz): update tx receipt

feat(cctxviz): add test script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add test receipts

feat(cctxviz): refactor CrossChainEventLog

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): refactor tests

feat(cc-tx-viz): update model, add tests

chore(cc-tx-viz): update dependencies

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): persist logs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cc-tx-viz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): update strinfify to csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): add csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): move csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add test

feat(cctxviz): add csv file, process mining script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): proof of concept v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): update csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

docs(cctxviz): update readme

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add carbon footprint

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(fabric-connector): update default queue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): fabric test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add parameters to fabric calls

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support besu

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update metrics

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxvi): update fabric and besu tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): besu and fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support call transactions on fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add aggregation basis

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): aggregate cctx

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): containerize draft

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add revenue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add dummy use case playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update persist test and dummy uc

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): workload test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add more timers

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer to map on connectors

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): vis plot wip

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): evaluate baseline

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update plots

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test files

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): time-efficient polling receipts

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): add test chaincode

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): use case v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

build(cc-tx-visualization): added missing fabric-contract-api

This will fix one compilation error.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

chore(deps): updated yarn.lock after rebase onto upstream/main

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

build(cc-tx-visualization): deleted redundant test fixtures

Also added the test-tooling package as a dev dependency which
should fix a few of the compiler errors we were getting on account
of missing dependencies.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

fix: resolved build errors for cctxviz branch

- test-tooling package changed that needs to be reverted before commmit to main branch
- added import statement for test data generationt

xfix(cc-tx-viz): error implementation of IsVisualizable

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add graphs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

fix(cctxviz): fix bug

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add process conformance

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
RafaelAPB pushed a commit to RafaelAPB/blockchain-integration-framework that referenced this issue Jul 22, 2022
Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>
Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

fix(prometheus): metrics.ts leaks to global registry hyperledger#1202

1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): added test for multiple prometheus metrics on fabric

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): added croschainEventLog models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(fabric): added endpoint for list of transaction receipts

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(test-tooling): add RabbitMQ test server

feat(cc-tx-viz): add RabbitMQ support; update model

feat(cc-tx-viz): add preliminary support to Fabric and Besu

build(deps): upgrade axios to latest to fix CVE

Details
CVE-2021-3749
high severity
Vulnerable versions: <= 0.21.1
Patched version: 0.21.2
axios is vulnerable to Inefficient Regular Expression Complexity

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

xfix(cc-tx-viz): error implementation of IsVisualizable

feat(cc-tx-viz): add methods to fabric and besu; update models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): update cross chain events log for fabric transactions

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cctxviz): fix fabric prometheus

feat(cctxviz): fix besu prometheus

feat(cctxviz): fix fabric test

feat(cctxviz): update tx receipt

feat(cctxviz): add test script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add test receipts

feat(cctxviz): refactor CrossChainEventLog

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): refactor tests

feat(cc-tx-viz): update model, add tests

chore(cc-tx-viz): update dependencies

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): persist logs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cc-tx-viz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): update strinfify to csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): add csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): move csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add test

feat(cctxviz): add csv file, process mining script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): proof of concept v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): update csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

docs(cctxviz): update readme

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add carbon footprint

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(fabric-connector): update default queue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): fabric test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add parameters to fabric calls

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support besu

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update metrics

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxvi): update fabric and besu tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): besu and fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support call transactions on fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add aggregation basis

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): aggregate cctx

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): containerize draft

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add revenue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add dummy use case playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update persist test and dummy uc

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): workload test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add more timers

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer to map on connectors

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): vis plot wip

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): evaluate baseline

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update plots

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test files

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): time-efficient polling receipts

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): add test chaincode

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): use case v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

build(cc-tx-visualization): added missing fabric-contract-api

This will fix one compilation error.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

chore(deps): updated yarn.lock after rebase onto upstream/main

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

build(cc-tx-visualization): deleted redundant test fixtures

Also added the test-tooling package as a dev dependency which
should fix a few of the compiler errors we were getting on account
of missing dependencies.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

fix: resolved build errors for cctxviz branch

- test-tooling package changed that needs to be reverted before commmit to main branch
- added import statement for test data generationt

xfix(cc-tx-viz): error implementation of IsVisualizable

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add graphs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

fix(cctxviz): fix bug

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add process conformance

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
RafaelAPB pushed a commit to RafaelAPB/blockchain-integration-framework that referenced this issue Jul 22, 2022
Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>
Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

fix(prometheus): metrics.ts leaks to global registry hyperledger#1202

1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): added test for multiple prometheus metrics on fabric

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): added croschainEventLog models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(fabric): added endpoint for list of transaction receipts

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(test-tooling): add RabbitMQ test server

feat(cc-tx-viz): add RabbitMQ support; update model

feat(cc-tx-viz): add preliminary support to Fabric and Besu

build(deps): upgrade axios to latest to fix CVE

Details
CVE-2021-3749
high severity
Vulnerable versions: <= 0.21.1
Patched version: 0.21.2
axios is vulnerable to Inefficient Regular Expression Complexity

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

xfix(cc-tx-viz): error implementation of IsVisualizable

feat(cc-tx-viz): add methods to fabric and besu; update models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): update cross chain events log for fabric transactions

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cctxviz): fix fabric prometheus

feat(cctxviz): fix besu prometheus

feat(cctxviz): fix fabric test

feat(cctxviz): update tx receipt

feat(cctxviz): add test script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add test receipts

feat(cctxviz): refactor CrossChainEventLog

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): refactor tests

feat(cc-tx-viz): update model, add tests

chore(cc-tx-viz): update dependencies

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): persist logs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cc-tx-viz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): update strinfify to csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): add csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): move csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add test

feat(cctxviz): add csv file, process mining script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): proof of concept v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): update csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

docs(cctxviz): update readme

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add carbon footprint

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(fabric-connector): update default queue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): fabric test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add parameters to fabric calls

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support besu

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update metrics

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxvi): update fabric and besu tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): besu and fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support call transactions on fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add aggregation basis

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): aggregate cctx

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): containerize draft

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add revenue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add dummy use case playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update persist test and dummy uc

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): workload test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add more timers

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer to map on connectors

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): vis plot wip

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): evaluate baseline

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update plots

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test files

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): time-efficient polling receipts

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): add test chaincode

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): use case v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

build(cc-tx-visualization): added missing fabric-contract-api

This will fix one compilation error.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

chore(deps): updated yarn.lock after rebase onto upstream/main

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

build(cc-tx-visualization): deleted redundant test fixtures

Also added the test-tooling package as a dev dependency which
should fix a few of the compiler errors we were getting on account
of missing dependencies.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

fix: resolved build errors for cctxviz branch

- test-tooling package changed that needs to be reverted before commmit to main branch
- added import statement for test data generationt

xfix(cc-tx-viz): error implementation of IsVisualizable

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add graphs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

fix(cctxviz): fix bug

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add process conformance

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
RafaelAPB pushed a commit to RafaelAPB/blockchain-integration-framework that referenced this issue Jul 22, 2022
Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>
Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

fix(prometheus): metrics.ts leaks to global registry hyperledger#1202

1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): added test for multiple prometheus metrics on fabric

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): added croschainEventLog models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(fabric): added endpoint for list of transaction receipts

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(test-tooling): add RabbitMQ test server

feat(cc-tx-viz): add RabbitMQ support; update model

feat(cc-tx-viz): add preliminary support to Fabric and Besu

build(deps): upgrade axios to latest to fix CVE

Details
CVE-2021-3749
high severity
Vulnerable versions: <= 0.21.1
Patched version: 0.21.2
axios is vulnerable to Inefficient Regular Expression Complexity

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

xfix(cc-tx-viz): error implementation of IsVisualizable

feat(cc-tx-viz): add methods to fabric and besu; update models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): update cross chain events log for fabric transactions

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cctxviz): fix fabric prometheus

feat(cctxviz): fix besu prometheus

feat(cctxviz): fix fabric test

feat(cctxviz): update tx receipt

feat(cctxviz): add test script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add test receipts

feat(cctxviz): refactor CrossChainEventLog

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): refactor tests

feat(cc-tx-viz): update model, add tests

chore(cc-tx-viz): update dependencies

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): persist logs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cc-tx-viz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): update strinfify to csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): add csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): move csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add test

feat(cctxviz): add csv file, process mining script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): proof of concept v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): update csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

docs(cctxviz): update readme

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add carbon footprint

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(fabric-connector): update default queue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): fabric test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add parameters to fabric calls

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support besu

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update metrics

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxvi): update fabric and besu tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): besu and fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support call transactions on fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add aggregation basis

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): aggregate cctx

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): containerize draft

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add revenue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add dummy use case playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update persist test and dummy uc

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): workload test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add more timers

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer to map on connectors

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): vis plot wip

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): evaluate baseline

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update plots

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test files

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): time-efficient polling receipts

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): add test chaincode

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): use case v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

build(cc-tx-visualization): added missing fabric-contract-api

This will fix one compilation error.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

chore(deps): updated yarn.lock after rebase onto upstream/main

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

build(cc-tx-visualization): deleted redundant test fixtures

Also added the test-tooling package as a dev dependency which
should fix a few of the compiler errors we were getting on account
of missing dependencies.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

fix: resolved build errors for cctxviz branch

- test-tooling package changed that needs to be reverted before commmit to main branch
- added import statement for test data generationt

xfix(cc-tx-viz): error implementation of IsVisualizable

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add graphs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

fix(cctxviz): fix bug

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add process conformance

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
RafaelAPB pushed a commit to RafaelAPB/blockchain-integration-framework that referenced this issue Jul 22, 2022
Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>
Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

fix(prometheus): metrics.ts leaks to global registry hyperledger#1202

1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): added test for multiple prometheus metrics on fabric

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): added croschainEventLog models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(fabric): added endpoint for list of transaction receipts

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(test-tooling): add RabbitMQ test server

feat(cc-tx-viz): add RabbitMQ support; update model

feat(cc-tx-viz): add preliminary support to Fabric and Besu

build(deps): upgrade axios to latest to fix CVE

Details
CVE-2021-3749
high severity
Vulnerable versions: <= 0.21.1
Patched version: 0.21.2
axios is vulnerable to Inefficient Regular Expression Complexity

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

xfix(cc-tx-viz): error implementation of IsVisualizable

feat(cc-tx-viz): add methods to fabric and besu; update models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): update cross chain events log for fabric transactions

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cctxviz): fix fabric prometheus

feat(cctxviz): fix besu prometheus

feat(cctxviz): fix fabric test

feat(cctxviz): update tx receipt

feat(cctxviz): add test script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add test receipts

feat(cctxviz): refactor CrossChainEventLog

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): refactor tests

feat(cc-tx-viz): update model, add tests

chore(cc-tx-viz): update dependencies

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): persist logs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cc-tx-viz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): update strinfify to csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): add csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): move csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add test

feat(cctxviz): add csv file, process mining script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): proof of concept v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): update csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

docs(cctxviz): update readme

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add carbon footprint

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(fabric-connector): update default queue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): fabric test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add parameters to fabric calls

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support besu

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update metrics

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxvi): update fabric and besu tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): besu and fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support call transactions on fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add aggregation basis

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): aggregate cctx

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): containerize draft

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add revenue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add dummy use case playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update persist test and dummy uc

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): workload test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add more timers

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer to map on connectors

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): vis plot wip

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): evaluate baseline

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update plots

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test files

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): time-efficient polling receipts

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): add test chaincode

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): use case v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

build(cc-tx-visualization): added missing fabric-contract-api

This will fix one compilation error.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

chore(deps): updated yarn.lock after rebase onto upstream/main

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

build(cc-tx-visualization): deleted redundant test fixtures

Also added the test-tooling package as a dev dependency which
should fix a few of the compiler errors we were getting on account
of missing dependencies.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

fix: resolved build errors for cctxviz branch

- test-tooling package changed that needs to be reverted before commmit to main branch
- added import statement for test data generationt

xfix(cc-tx-viz): error implementation of IsVisualizable

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add graphs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

fix(cctxviz): fix bug

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add process conformance

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
RafaelAPB pushed a commit to RafaelAPB/blockchain-integration-framework that referenced this issue Jul 22, 2022
Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>
Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

fix(prometheus): metrics.ts leaks to global registry hyperledger#1202

1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): added test for multiple prometheus metrics on fabric

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): added croschainEventLog models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(fabric): added endpoint for list of transaction receipts

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(test-tooling): add RabbitMQ test server

feat(cc-tx-viz): add RabbitMQ support; update model

feat(cc-tx-viz): add preliminary support to Fabric and Besu

build(deps): upgrade axios to latest to fix CVE

Details
CVE-2021-3749
high severity
Vulnerable versions: <= 0.21.1
Patched version: 0.21.2
axios is vulnerable to Inefficient Regular Expression Complexity

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

xfix(cc-tx-viz): error implementation of IsVisualizable

feat(cc-tx-viz): add methods to fabric and besu; update models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): update cross chain events log for fabric transactions

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cctxviz): fix fabric prometheus

feat(cctxviz): fix besu prometheus

feat(cctxviz): fix fabric test

feat(cctxviz): update tx receipt

feat(cctxviz): add test script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add test receipts

feat(cctxviz): refactor CrossChainEventLog

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): refactor tests

feat(cc-tx-viz): update model, add tests

chore(cc-tx-viz): update dependencies

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): persist logs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cc-tx-viz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): update strinfify to csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): add csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): move csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add test

feat(cctxviz): add csv file, process mining script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): proof of concept v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): update csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

docs(cctxviz): update readme

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add carbon footprint

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(fabric-connector): update default queue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): fabric test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add parameters to fabric calls

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support besu

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update metrics

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxvi): update fabric and besu tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): besu and fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support call transactions on fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add aggregation basis

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): aggregate cctx

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): containerize draft

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add revenue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add dummy use case playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update persist test and dummy uc

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): workload test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add more timers

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer to map on connectors

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): vis plot wip

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): evaluate baseline

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update plots

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test files

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): time-efficient polling receipts

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): add test chaincode

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): use case v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

build(cc-tx-visualization): added missing fabric-contract-api

This will fix one compilation error.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

chore(deps): updated yarn.lock after rebase onto upstream/main

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

build(cc-tx-visualization): deleted redundant test fixtures

Also added the test-tooling package as a dev dependency which
should fix a few of the compiler errors we were getting on account
of missing dependencies.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

fix: resolved build errors for cctxviz branch

- test-tooling package changed that needs to be reverted before commmit to main branch
- added import statement for test data generationt

xfix(cc-tx-viz): error implementation of IsVisualizable

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add graphs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

fix(cctxviz): fix bug

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add process conformance

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
RafaelAPB pushed a commit to RafaelAPB/blockchain-integration-framework that referenced this issue Jul 22, 2022
Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>
Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

fix(prometheus): metrics.ts leaks to global registry hyperledger#1202

1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): added test for multiple prometheus metrics on fabric

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): added croschainEventLog models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(fabric): added endpoint for list of transaction receipts

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(test-tooling): add RabbitMQ test server

feat(cc-tx-viz): add RabbitMQ support; update model

feat(cc-tx-viz): add preliminary support to Fabric and Besu

build(deps): upgrade axios to latest to fix CVE

Details
CVE-2021-3749
high severity
Vulnerable versions: <= 0.21.1
Patched version: 0.21.2
axios is vulnerable to Inefficient Regular Expression Complexity

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

xfix(cc-tx-viz): error implementation of IsVisualizable

feat(cc-tx-viz): add methods to fabric and besu; update models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): update cross chain events log for fabric transactions

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cctxviz): fix fabric prometheus

feat(cctxviz): fix besu prometheus

feat(cctxviz): fix fabric test

feat(cctxviz): update tx receipt

feat(cctxviz): add test script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add test receipts

feat(cctxviz): refactor CrossChainEventLog

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): refactor tests

feat(cc-tx-viz): update model, add tests

chore(cc-tx-viz): update dependencies

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): persist logs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cc-tx-viz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): update strinfify to csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): add csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): move csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add test

feat(cctxviz): add csv file, process mining script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): proof of concept v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): update csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

docs(cctxviz): update readme

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add carbon footprint

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(fabric-connector): update default queue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): fabric test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add parameters to fabric calls

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support besu

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update metrics

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxvi): update fabric and besu tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): besu and fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support call transactions on fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add aggregation basis

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): aggregate cctx

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): containerize draft

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add revenue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add dummy use case playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update persist test and dummy uc

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): workload test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add more timers

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer to map on connectors

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): vis plot wip

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): evaluate baseline

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update plots

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test files

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): time-efficient polling receipts

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): add test chaincode

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): use case v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

build(cc-tx-visualization): added missing fabric-contract-api

This will fix one compilation error.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

chore(deps): updated yarn.lock after rebase onto upstream/main

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

build(cc-tx-visualization): deleted redundant test fixtures

Also added the test-tooling package as a dev dependency which
should fix a few of the compiler errors we were getting on account
of missing dependencies.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

fix: resolved build errors for cctxviz branch

- test-tooling package changed that needs to be reverted before commmit to main branch
- added import statement for test data generationt

xfix(cc-tx-viz): error implementation of IsVisualizable

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add graphs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

fix(cctxviz): fix bug

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add process conformance

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
RafaelAPB pushed a commit to RafaelAPB/blockchain-integration-framework that referenced this issue Jul 29, 2022
Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>
Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

fix(prometheus): metrics.ts leaks to global registry hyperledger#1202

1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): added test for multiple prometheus metrics on fabric

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): added croschainEventLog models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(fabric): added endpoint for list of transaction receipts

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(test-tooling): add RabbitMQ test server

feat(cc-tx-viz): add RabbitMQ support; update model

feat(cc-tx-viz): add preliminary support to Fabric and Besu

build(deps): upgrade axios to latest to fix CVE

Details
CVE-2021-3749
high severity
Vulnerable versions: <= 0.21.1
Patched version: 0.21.2
axios is vulnerable to Inefficient Regular Expression Complexity

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

xfix(cc-tx-viz): error implementation of IsVisualizable

feat(cc-tx-viz): add methods to fabric and besu; update models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): update cross chain events log for fabric transactions

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cctxviz): fix fabric prometheus

feat(cctxviz): fix besu prometheus

feat(cctxviz): fix fabric test

feat(cctxviz): update tx receipt

feat(cctxviz): add test script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add test receipts

feat(cctxviz): refactor CrossChainEventLog

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): refactor tests

feat(cc-tx-viz): update model, add tests

chore(cc-tx-viz): update dependencies

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): persist logs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cc-tx-viz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): update strinfify to csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): add csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): move csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add test

feat(cctxviz): add csv file, process mining script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): proof of concept v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): update csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

docs(cctxviz): update readme

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add carbon footprint

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(fabric-connector): update default queue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): fabric test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add parameters to fabric calls

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support besu

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update metrics

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxvi): update fabric and besu tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): besu and fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support call transactions on fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add aggregation basis

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): aggregate cctx

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): containerize draft

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add revenue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add dummy use case playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update persist test and dummy uc

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): workload test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add more timers

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer to map on connectors

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): vis plot wip

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): evaluate baseline

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update plots

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test files

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): time-efficient polling receipts

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): add test chaincode

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): use case v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

build(cc-tx-visualization): added missing fabric-contract-api

This will fix one compilation error.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

chore(deps): updated yarn.lock after rebase onto upstream/main

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

build(cc-tx-visualization): deleted redundant test fixtures

Also added the test-tooling package as a dev dependency which
should fix a few of the compiler errors we were getting on account
of missing dependencies.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

fix: resolved build errors for cctxviz branch

- test-tooling package changed that needs to be reverted before commmit to main branch
- added import statement for test data generationt

xfix(cc-tx-viz): error implementation of IsVisualizable

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add graphs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

fix(cctxviz): fix bug

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add process conformance

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
RafaelAPB pushed a commit to RafaelAPB/blockchain-integration-framework that referenced this issue Jul 29, 2022
Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>
Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

fix(prometheus): metrics.ts leaks to global registry hyperledger#1202

1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): added test for multiple prometheus metrics on fabric

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): added croschainEventLog models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(fabric): added endpoint for list of transaction receipts

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(test-tooling): add RabbitMQ test server

feat(cc-tx-viz): add RabbitMQ support; update model

feat(cc-tx-viz): add preliminary support to Fabric and Besu

build(deps): upgrade axios to latest to fix CVE

Details
CVE-2021-3749
high severity
Vulnerable versions: <= 0.21.1
Patched version: 0.21.2
axios is vulnerable to Inefficient Regular Expression Complexity

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

xfix(cc-tx-viz): error implementation of IsVisualizable

feat(cc-tx-viz): add methods to fabric and besu; update models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): update cross chain events log for fabric transactions

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cctxviz): fix fabric prometheus

feat(cctxviz): fix besu prometheus

feat(cctxviz): fix fabric test

feat(cctxviz): update tx receipt

feat(cctxviz): add test script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add test receipts

feat(cctxviz): refactor CrossChainEventLog

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): refactor tests

feat(cc-tx-viz): update model, add tests

chore(cc-tx-viz): update dependencies

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): persist logs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cc-tx-viz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): update strinfify to csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): add csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): move csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add test

feat(cctxviz): add csv file, process mining script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): proof of concept v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): update csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

docs(cctxviz): update readme

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add carbon footprint

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(fabric-connector): update default queue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): fabric test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add parameters to fabric calls

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support besu

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update metrics

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxvi): update fabric and besu tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): besu and fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support call transactions on fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add aggregation basis

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): aggregate cctx

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): containerize draft

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add revenue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add dummy use case playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update persist test and dummy uc

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): workload test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add more timers

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer to map on connectors

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): vis plot wip

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): evaluate baseline

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update plots

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test files

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): time-efficient polling receipts

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): add test chaincode

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): use case v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

build(cc-tx-visualization): added missing fabric-contract-api

This will fix one compilation error.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

chore(deps): updated yarn.lock after rebase onto upstream/main

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

build(cc-tx-visualization): deleted redundant test fixtures

Also added the test-tooling package as a dev dependency which
should fix a few of the compiler errors we were getting on account
of missing dependencies.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

fix: resolved build errors for cctxviz branch

- test-tooling package changed that needs to be reverted before commmit to main branch
- added import statement for test data generationt

xfix(cc-tx-viz): error implementation of IsVisualizable

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add graphs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

fix(cctxviz): fix bug

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add process conformance

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
RafaelAPB pushed a commit to RafaelAPB/blockchain-integration-framework that referenced this issue Jul 29, 2022
Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>
Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

fix(prometheus): metrics.ts leaks to global registry hyperledger#1202

1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): added test for multiple prometheus metrics on fabric

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): added croschainEventLog models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(fabric): added endpoint for list of transaction receipts

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(test-tooling): add RabbitMQ test server

feat(cc-tx-viz): add RabbitMQ support; update model

feat(cc-tx-viz): add preliminary support to Fabric and Besu

build(deps): upgrade axios to latest to fix CVE

Details
CVE-2021-3749
high severity
Vulnerable versions: <= 0.21.1
Patched version: 0.21.2
axios is vulnerable to Inefficient Regular Expression Complexity

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

xfix(cc-tx-viz): error implementation of IsVisualizable

feat(cc-tx-viz): add methods to fabric and besu; update models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): update cross chain events log for fabric transactions

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cctxviz): fix fabric prometheus

feat(cctxviz): fix besu prometheus

feat(cctxviz): fix fabric test

feat(cctxviz): update tx receipt

feat(cctxviz): add test script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add test receipts

feat(cctxviz): refactor CrossChainEventLog

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): refactor tests

feat(cc-tx-viz): update model, add tests

chore(cc-tx-viz): update dependencies

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): persist logs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cc-tx-viz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): update strinfify to csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): add csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): move csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add test

feat(cctxviz): add csv file, process mining script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): proof of concept v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): update csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

docs(cctxviz): update readme

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add carbon footprint

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(fabric-connector): update default queue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): fabric test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add parameters to fabric calls

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support besu

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update metrics

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxvi): update fabric and besu tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): besu and fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support call transactions on fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add aggregation basis

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): aggregate cctx

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): containerize draft

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add revenue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add dummy use case playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update persist test and dummy uc

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): workload test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add more timers

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer to map on connectors

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): vis plot wip

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): evaluate baseline

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update plots

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test files

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): time-efficient polling receipts

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): add test chaincode

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): use case v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

build(cc-tx-visualization): added missing fabric-contract-api

This will fix one compilation error.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

chore(deps): updated yarn.lock after rebase onto upstream/main

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

build(cc-tx-visualization): deleted redundant test fixtures

Also added the test-tooling package as a dev dependency which
should fix a few of the compiler errors we were getting on account
of missing dependencies.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

fix: resolved build errors for cctxviz branch

- test-tooling package changed that needs to be reverted before commmit to main branch
- added import statement for test data generationt

xfix(cc-tx-viz): error implementation of IsVisualizable

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add graphs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

fix(cctxviz): fix bug

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add process conformance

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
RafaelAPB pushed a commit to RafaelAPB/blockchain-integration-framework that referenced this issue Aug 2, 2022
Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>
Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

fix(prometheus): metrics.ts leaks to global registry hyperledger#1202

1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): added test for multiple prometheus metrics on fabric

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): added croschainEventLog models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(fabric): added endpoint for list of transaction receipts

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(test-tooling): add RabbitMQ test server

feat(cc-tx-viz): add RabbitMQ support; update model

feat(cc-tx-viz): add preliminary support to Fabric and Besu

build(deps): upgrade axios to latest to fix CVE

Details
CVE-2021-3749
high severity
Vulnerable versions: <= 0.21.1
Patched version: 0.21.2
axios is vulnerable to Inefficient Regular Expression Complexity

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

xfix(cc-tx-viz): error implementation of IsVisualizable

feat(cc-tx-viz): add methods to fabric and besu; update models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): update cross chain events log for fabric transactions

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cctxviz): fix fabric prometheus

feat(cctxviz): fix besu prometheus

feat(cctxviz): fix fabric test

feat(cctxviz): update tx receipt

feat(cctxviz): add test script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add test receipts

feat(cctxviz): refactor CrossChainEventLog

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): refactor tests

feat(cc-tx-viz): update model, add tests

chore(cc-tx-viz): update dependencies

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): persist logs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cc-tx-viz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): update strinfify to csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): add csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): move csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add test

feat(cctxviz): add csv file, process mining script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): proof of concept v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): update csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

docs(cctxviz): update readme

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add carbon footprint

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(fabric-connector): update default queue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): fabric test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add parameters to fabric calls

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support besu

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update metrics

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxvi): update fabric and besu tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): besu and fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support call transactions on fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add aggregation basis

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): aggregate cctx

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): containerize draft

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add revenue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add dummy use case playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update persist test and dummy uc

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): workload test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add more timers

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer to map on connectors

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): vis plot wip

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): evaluate baseline

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update plots

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test files

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): time-efficient polling receipts

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): add test chaincode

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): use case v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

build(cc-tx-visualization): added missing fabric-contract-api

This will fix one compilation error.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

chore(deps): updated yarn.lock after rebase onto upstream/main

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

build(cc-tx-visualization): deleted redundant test fixtures

Also added the test-tooling package as a dev dependency which
should fix a few of the compiler errors we were getting on account
of missing dependencies.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

fix: resolved build errors for cctxviz branch

- test-tooling package changed that needs to be reverted before commmit to main branch
- added import statement for test data generationt

xfix(cc-tx-viz): error implementation of IsVisualizable

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add graphs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

fix(cctxviz): fix bug

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add process conformance

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
RafaelAPB pushed a commit to RafaelAPB/blockchain-integration-framework that referenced this issue Aug 2, 2022
Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>
Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

fix(prometheus): metrics.ts leaks to global registry hyperledger#1202

1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): added test for multiple prometheus metrics on fabric

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): added croschainEventLog models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(fabric): added endpoint for list of transaction receipts

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(test-tooling): add RabbitMQ test server

feat(cc-tx-viz): add RabbitMQ support; update model

feat(cc-tx-viz): add preliminary support to Fabric and Besu

build(deps): upgrade axios to latest to fix CVE

Details
CVE-2021-3749
high severity
Vulnerable versions: <= 0.21.1
Patched version: 0.21.2
axios is vulnerable to Inefficient Regular Expression Complexity

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

xfix(cc-tx-viz): error implementation of IsVisualizable

feat(cc-tx-viz): add methods to fabric and besu; update models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): update cross chain events log for fabric transactions

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cctxviz): fix fabric prometheus

feat(cctxviz): fix besu prometheus

feat(cctxviz): fix fabric test

feat(cctxviz): update tx receipt

feat(cctxviz): add test script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add test receipts

feat(cctxviz): refactor CrossChainEventLog

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): refactor tests

feat(cc-tx-viz): update model, add tests

chore(cc-tx-viz): update dependencies

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): persist logs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cc-tx-viz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): update strinfify to csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): add csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): move csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add test

feat(cctxviz): add csv file, process mining script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): proof of concept v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): update csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

docs(cctxviz): update readme

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add carbon footprint

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(fabric-connector): update default queue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): fabric test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add parameters to fabric calls

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support besu

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update metrics

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxvi): update fabric and besu tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): besu and fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support call transactions on fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add aggregation basis

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): aggregate cctx

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): containerize draft

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add revenue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add dummy use case playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update persist test and dummy uc

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): workload test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add more timers

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer to map on connectors

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): vis plot wip

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): evaluate baseline

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update plots

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test files

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): time-efficient polling receipts

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): add test chaincode

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): use case v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

build(cc-tx-visualization): added missing fabric-contract-api

This will fix one compilation error.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

chore(deps): updated yarn.lock after rebase onto upstream/main

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

build(cc-tx-visualization): deleted redundant test fixtures

Also added the test-tooling package as a dev dependency which
should fix a few of the compiler errors we were getting on account
of missing dependencies.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

fix: resolved build errors for cctxviz branch

- test-tooling package changed that needs to be reverted before commmit to main branch
- added import statement for test data generationt

xfix(cc-tx-viz): error implementation of IsVisualizable

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add graphs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

fix(cctxviz): fix bug

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add process conformance

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
RafaelAPB pushed a commit to RafaelAPB/blockchain-integration-framework that referenced this issue Aug 3, 2022
Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>
Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

fix(prometheus): metrics.ts leaks to global registry hyperledger#1202

1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): added test for multiple prometheus metrics on fabric

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): added croschainEventLog models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(fabric): added endpoint for list of transaction receipts

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(test-tooling): add RabbitMQ test server

feat(cc-tx-viz): add RabbitMQ support; update model

feat(cc-tx-viz): add preliminary support to Fabric and Besu

build(deps): upgrade axios to latest to fix CVE

Details
CVE-2021-3749
high severity
Vulnerable versions: <= 0.21.1
Patched version: 0.21.2
axios is vulnerable to Inefficient Regular Expression Complexity

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

xfix(cc-tx-viz): error implementation of IsVisualizable

feat(cc-tx-viz): add methods to fabric and besu; update models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): update cross chain events log for fabric transactions

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cctxviz): fix fabric prometheus

feat(cctxviz): fix besu prometheus

feat(cctxviz): fix fabric test

feat(cctxviz): update tx receipt

feat(cctxviz): add test script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add test receipts

feat(cctxviz): refactor CrossChainEventLog

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): refactor tests

feat(cc-tx-viz): update model, add tests

chore(cc-tx-viz): update dependencies

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): persist logs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cc-tx-viz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): update strinfify to csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): add csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): move csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add test

feat(cctxviz): add csv file, process mining script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): proof of concept v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): update csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

docs(cctxviz): update readme

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add carbon footprint

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(fabric-connector): update default queue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): fabric test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add parameters to fabric calls

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support besu

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update metrics

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxvi): update fabric and besu tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): besu and fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support call transactions on fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add aggregation basis

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): aggregate cctx

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): containerize draft

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add revenue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add dummy use case playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update persist test and dummy uc

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): workload test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add more timers

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer to map on connectors

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): vis plot wip

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): evaluate baseline

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update plots

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test files

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): time-efficient polling receipts

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): add test chaincode

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): use case v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

build(cc-tx-visualization): added missing fabric-contract-api

This will fix one compilation error.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

chore(deps): updated yarn.lock after rebase onto upstream/main

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

build(cc-tx-visualization): deleted redundant test fixtures

Also added the test-tooling package as a dev dependency which
should fix a few of the compiler errors we were getting on account
of missing dependencies.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

fix: resolved build errors for cctxviz branch

- test-tooling package changed that needs to be reverted before commmit to main branch
- added import statement for test data generationt

xfix(cc-tx-viz): error implementation of IsVisualizable

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add graphs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

fix(cctxviz): fix bug

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add process conformance

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
brunoffmateus pushed a commit to brunoffmateus/blockchain-integration-framework that referenced this issue Apr 2, 2024
Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>
Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

fix(prometheus): metrics.ts leaks to global registry hyperledger#1202

1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): added test for multiple prometheus metrics on fabric

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): added croschainEventLog models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(fabric): added endpoint for list of transaction receipts

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(test-tooling): add RabbitMQ test server

feat(cc-tx-viz): add RabbitMQ support; update model

feat(cc-tx-viz): add preliminary support to Fabric and Besu

build(deps): upgrade axios to latest to fix CVE

Details
CVE-2021-3749
high severity
Vulnerable versions: <= 0.21.1
Patched version: 0.21.2
axios is vulnerable to Inefficient Regular Expression Complexity

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

xfix(cc-tx-viz): error implementation of IsVisualizable

feat(cc-tx-viz): add methods to fabric and besu; update models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): update cross chain events log for fabric transactions

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cctxviz): fix fabric prometheus

feat(cctxviz): fix besu prometheus

feat(cctxviz): fix fabric test

feat(cctxviz): update tx receipt

feat(cctxviz): add test script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add test receipts

feat(cctxviz): refactor CrossChainEventLog

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): refactor tests

feat(cc-tx-viz): update model, add tests

chore(cc-tx-viz): update dependencies

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): persist logs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cc-tx-viz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): update strinfify to csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): add csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): move csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add test

feat(cctxviz): add csv file, process mining script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): proof of concept v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): update csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

docs(cctxviz): update readme

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add carbon footprint

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(fabric-connector): update default queue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): fabric test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add parameters to fabric calls

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support besu

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update metrics

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxvi): update fabric and besu tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): besu and fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support call transactions on fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add aggregation basis

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): aggregate cctx

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): containerize draft

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add revenue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add dummy use case playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update persist test and dummy uc

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): workload test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add more timers

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer to map on connectors

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): vis plot wip

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): evaluate baseline

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update plots

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test files

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): time-efficient polling receipts

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): add test chaincode

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): use case v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

build(cc-tx-visualization): added missing fabric-contract-api

This will fix one compilation error.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

chore(deps): updated yarn.lock after rebase onto upstream/main

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

build(cc-tx-visualization): deleted redundant test fixtures

Also added the test-tooling package as a dev dependency which
should fix a few of the compiler errors we were getting on account
of missing dependencies.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

fix: resolved build errors for cctxviz branch

- test-tooling package changed that needs to be reverted before commmit to main branch
- added import statement for test data generationt

xfix(cc-tx-viz): error implementation of IsVisualizable

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add graphs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

fix(cctxviz): fix bug

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add process conformance

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
RafaelAPB pushed a commit to brunoffmateus/blockchain-integration-framework that referenced this issue Apr 3, 2024
Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>
Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

fix(prometheus): metrics.ts leaks to global registry hyperledger#1202

1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): added test for multiple prometheus metrics on fabric

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): added croschainEventLog models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(fabric): added endpoint for list of transaction receipts

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(test-tooling): add RabbitMQ test server

feat(cc-tx-viz): add RabbitMQ support; update model

feat(cc-tx-viz): add preliminary support to Fabric and Besu

build(deps): upgrade axios to latest to fix CVE

Details
CVE-2021-3749
high severity
Vulnerable versions: <= 0.21.1
Patched version: 0.21.2
axios is vulnerable to Inefficient Regular Expression Complexity

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

xfix(cc-tx-viz): error implementation of IsVisualizable

feat(cc-tx-viz): add methods to fabric and besu; update models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): update cross chain events log for fabric transactions

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cctxviz): fix fabric prometheus

feat(cctxviz): fix besu prometheus

feat(cctxviz): fix fabric test

feat(cctxviz): update tx receipt

feat(cctxviz): add test script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add test receipts

feat(cctxviz): refactor CrossChainEventLog

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): refactor tests

feat(cc-tx-viz): update model, add tests

chore(cc-tx-viz): update dependencies

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): persist logs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cc-tx-viz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): update strinfify to csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): add csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): move csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add test

feat(cctxviz): add csv file, process mining script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): proof of concept v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): update csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

docs(cctxviz): update readme

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add carbon footprint

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(fabric-connector): update default queue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): fabric test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add parameters to fabric calls

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support besu

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update metrics

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxvi): update fabric and besu tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): besu and fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support call transactions on fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add aggregation basis

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): aggregate cctx

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): containerize draft

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add revenue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add dummy use case playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update persist test and dummy uc

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): workload test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add more timers

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer to map on connectors

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): vis plot wip

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): evaluate baseline

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update plots

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test files

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): time-efficient polling receipts

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): add test chaincode

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): use case v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

build(cc-tx-visualization): added missing fabric-contract-api

This will fix one compilation error.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

chore(deps): updated yarn.lock after rebase onto upstream/main

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

build(cc-tx-visualization): deleted redundant test fixtures

Also added the test-tooling package as a dev dependency which
should fix a few of the compiler errors we were getting on account
of missing dependencies.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

fix: resolved build errors for cctxviz branch

- test-tooling package changed that needs to be reverted before commmit to main branch
- added import statement for test data generationt

xfix(cc-tx-viz): error implementation of IsVisualizable

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add graphs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

fix(cctxviz): fix bug

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add process conformance

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
brunoffmateus pushed a commit to brunoffmateus/blockchain-integration-framework that referenced this issue Apr 12, 2024
Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>
Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

fix(prometheus): metrics.ts leaks to global registry hyperledger#1202

1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): added test for multiple prometheus metrics on fabric

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): added croschainEventLog models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(fabric): added endpoint for list of transaction receipts

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(test-tooling): add RabbitMQ test server

feat(cc-tx-viz): add RabbitMQ support; update model

feat(cc-tx-viz): add preliminary support to Fabric and Besu

build(deps): upgrade axios to latest to fix CVE

Details
CVE-2021-3749
high severity
Vulnerable versions: <= 0.21.1
Patched version: 0.21.2
axios is vulnerable to Inefficient Regular Expression Complexity

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

xfix(cc-tx-viz): error implementation of IsVisualizable

feat(cc-tx-viz): add methods to fabric and besu; update models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): update cross chain events log for fabric transactions

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cctxviz): fix fabric prometheus

feat(cctxviz): fix besu prometheus

feat(cctxviz): fix fabric test

feat(cctxviz): update tx receipt

feat(cctxviz): add test script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add test receipts

feat(cctxviz): refactor CrossChainEventLog

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): refactor tests

feat(cc-tx-viz): update model, add tests

chore(cc-tx-viz): update dependencies

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): persist logs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cc-tx-viz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): update strinfify to csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): add csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): move csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add test

feat(cctxviz): add csv file, process mining script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): proof of concept v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): update csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

docs(cctxviz): update readme

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add carbon footprint

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(fabric-connector): update default queue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): fabric test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add parameters to fabric calls

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support besu

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update metrics

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxvi): update fabric and besu tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): besu and fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support call transactions on fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add aggregation basis

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): aggregate cctx

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): containerize draft

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add revenue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add dummy use case playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update persist test and dummy uc

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): workload test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add more timers

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer to map on connectors

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): vis plot wip

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): evaluate baseline

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update plots

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test files

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): time-efficient polling receipts

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): add test chaincode

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): use case v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

build(cc-tx-visualization): added missing fabric-contract-api

This will fix one compilation error.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

chore(deps): updated yarn.lock after rebase onto upstream/main

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

build(cc-tx-visualization): deleted redundant test fixtures

Also added the test-tooling package as a dev dependency which
should fix a few of the compiler errors we were getting on account
of missing dependencies.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

fix: resolved build errors for cctxviz branch

- test-tooling package changed that needs to be reverted before commmit to main branch
- added import statement for test data generationt

xfix(cc-tx-viz): error implementation of IsVisualizable

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add graphs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

fix(cctxviz): fix bug

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add process conformance

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
brunoffmateus pushed a commit to brunoffmateus/blockchain-integration-framework that referenced this issue Apr 15, 2024
Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>
Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

fix(prometheus): metrics.ts leaks to global registry hyperledger#1202

1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): added test for multiple prometheus metrics on fabric

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): added croschainEventLog models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(fabric): added endpoint for list of transaction receipts

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(test-tooling): add RabbitMQ test server

feat(cc-tx-viz): add RabbitMQ support; update model

feat(cc-tx-viz): add preliminary support to Fabric and Besu

build(deps): upgrade axios to latest to fix CVE

Details
CVE-2021-3749
high severity
Vulnerable versions: <= 0.21.1
Patched version: 0.21.2
axios is vulnerable to Inefficient Regular Expression Complexity

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

xfix(cc-tx-viz): error implementation of IsVisualizable

feat(cc-tx-viz): add methods to fabric and besu; update models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): update cross chain events log for fabric transactions

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cctxviz): fix fabric prometheus

feat(cctxviz): fix besu prometheus

feat(cctxviz): fix fabric test

feat(cctxviz): update tx receipt

feat(cctxviz): add test script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add test receipts

feat(cctxviz): refactor CrossChainEventLog

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): refactor tests

feat(cc-tx-viz): update model, add tests

chore(cc-tx-viz): update dependencies

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): persist logs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cc-tx-viz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): update strinfify to csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): add csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): move csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add test

feat(cctxviz): add csv file, process mining script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): proof of concept v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): update csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

docs(cctxviz): update readme

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add carbon footprint

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(fabric-connector): update default queue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): fabric test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add parameters to fabric calls

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support besu

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update metrics

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxvi): update fabric and besu tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): besu and fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support call transactions on fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add aggregation basis

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): aggregate cctx

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): containerize draft

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add revenue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add dummy use case playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update persist test and dummy uc

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): workload test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add more timers

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer to map on connectors

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): vis plot wip

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): evaluate baseline

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update plots

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test files

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): time-efficient polling receipts

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): add test chaincode

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): use case v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

build(cc-tx-visualization): added missing fabric-contract-api

This will fix one compilation error.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

chore(deps): updated yarn.lock after rebase onto upstream/main

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

build(cc-tx-visualization): deleted redundant test fixtures

Also added the test-tooling package as a dev dependency which
should fix a few of the compiler errors we were getting on account
of missing dependencies.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

fix: resolved build errors for cctxviz branch

- test-tooling package changed that needs to be reverted before commmit to main branch
- added import statement for test data generationt

xfix(cc-tx-viz): error implementation of IsVisualizable

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add graphs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

fix(cctxviz): fix bug

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add process conformance

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
brunoffmateus pushed a commit to brunoffmateus/blockchain-integration-framework that referenced this issue Apr 16, 2024
Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>
Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

fix(prometheus): metrics.ts leaks to global registry hyperledger#1202

1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): added test for multiple prometheus metrics on fabric

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): added croschainEventLog models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(fabric): added endpoint for list of transaction receipts

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(test-tooling): add RabbitMQ test server

feat(cc-tx-viz): add RabbitMQ support; update model

feat(cc-tx-viz): add preliminary support to Fabric and Besu

build(deps): upgrade axios to latest to fix CVE

Details
CVE-2021-3749
high severity
Vulnerable versions: <= 0.21.1
Patched version: 0.21.2
axios is vulnerable to Inefficient Regular Expression Complexity

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

xfix(cc-tx-viz): error implementation of IsVisualizable

feat(cc-tx-viz): add methods to fabric and besu; update models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): update cross chain events log for fabric transactions

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cctxviz): fix fabric prometheus

feat(cctxviz): fix besu prometheus

feat(cctxviz): fix fabric test

feat(cctxviz): update tx receipt

feat(cctxviz): add test script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add test receipts

feat(cctxviz): refactor CrossChainEventLog

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): refactor tests

feat(cc-tx-viz): update model, add tests

chore(cc-tx-viz): update dependencies

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): persist logs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cc-tx-viz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): update strinfify to csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): add csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): move csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add test

feat(cctxviz): add csv file, process mining script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): proof of concept v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): update csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

docs(cctxviz): update readme

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add carbon footprint

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(fabric-connector): update default queue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): fabric test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add parameters to fabric calls

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support besu

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update metrics

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxvi): update fabric and besu tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): besu and fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support call transactions on fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add aggregation basis

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): aggregate cctx

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): containerize draft

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add revenue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add dummy use case playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update persist test and dummy uc

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): workload test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add more timers

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer to map on connectors

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): vis plot wip

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): evaluate baseline

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update plots

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test files

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): time-efficient polling receipts

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): add test chaincode

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): use case v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

build(cc-tx-visualization): added missing fabric-contract-api

This will fix one compilation error.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

chore(deps): updated yarn.lock after rebase onto upstream/main

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

build(cc-tx-visualization): deleted redundant test fixtures

Also added the test-tooling package as a dev dependency which
should fix a few of the compiler errors we were getting on account
of missing dependencies.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

fix: resolved build errors for cctxviz branch

- test-tooling package changed that needs to be reverted before commmit to main branch
- added import statement for test data generationt

xfix(cc-tx-viz): error implementation of IsVisualizable

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add graphs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

fix(cctxviz): fix bug

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add process conformance

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
brunoffmateus pushed a commit to brunoffmateus/blockchain-integration-framework that referenced this issue Apr 24, 2024
Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>
Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

fix(prometheus): metrics.ts leaks to global registry hyperledger#1202

1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): added test for multiple prometheus metrics on fabric

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): added croschainEventLog models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(fabric): added endpoint for list of transaction receipts

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(test-tooling): add RabbitMQ test server

feat(cc-tx-viz): add RabbitMQ support; update model

feat(cc-tx-viz): add preliminary support to Fabric and Besu

build(deps): upgrade axios to latest to fix CVE

Details
CVE-2021-3749
high severity
Vulnerable versions: <= 0.21.1
Patched version: 0.21.2
axios is vulnerable to Inefficient Regular Expression Complexity

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

xfix(cc-tx-viz): error implementation of IsVisualizable

feat(cc-tx-viz): add methods to fabric and besu; update models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): update cross chain events log for fabric transactions

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cctxviz): fix fabric prometheus

feat(cctxviz): fix besu prometheus

feat(cctxviz): fix fabric test

feat(cctxviz): update tx receipt

feat(cctxviz): add test script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add test receipts

feat(cctxviz): refactor CrossChainEventLog

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): refactor tests

feat(cc-tx-viz): update model, add tests

chore(cc-tx-viz): update dependencies

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): persist logs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cc-tx-viz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): update strinfify to csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): add csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): move csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add test

feat(cctxviz): add csv file, process mining script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): proof of concept v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): update csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

docs(cctxviz): update readme

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add carbon footprint

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(fabric-connector): update default queue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): fabric test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add parameters to fabric calls

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support besu

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update metrics

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxvi): update fabric and besu tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): besu and fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support call transactions on fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add aggregation basis

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): aggregate cctx

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): containerize draft

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add revenue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add dummy use case playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update persist test and dummy uc

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): workload test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add more timers

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer to map on connectors

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): vis plot wip

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): evaluate baseline

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update plots

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test files

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): time-efficient polling receipts

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): add test chaincode

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): use case v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

build(cc-tx-visualization): added missing fabric-contract-api

This will fix one compilation error.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

chore(deps): updated yarn.lock after rebase onto upstream/main

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

build(cc-tx-visualization): deleted redundant test fixtures

Also added the test-tooling package as a dev dependency which
should fix a few of the compiler errors we were getting on account
of missing dependencies.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

fix: resolved build errors for cctxviz branch

- test-tooling package changed that needs to be reverted before commmit to main branch
- added import statement for test data generationt

xfix(cc-tx-viz): error implementation of IsVisualizable

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add graphs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

fix(cctxviz): fix bug

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add process conformance

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
brunoffmateus pushed a commit to brunoffmateus/blockchain-integration-framework that referenced this issue May 22, 2024
Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>
Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

fix(prometheus): metrics.ts leaks to global registry hyperledger#1202

1. Specified a `register` property of the gauges as an empty
array so that it does not pollute the global namespace. This
is how this is supposed to be done as per the docs of prom-client.

2. Once the change from 1) took place, the issue became that
the metrics gathering code was still trying to hit up the
global scope for the metrics, e.g. calling the get metrics
methods directly on the promClient object instead of the
registry that we create for each prmoetheus exporter object
separately. So a little additional refactor ensued to fix this
as well by making sure that we grab a reference of the registry
object at construction time and then re-use that wherever needed
instead of going through the global promClient object.

3. Added missing .startMetricsCollection calls in the plugin
constructors to ensure that the prometheus exporter object
gets initialized properly (this is where the registry gets
created as well so without this there are crashes happening
when one tries to access the metrics through the registry)

Why though?
The problem was that the metrics.ts file that we have for all the
plugin's metrics constructs a new Metric (Gauge) object at import
time which then defaults to registering the metric in the global
registry of prom-client by default.

The latter was causing crashes when separate versions of the same
metrics.ts file are imported in a scenario were the API server
imports plugins from a different directory (this issue is coming
from the branch where I'm working on plugin sandboxing via the
live-plugin-manager).

Fixes hyperledger#1202

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): added test for multiple prometheus metrics on fabric

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): added croschainEventLog models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(fabric): added endpoint for list of transaction receipts

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(test-tooling): add RabbitMQ test server

feat(cc-tx-viz): add RabbitMQ support; update model

feat(cc-tx-viz): add preliminary support to Fabric and Besu

build(deps): upgrade axios to latest to fix CVE

Details
CVE-2021-3749
high severity
Vulnerable versions: <= 0.21.1
Patched version: 0.21.2
axios is vulnerable to Inefficient Regular Expression Complexity

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

feat(cc-tx-viz): add methods to fabric connector

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): add metric model

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

xfix(cc-tx-viz): error implementation of IsVisualizable

feat(cc-tx-viz): add methods to fabric and besu; update models

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cc-tx-viz): update cross chain events log for fabric transactions

Signed-off-by: Iulia Mihaiu <maramih.2007@yahoo.com>

feat(cctxviz): fix fabric prometheus

feat(cctxviz): fix besu prometheus

feat(cctxviz): fix fabric test

feat(cctxviz): update tx receipt

feat(cctxviz): add test script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add test receipts

feat(cctxviz): refactor CrossChainEventLog

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): refactor tests

feat(cc-tx-viz): update model, add tests

chore(cc-tx-viz): update dependencies

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): persist logs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cc-tx-viz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): update strinfify to csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): add csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cc-tx-viz): move csv folder

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cc-tx-viz): add test

feat(cctxviz): add csv file, process mining script

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): proof of concept v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): update csv

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

docs(cctxviz): update readme

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add carbon footprint

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(fabric-connector): update default queue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): fabric test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add parameters to fabric calls

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support besu

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update metrics

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxvi): update fabric and besu tests

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): besu and fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): support call transactions on fabric

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add aggregation basis

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): aggregate cctx

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): containerize draft

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add revenue

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update model playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add dummy use case playbook

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update persist test and dummy uc

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): workload test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add more timers

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): add timer to map on connectors

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): vis plot wip

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): evaluate baseline

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update plots

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test files

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

feat(cctxviz): update testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): time-efficient polling receipts

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

chore(cctxviz): add test chaincode

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): use case v1

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

build(cc-tx-visualization): added missing fabric-contract-api

This will fix one compilation error.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

chore(deps): updated yarn.lock after rebase onto upstream/main

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

build(cc-tx-visualization): deleted redundant test fixtures

Also added the test-tooling package as a dev dependency which
should fix a few of the compiler errors we were getting on account
of missing dependencies.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

fix: resolved build errors for cctxviz branch

- test-tooling package changed that needs to be reverted before commmit to main branch
- added import statement for test data generationt

xfix(cc-tx-viz): error implementation of IsVisualizable

chore: update yarn and remove package.lock

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): testing framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): test framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): update framework

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add graphs

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add test

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

fix(cctxviz): fix bug

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>

test(cctxviz): add process conformance

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API_Server bug Something isn't working dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant