How do I verify the version of RSK running on a node? - rpc

I have RPC access to a private deployment of an RSK node,
but no direct access to the file system.
How can I check what version of the RSK node is running on that system?

Without direct access to the file system,
you cannot verify the version of RSKj (the RSK node implementation)
that is running on that machine.
However, you can check the version that it claims to be running,
using an RPC request: web3_clientVersion.
For example, using the public public node:
curl \
-X POST \
-H "Content-Type:application/json" \
--data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":1}' \
https://public-node.rsk.co/
(replace https://public-node.rsk.co/ with the
RPC endpoint URL of your target deployment.)
This should output the following:
{"jsonrpc":"2.0","id":1,"result":"RskJ/3.0.0/Linux/Java1.8/IRIS-ba01ea2"}
You can then view RSKj's tagged releases on the RSKj github repo.
For example, the above output corresponds to
https://github.com/rsksmart/rskj/releases/tag/IRIS-3.0.0
Note that if you see the following output:
{"jsonrpc":"2.0","id":1,"result":"RskJ/2.2.0/Linux/Java1.8/PAPYRUS-dev"}
That means you are still running an older version of the RSK node,
and prior to the Iris consensus changes,
and you should upgrade to the latest version and re-sync your blocks!

Related

SHAREDLIBRARYNAME Utimaco is not referring When I start signserver with docker

I start signserver with docker:
docker run -it --rm --name signserver \
-p 80:8080 -p 443:8443 \
-e CRYPTO_SERVER_IP=**** \
-v /ca-cert.pem:/mnt/external/secrets/tls/cas/ManagementCA.crt \
signserver:1.0
Now, i need connect signserver to PKCS11 on HSM.I has changed signserver-deploy.configuaration:
cryptotoken.p11.lib.30.name=Utimaco
cryptotoken.p11.lib.30.file=/opt/utimaco/p11/libcs_pkcs11_R3.so
Then I add PKCS#11 crypto worker from template,and i change the configuration:
WORKERGENID1.SHAREDLIBRARYNAME=Utimaco
The PKCS#11 crypto worker status is offline,so i active it and enter authentication Code.but i get errors:
- Failed to initialize crypto token: SHAREDLIBRARYNAME Utimaco is not referring to a defined value
Could you please help me
Thank you so much!
This is being discussed at the SignServer CE project's GitHub Discussions page where it is being answered that:
The current SignServer CE container does not support changing configuration in the signserver_deploy.properties.
A theoretical short-term solution for doing this could be something like this:
Find where the signserver.ear is in the container (probably under the appserver deployments folder and it might be folder instead of a ZIP file).
Find the JAR file which has the configuration, likely lib/SignServer-Common.jar
Find the properties file in that JAR file, something like org/signserver/common/.../signservercompile.properties
Change the property in that file and save it back to the ZIP file

CouchDB 3.2.1 Problems with manual replication

I have two machine (one local developer with OS Ubuntu 21.0 and one remote server with OS Ubuntu 16.04.07 LTS).
On both i have the exact same couchDB version 3.2.1.
On both i have a database with same name (no partitioned).
When using fauxton in the local i can create this view:
function (d) {
d.mdc.forEach(x=>emit(x, 1));
}
But on remote says it cannot compile into a valid function.
I had to change it to
function (d) {
if("mdc" in d)
for(x=0;x<d.mdc.length;x++){
emit(d.mdc[x], 1);
}
}
Additionally, i use this command to replicate the _design/myviews from local to remote:
curl -X POST http://127.0.0.1:5984/_replicate -d '
{"source":"http://user:xxxx#127.0.0.1:5984/mydb",
"target":"http://user:xxxx#127.0.0.1:5985/mydb",
"continuous":false,
"doc_ids":["_design/myviews"]}
' -H "Content-Type: application/json"
But for few days, this does not work anymore. I tried to delete the _design/myviews in the remote but still did not work correctly.
Any suggestions to solve both problems? Thank you.

Can I execute presto CLI without specifying --server or --catalog

I would like to know where, if it is possible, I can configure default catalog and server values to use when executing the presto CLI.
Presto CLI info:
ls -lthr /opt/presto-server-0.169/presto
/opt/presto-server-0.169/presto -> presto-cli-0.169-executable.jar
And instead of executing:
/opt/presto-server-0.169/presto --server localhost:6666 --schema abc --catalog catalog-1
I would like to execute:
/opt/presto-server-0.169/presto
with it picking up localhost:6666 as my server and catalog-1 as my catalog. I would like to specify the schema once I make the connection.
Any help will be appreciated!
Thanks.
There is no such option to set host in console lazily. The server needs to be defined upfront by default localhost:8080 is used.
If you cannot pass proper arguments to the presto-cli and cannot use the default server host, you can change default values in presto-cli source code and compile your version.
You need to checkout project at github.
Change default values in ClientOptions.
Package jar for presto cli: cd presto-cli && mvn package
You can find a jar in target/presto-cli-0.201-SNAPSHOT.jar
For schema/catalog, you can define it in the console itself with USE command. The syntax as follows: USE [<catalog>.]<schema>.
Please note that with each version of presto you need also compile and maintain your own version of presto-cli, which might become a burden quite soon.

GitLab API - Unable to access file which is within a directory

I have a GitLab project which is set up as follows:
myserver.com/SuperGroup/SubGroup/SubGroupProject
The tree of the following project is a top-level txt file and a txt file within a directory. I get the tree from the GitLab API with:
myserver.com/api/v4/projects/1/repository/tree?recursive=true
[{"id":"aba61143388f605d3fe9de9033ecb4575e4d9b69","name":"myDirectory","type":"tree","path":"myDirectory","mode":"040000"},{"id":"0e3a2b246ab92abac101d0eb2e96b57e2d24915d","name":"1stLevelFile.txt","type":"blob","path":"myDirectory/1stLevelFile.txt","mode":"100644"},{"id":"3501682ba833c3e50addab55e42488e98200b323","name":"top_level.txt","type":"blob","path":"top_level.txt","mode":"100644"}]
If I request the contents for top_level.txt they are returned without any issue via:
myserver.com/api/v4/projects/1/repository/files/top_level.txt?ref=master
However I am unable to access myDirectory/1stLevelFile.txt with any API call I try. E.g.:
myserver.com/api/v4/projects/1/repository/files/"myDirectory%2F1stLevelFile.txt"?ref=master
and,
myserver.com/api/v4/projects/1/repository/files/"myDirectory%2F1stLevelFile%2Etxt"?ref=master
Results in:
Not Found The requested URL /api/v4/projects/1/repository/files/myDirectory/1stLevelFile.txt was not found on this server.
Apache/2.4.25 (Debian) Server at myserver.com Port 443
myserver.com/api/v4/projects/1/repository/files/"myDirectory/1stLevelFile.txt"?ref=master and,
myserver.com/api/v4/projects/1/repository/files?ref=master&path=myDirectory%2F1stLevelFile.txt
Results in:
error "404 Not Found"
The versions of the components are:
GitLab 10.6.3-ee
GitLab Shell 6.0.4
GitLab Workhorse v4.0.0
GitLab API v4
Ruby 2.3.6p384
Rails 4.2.10
postgresql 9.6.8
According to my research there was a similar bug which was fixed with the 10.0.0 update.
I also added my ssh-key although I doubt it has any effect, following this advice with the same issue in php.
Solution:
I eventually solved it by adjusting the apache installed on the server.
Just follow these instructions: https://gitlab.com/gitlab-org/gitlab-ce/issues/35079#note_76374269
According to your code, I will go thinking you use curl.
If it is the case, why are you adding double quotes to your file path ?
The doc do not contains it.
Can you test it like that please ?
curl --request GET --header 'PRIVATE-TOKEN: XXXXXXXXX' myserver.com/api/v4/projects/1/repository/files/myDirectory%2F1stLevelFile%2Etxt?ref=master

IBM Object Storage-How to make a File or a Container public accesible one?

I have uploaded a file from local to the IBM Storage container using Node js
In the response I have got the baseResourceUrl (https://dal.objectstorage.open.softlayer.com:443/v1/AUTH_bf7
d89eb565f4c638d7b6f7b15e73538/testContainer/test.png)
The URL is not accesible in the browser.It says Unauthorized
In my usecase I need to access publicly anywhere.Is that possible? If possible how to give public access to files.
I am new to IBM Bluemix environment and Object Storage service.Kindly share some solutions
After uploading the file you'll need to modify the ACLs. You'll end up creating a Read ACL for the container: testContainer.
I was able to test this using the Swift CLI, however you can use the curl examples to figure out what you'll need to write using Node.
Swift Example (assumes you have ENV variables exported):
swift post testContainer --read-acl ".r:*,.rlistings"
Curl with AUTH_TOKEN:
$ curl -X PUT -i \
> -H "X-Auth-Token: AUTH_TOKEN" \
> -H "X-Container-Read: .r:*,.rlistings" \
> https://dal.objectstorage.open.softlayer.com/v1/AUTH_bf7d89eb565f4c638d7b6f7b15e73538/testContainer
https://www.swiftstack.com/docs/cookbooks/swift_usage/container_acl.html#setting-container-read-acl
If we go back to the swift client we can view the current ACLs in place:
swift stat -v testContainer
Which will return data about the container:
Read ACL: .r:*,.rlistings
Write ACL:

Resources