Unable to open messaging channel in Substrate Tutorial - substrate

Replace chain-spec.rs
In Open Message Passing Channels guide, use the parachain-template.js parachain_id of 1000, 1001 respectively.
Add sudo pallet to runtime/lib.js.
impl pallet_sudo::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type RuntimeCall = RuntimeCall;
}
construct_time!(
// Sudo: pallet_sudo, // or next line does not success open channel
Sudo: pallet_sudo::{Pallet, Call, Storage, Config<T>, Event<T>},
)
Use cargo build -release for node/src/chain-spec.rs with parachian_id = 1000 and 1001 respectively.
Start a test network with zombienet, where config.toml is configured according to the Simulate Parachains documentation.
[relaychain]
default_command = "polkadot-v0.9.32"
default_args = [ "-lparachain=debug" ]
chain = "rococo-local"
[[relaychain.nodes]]
name = "alice"
validator = true
ws_port = 9900
[[relaychain.nodes]]
name = "bob"
validator = true
ws_port = 9901
[[relaychain.nodes]]
name = "charlie"
validator = true
ws_port = 9902
[[relaychain.nodes]]
name = "dave"
validator = true
ws_port = 9903
[[parachains]]
id = 1000
cumulus_based = true
[parachains.collator]
name = "parachain-A-1000-collator01"
command = "parachain-A-template-node-v0.9.32"
ws_port = 9910
[[parachains]]
id = 1001
cumulus_based = true
[parachains.collator]
name = "parachain-B-1001-collator01"
command = "parachain-B-template-node-v0.9.32"
ws_port = 9920
[[hrmpChannels]]
sender = 1000
recipient = 1001
maxCapacity = 8
maxMessageSize = 8000
[[hrmpChannels]]
sender = 1001
recipient = 1000
maxCapacity = 8
maxMessageSize = 8000
The question arises.
When I follow the documentation step by step, there is no hrmp.OpenChannelRequested event in the recent time of the relay chain when the transaction is submitted, and ump.ExecutedUpward shows incomplete.
Parachain 1000 XCM Parameter 1:
Parachain 1000 XCM Parameter 2:
Relaychain Error:
Parachain Event:
I followed the steps above and am not sure what step was missed that caused the error in step 5 to occur.

Related

Gitlab runner on aws ec2 : Have one ec2 launching multiple concurrent jobs

I followed this tutorial : https://docs.gitlab.com/runner/configuration/runner_autoscale_aws/
And it works perfectly ! I put the runner in only one branch for testingBut in our pipeline with have like 15 jobs in one stage, but my configuration launch only 2 ec2 machines, so the jobs are taken only 2 at a time, but I want one machine to take 4-5 jobs at the same time
My jobs on the same stage : https://imgur.com/a/s2HjGML
This is my config.toml
concurrent = 8
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "gitlab-runner-xxxxx-dev"
url = "https://gitlab.com/"
token = "xxxxxxxxx"
executor = "docker+machine"
limit = 2
request_concurrency = 3
[runners.docker]
image = "alpine"
privileged = true
disable_cache = true
[runners.cache]
Type = "s3"
Shared = true
[runners.cache.s3]
ServerAddress = "s3.amazonaws.com"
AccessKey = "xxxxxxxx"
SecretKey = "xxxxx"
BucketName = "gitlab-runner-xxx-bucket"
BucketLocation = "eu-west-3"
[runners.machine]
IdleCount = 0
IdleTime = 1800
MaxBuilds = 10
MachineDriver = "amazonec2"
MachineName = "gitlab-docker-machine-%s"
MachineOptions = [
"amazonec2-access-key=xxxxxx",
"amazonec2-secret-key=xxxxxxx",
"amazonec2-region=eu-west-3",
"amazonec2-vpc-id=vpc-xxxx",
"amazonec2-subnet-id=subnet-xxxxx",
"amazonec2-use-private-address=true",
"amazonec2-tags=runner-manager-name,gitlab-aws-autoscaler,gitlab,true,gitlab-runner-autoscale,true",
"amazonec2-security-group=xxxxx",
"amazonec2-instance-type=m5.large",
]
[[runners.machine.autoscaling]]
Periods = ["* * 9-18 * * mon-fri *"]
IdleCount = 2
IdleTime = 3600
Timezone = "UTC"
[[runners.machine.autoscaling]]
Periods = ["* * * * * sat,sun *"]
IdleCount = 1
IdleTime = 60
Timezone = "UTC"
Is my config not good for what I want or what do I want is impossible ?
Thanks guys !
You've set limit = 2 in your configuration. This will limit the total number of jobs handled by all runners defined in this configuration file to 2.
Set this limit to a higher number to allow more jobs to run concurrently.
See also the relationship between limit, concurrent and IdleCount.

DocuSign Require Signing Document Twice with Different Tabs

I have a document that is using tabs to fill a document. The document is signed before and after completion of a task. Is it possible to modify tabs on an envelope - then re-generate an DocuSign_eSign::RecipientViewRequest (still having the initial signature / fields)?
Thus far I've been able to generate two DocuSign_eSign::RecipientViewRequest, but cannot figure out how to change the tabs in between signing:
PRE_SIGNER = 'pre_signer'
POST_SIGNER = 'post_signer'
PRIVATE_KEY = CREDENTIALS['private_key']
PUBLIC_KEY = CREDENTIALS['public_key']
USER_ID = CREDENTIALS['user_id']
CLIENT_ID = CREDENTIALS['client_id']
ACCOUNT_ID = CREDENTIALS['account_id']
BASE_URL = CREDENTIALS['base_url']
configuration = DocuSign_eSign::Configuration.new
configuration.host = "#{BASE_URL}/restapi"
configuration.debugging = true
api_client = DocuSign_eSign::ApiClient.new(configuration)
api_client.base_path = BASE_URL
envelope_api = DocuSign_eSign::EnvelopesApi.new(api_client)
pre_signer_text = DocuSign_eSign::Text.new
pre_signer_text.value = 'Alpha'
pre_signer_text.tab_label = 'pre_value'
pre_signer = DocuSign_eSign::Signer.new
pre_signer.role_name = PRE_SIGNER
pre_signer.client_user_id = PRE_SIGNER
pre_signer.recipient_id = 1
pre_signer.name = 'Kevin Sylvestre'
pre_signer.email = 'kevin#fake.com'
pre_signer.tabs = DocuSign_eSign::Tabs.new
pre_signer.tabs.text_tabs = [pre_signer_text]
post_signer = DocuSign_eSign::Signer.new
post_signer.role_name = POST_SIGNER
post_signer.client_user_id = POST_SIGNER
post_signer.recipient_id = 2
post_signer.name = 'Kevin Sylvestre'
post_signer.email = 'kevin#fake.com'
post_signer.tabs = DocuSign_eSign::Tabs.new
post_signer.tabs.text_tabs = []
server_template = DocuSign_eSign::ServerTemplate.new
server_template.sequence = 0
server_template.template_id = TEMPLATE_ID
inline_template = DocuSign_eSign::InlineTemplate.new
inline_template.sequence = 0
inline_template.recipients = DocuSign_eSign::Recipients.new
inline_template.recipients.signers = [
pre_signer,
post_signer,
]
composite_template = DocuSign_eSign::CompositeTemplate.new
composite_template.server_templates = [server_template]
composite_template.inline_templates = [inline_template]
envelope_event = DocuSign_eSign::EnvelopeEvent.new
envelope_event.envelope_event_status_code = 'completed'
envelope_definition = DocuSign_eSign::EnvelopeDefinition.new
envelope_definition.status = 'sent'
envelope_definition.composite_templates = [composite_template]
api_client.request_jwt_user_token(CLIENT_ID, USER_ID, PRIVATE_KEY)
envelope = envelope_api.create_envelope(ACCOUNT_ID, envelope_definition)
pre_signer_recipient_view_request = DocuSign_eSign::RecipientViewRequest.new
pre_signer_recipient_view_request.authentication_method = 'none'
pre_signer_recipient_view_request.client_user_id = PRE_SIGNER
pre_signer_recipient_view_request.user_name = 'Kevin Sylvestre'
pre_signer_recipient_view_request.email = 'kevin#fake.com'
pre_signer_recipient_view_request.return_url = 'https://ksylvest.com'
pre_recipient_view = envelope_api.create_recipient_view(ACCOUNT_ID, envelope.envelope_id, pre_signer_recipient_view_request)
url = pre_recipient_view.url
`open #{url}`
puts "Continue?"
gets
# at this point I'd like to enter values for tabs...
post_signer_text = DocuSign_eSign::Text.new
post_signer_text.value = 'Omega'
post_signer_text.tab_label = 'post_value'
post_signer_recipient_view_request = DocuSign_eSign::RecipientViewRequest.new
post_signer_recipient_view_request.authentication_method = 'none'
post_signer_recipient_view_request.client_user_id = POST_SIGNER
post_signer_recipient_view_request.user_name = 'Kevin Sylvestre'
post_signer_recipient_view_request.email = 'kevin#fake.com'
post_signer_recipient_view_request.return_url = 'https://ksylvest.com'
post_recipient_view = envelope_api.create_recipient_view(ACCOUNT_ID, envelope.envelope_id, post_signer_recipient_view_request)
url = post_recipient_view.url
`open #{url}`
You could add the same person to sign twice, as two separate recipients that are the same person. You can generate different recipient views. You can set the routing order to be different. Only reason I didn't post this as an answer is that you may mean that you need to pause the envelope?
you can add tabs using your code where you have post_signer.tabs, but if you want to modify existing tabs that came from the template then you have to create the envelope in draft mode ("created") and then make a different API call to modify the tabs and then a final API call to send it. Another option is to pause the envelope and "correct" it.
Pause envelope workflow code examples
https://github.com/docusign/docusign-esign-ruby-client/blob/c477b07c2f578214fdf7d0c5a33355f01e9a0b4e/lib/docusign_esign/api/envelopes_api.rb#L6132 update_recipients() method should do the trick...

Making DoS attack using veins

I am new to veins and I would like to make DoS attack using flooding technique. I have tried sending a message, that used in case of an accident, say, a million times by a specific car. Is this enough to make a DoS attack? Can I make this code more sophisticated?
void TraCIDemo11p::handlePositionUpdate(cObject* obj) {
BaseWaveApplLayer::handlePositionUpdate(obj);
if (externalID == "2"){ //2 is the attacker
for (int i = 0; i<1000000; i++)
sendMessage(mobility->getRoadId());
}
Note: I am using omnet 5.0, sumo-0.25.0 and veins-4.4, TraCIDemo11p.cc
For the NED File
import inet.applications.dhcp.DhcpServer;
import inet.node.dsdv.DsdvRouter;
import inet.node.inet.AdhocHost;
import inet.node.inet.MulticastRouter;
import inet.node.inet.WirelessHost;
import inet.networklayer.configurator.ipv4.Ipv4NetworkConfigurator;
import inet.node.aodv.AodvRouter;
import inet.node.wireless.AccessPoint;
import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
import inet.visualizer.integrated.IntegratedVisualizer;
import inet.visualizer.networklayer.NetworkRouteVisualizer;
import inet.visualizer.integrated.IntegratedMultiVisualizer;
import ned.DelayChannel;
network pingattack
{
parameters:
int numhost;
int numattacker;
submodules:
visualizer: IntegratedMultiVisualizer {
#display("p=14,295");
}
configurator: Ipv4NetworkConfigurator {
//config = default(xml("<config><interface WirelessHost='**' address='10.0.0.x' netmask='255.255.255.0'/></config>"));
#display("p=42,430");
}
radioMedium: Ieee80211ScalarRadioMedium {
#display("p=14,339");
}
Attacker[numattacker]: WirelessHost {
#display("p=180,331");
}
Master: WirelessHost {
#display("p=274,316");
}
Slaves[numhost]: WirelessHost {
#display("p=313,247");
}
ap: AccessPoint {
#display("p=244,246");
}
}
For the Ini File,
[General]
description = Displaying Ping Attack
network = pingattack
# Setting up the max area which the modules are able to travel to
# "Z" limits the height. It can only be observed in 3D
**.constraintAreaMinX = 0m
**.constraintAreaMinY = 0m
**.constraintAreaMinZ = 0m
**.updateInterval = 0.1s # test with 0s too, and let getCurrentPosition update the display string from a test module
# Does not specify the intial positions. Random initial position will be chosen within the contraint area,
# unless it is specified in the display string in NED file or initialX,Y,Z
**.mobility.initFromDisplayString = false
# Setting all the default application type to "GlobalArp"
**.arp.typename = "GlobalArp"
# Attacker parameters
*.Attacker[*].numApps = 1 # Number of application layers on attackers
*.Attacker[*].app[0].typename = "PingApp" # Application type for attackers
*.Attacker[*].app[0].destAddr = "Master" # Set ping destination
*.Attacker[*].app[0].startTime = 10s # Initialize start time of ping
# Master Communication
*.Master.numApps = 1 # Number of application layers on master
*.Master.app[0].typename = "PingApp" # Application type for master
# MasterDrone Mobility
*.Master.mobility.typename = "LinearMobility" # Master move at constant speed
*.Master.mobility.speed = 20mps # of 20mps
# Slave Communication
*.Slaves[*].numApps = 1 # Number of application layers on slaves
*.Slaves[*].app[0].typename = "PingApp" # Application type for slaves
*.Slaves[*].app[0].destAddr = "Master" # Set ping destination, to ensure connection with master
*.Slaves[*].app[0].startTime = replaceUnit (0.1*(parentIndex()), "s") # to avoid synchronization
#*.Slaves[*].app[0].sendInterval= 1s # Slaves send ping every 1 second
# Slave mobility
*.Slaves[*].mobility.typename = "MassMobility" # Slaves move randomly
*.Slaves[*].mobility.changeInterval = truncnormal(2s, 0.5s)
*.Slaves[*].mobility.angleDelta = normal(0deg, 30deg)
#*.Slaves[*].mobility.speed = 15mps
# Wlan Config
*.Master.wlan[*].radio.transmitter.power = 10mW # Setting up Master, slaves, attacker wlan transmit power
*.ap.wlan[*].radio.transmitter.power = 100mW
# Pcap recording
**.crcMode = "computed" # To include CRC values in capture files
**.fcsMode = "computed" # To include FCS values in capture files
**.numPcapRecorders = 1 # To include PcapRecordere module
**.pcapRecorder[*].pcapNetwork = 105 # Set PCAP files link-layer header type to 802.11
**.pcapRecorder[*].pcapFile = "results/all.pcap" # Specifying file to write traces in & enable packet capture
**.pcapRecorder[*].verbose = true # To print tcpdump-like textual information to the log (EV)
**.pcapRecorder[*].alwaysFlush = true # Record the packets even if simulation crashes
**.pcapRecorder[*].packetFilter = "ping*"
#Analysis
*.*.wlan[*].**.vector-recording = false
# Visualizer parameters
# Displaying network path activity
*.visualizer.*.numDataLinkVisualizers = 2
*.visualizer.*.numInterfaceTableVisualizers = 2
*.visualizer.*.dataLinkVisualizer[0].displayLinks = true
*.visualizer.*.dataLinkVisualizer[0].packetFilter = "*ping*"
#*.visualizer.*.physicalLinkVisualizer[*].displayLinks = true
#*.visualizer.*.interfaceTableVisualizer[*].displayInterfaceTables = true
#*.visualizer.*.interfaceTableVisualizer[0].format = "%4"
*.visualizer.*.infoVisualizer[0].modules = "*.*.app[0]"
*.visualizer.*.infoVisualizer[1].modules = "*.*.app[1]"
#*.visualizer.*.infoVisualizer[*].format = "%t"
#*.visualizer.*.statisticVisualizer[0].sourceFilter = "**.app[*]"
#*.visualizer.*.statisticVisualizer[0].signalName = "rtt"
#*.visualizer.*.statisticVisualizer[0].unit = "ms"
#*.visualizer.*.infoVisualizer[*].placementHint = "topCenter"
#*.visualizer.*.packetDropVisualizer[*].displayPacketDrops = true
#*.visualizer.*.packetDropVisualizer[*].packetFilter = "ping*"
#*.visualizer.*.packetDropVisualizer[*].labelFormat = "%n/reason: %r"
#*.visualizer.*.packetDropVisualizer[*].fadeOutTime = 3s
#edit
# Set number of Attacker
# Set number of Host
# Set Attacker Ping interval
# Set Transmittion Power of Master Slave Attacker and AP
# Set Max constrain area XYZ
sim-time-limit = 20s
pingattack.numhost = 5
pingattack.numattacker = 1
*.Attacker[*].app[0].sendInterval = 0.0001s
**.constraintAreaMaxX = 2000m
**.constraintAreaMaxY = 2000m
**.constraintAreaMaxZ = 2000m
*.Slaves[*].wlan[*].radio.transmitter.power = 100mW
*.Attacker[*].wlan[*].radio.transmitter.power = 200mW
*.Attacker[*].**.vector-recording = false
*.Slaves[*].mobility.speed = 16mps
Hi I did a DOS Attack using PingApp. I think you can refer to the source code of PingApp. The important part is to have the sendInterval be 0.0001s. Hope this helps!

how to make all nodes ping & reply in OMNet++ simulator scanerio is given below

can any one help me in code of simple ping app
i am trying to ping from 4 nodes but only 2 can communicate in my case
omnet ini code is here
# ping app (host[0] pinged by others)
*.host[0].numPingApps = 0
*.host[*].numPingApps = 4
*.host[1].pingApp[*].destAddr = "host[0]"
*.host[2].pingApp[*].destAddr = "host[0]"
*.host[3].pingApp[*].destAddr = "host[0]"
*.host[4].pingApp[*].destAddr = "host[0]"
*.host[1].pingApp[*].startTime = 3s
*.host[1].pingApp[*].sendInterval = 1s
*.host[1].pingApp[*].srcAddr = "host[1]"
#*.host[1].pingApp[*].destAddr = "host[2]"
*.host[2].pingApp[*].startTime = 2s
*.host[2].pingApp[*].sendInterval = 1s
*.host[2].pingApp[*].srcAddr = "host[2]"
#*.host[2].pingApp[*].destAddr = "host[1]"
*.host[3].pingApp[*].startTime = 1s
*.host[3].pingApp[*].sendInterval = 1s
*.host[3].pingApp[*].srcAddr = "host[3]"
#*.host[3].pingApp[*].destAddr = "host[4]"
Hosts 1, 2, 3, and 4 should have only one pingApp. Moreover, srcAddr may be omitted, because this field will be automatically set by network layer. So minimal omnetpp.ini should look like:
*.host[0].numPingApps = 0
*.host[0].pingApp[0].destAddr = ""
*.host[*].numPingApps = 1
*.host[*].pingApp[0].destAddr = "host[0]"

kannel not forwarding messages to URL

My kannel.conf is :
group = core
admin-port = X
smsbox-port = Y
admin-password = Z
log-file = "/usr/local/kannel/log/clientA/kannel.log"
log-level = 0
box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1"
access-log = "/usr/local/kannel/log/clientA/Access.log"
store-type = file
store-file = "/usr/local/kannel/log/clientA/clientA.store"
###############################################################
group = smsc
smsc = smpp
smsc-id = clientA
host =A.B.C.D
port = 9081
throughput = 2
wait-ack = 600
smsc-username = myuser
smsc-password = mypass
keepalive=30
system-type =
transceiver-mode = 1
enquire-link-interval = 1200
source-addr-ton = 0
source-addr-npi = 1
dest-addr-ton = 1
dest-addr-npi = 1
max-pending-submits = 3
#################################################################
group = smsbox
smsbox-id = smsbox82
bearerbox-host = localhost
sendsms-port = portSend
global-sender = XXXXXXX
mo-recode = true
log-file = "/usr/local/kannel/log/clientA/smsbox.log"
log-level = 0
access-log = "/usr/local/kannel/log/clientA/Access.log"
###################################################################
group = sendsms-user
username = myu
password = myp
max-messages = 3
concatenation = true
##################################################################
group = sms-service
keyword = default
get-url = "http://localhost:80/insdb.php?sender=%p&receiver=%r&smsid=%I"
I have apache running on port 80 and the URL when individually called inserts messages in DB, however, when a message is sent to the App , it never reaches DB, and I do not see any error in logs explaining this.
Any thoughts where am I missing ?
Thanks
If you need to save all SMS messages that arrived to kannel, than you need to add sms-service group into kannel.conf, so add something like this:
group = sms-service
keyword = default
get-url="http://127.0.0.1/save?sender=%p&text=%a&receiver=%P"
This will cause that , for all received messages, there will be executed the get-url where your application (apache etc) should be able to save message details to DB.
You should check kannel documentation for detailed info about available placeholders, I used only some of them (sender, receiver, text of message).
BR,
Izabel

Resources